Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - krzat

Pages: [1]
1
General / swift SFML wrapper
« on: March 12, 2016, 11:22:16 am »
I wrote generator to create swift wrapper for SFML. Seems to be working, but there may be some issues related to memory management, i.e. texture will be not retained if you assign it to sprite, etc.

https://github.com/krzat/swift-sfml-wrapper
Repository contains small project for testing purposes.

2
C / CSFML cmake broken?
« on: January 08, 2014, 08:45:13 pm »
I've built CSFML on windows few times and it has never been smooth (as opposed to SFML). This solution sort of works, but is ugly.

My steps:
1. Clone both repos to some folder
2. Configure, build and install SFML to C:\Program Files (x86)\SFML with VS2012 as x86 shared release.
3. Configure CSFML in cmake:
a. add CMAKE_MODULE_PATH as C:\Program Files (x86)\SFML\cmake\Modules
b. Result:  SFML found but some of its dependencies are missing ( FreeType GLEW libjpeg
c. Add SFML_ROOT as C:/Program Files (x86)/SFML - why FindSFML needs standard path?
d. Result: Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY

EDIT: Ok, I get it: SFML should be static, and CSFML shared. Perhaps some helpful message when trying to build shared on shared? And SFML_ROOT should not be needed if library is in default directory.

3
SFML projects / Virtual machines - MIPS and OR1K
« on: December 03, 2013, 10:35:15 pm »
I took some abandoned project of MIPS simulator, ported to SFML and improved a lot. It runs elf files compiled by gcc and has ports for video and keyboard you can use from the inside.

https://bitbucket.org/krzat/mips/overview [C#]
Check the link to download MIPS compiler for windows.

Example code (MIPS.OS) contains some basic graphical code and a console:

4
SFML projects / SFML.Utils - extensions for SFML.Net
« on: February 09, 2013, 10:17:52 am »
Source: https://bitbucket.org/krzat/sfml.utils

It's a library with extensions to SFML.Net types + some useful for gamedev classes.

Features:
* Vector extensions: conversion, dot, projection, comparision, rotation, angle, length, direction(normalization), bounding rectangle
* Rect extensions: Bottom, Right, Position, Center, AABB from vectors, depth of intersection
* Spatial partitioning: quad tree, grid, hash
* Game class with basic game loop
* TileMap renderer
* SpriteBatch
* Texture.Update with Color[]
* Misc: measure execution time of method, assert(throws exception), conditional break
* Fast sin and cos
* Content manager

5
SFML wiki / [C#] TileMap renderer
« on: January 10, 2013, 04:58:08 pm »
Source: https://github.com/SFML/SFML/wiki/Source:-TileMap-Render

It's a tile renderer that doesn't pre-allocate vertices for every tile (useful for huge maps) and doesn't rebuild vertices every frame.

Somehow I've never seen this idea before. Instead of chunking (or creating vertex array of whole map), I use one vertex array to cover whole screen. Then I update in only when view area changed and new tiles have to be rendered.

The second trick:
if our screen has a width of 20 tiles max, then we will never see tiles 0:0 and 21:0 together. It means that tiles 0:0, 21:0, 42:0, etc. can occupy the same spot in vertex array.

6
D / OO Wrapper
« on: October 12, 2012, 10:09:05 am »
Github site: https://github.com/krzat/SFML-D
Ready to use package(windows): https://github.com/downloads/krzat/SFML-D/working_sample.7z

I have tested it on Windows(DMD and GDC), but it may also work on other platforms. To see how it works, check  the test.d file. I have also attached .bat scripts for easy compilation (GDC or DMD required).

Most of this code is autogenerated, so expect some bugs.

EDIT: new version, added network and removed auto functions
EDIT2: uploaded to git, and separated modules

Pages: [1]