SFML community forums
General => General discussions => Topic started by: Atani on September 12, 2012, 07:18:28 pm
-
I am new to SFML but not new to programming, games, C++ etc. I have been writing software for nearly 20 years now, starting in C and progressing to C++ (limited usage of STL at the time), ASM (x86) and later Java (last 8 or so years). I have written software for multiple platforms in native C/C++ code, most interestingly for the Sega Dreamcast. For a few years I was maintaining a cross platform C++ based framework (Tiki) that was started as a spin off of a similar library that was part of KallistiOS (libtsunami). Tiki used native OpenGL calls and works well but is a bit more complex than I need for my current game ideas. In addition to games development (starting off in days of BBS dialup systems and text interfaces) I also used to write and port emulators on/to Windows. Many of them have not been touched in over 10 years and when I look back at the code I did write way back then I see way too many WTF snippets to count and many instances where STL would have been a lot simpler!
I am looking at using SFML as a basis for a simple game engine of sorts for a few 2D and 2.5D games I have planned out. For the 2.5D rendering I am planning on using some of the tutorials and working them in with some of my older code which handled the isometric rendering on the Dreamcast using native PVR calls (very similar to OpenGL except Y and Z are flipped). I will also be leveraging Tiled and develop a more feature complete map loader for this using any available code as a base for this.
Mike
-
Hi! You have got a really interesting story to tell :)
You say you plan to write a simple game engine, so I mention a few active projects which might help you not to reinvent the wheel:
- Gregouar's 2.5D lighting engine (http://fr.sfml-dev.org/forums/index.php?topic=7527.0) and his game Holyspirit (http://fr.sfml-dev.org/forums/index.php?topic=7513) (it's in French though).
- Let There Be Light (http://en.sfml-dev.org/forums/index.php?topic=6635), a 2D light and shadow system
- GatorQue (http://en.sfml-dev.org/forums/index.php?topic=5056), a game engine
- SFGUI (http://en.sfml-dev.org/forums/index.php?topic=6112) and TGUI (http://en.sfml-dev.org/forums/index.php?topic=7023), graphical user interfaces for SFML
- Zoost & Zoom (http://en.sfml-dev.org/forums/index.php?topic=8026): Geometric objects, curves, animations
- Thor (http://en.sfml-dev.org/forums/index.php?topic=7329), my own project: Particle systems, resource, event and time handling, vector algebra and other things
For the WTF snippets, I basically experienced the same thing when I learned to develop with STL and modern C++. You'll be happy that in this respect, SFML has a very clean design ;)
-
Thanks for the helpful project resources. I do plan on leveraging what I can that others have already developed, including Thor :) I did a git clone about an hour ago of Thor and only ran into one minor problem with the cmake files. I generated the VS10 files using cmake-gui and gave it the path to SFML and for some reason the generated VS10 solution did not have the SFML references! At least that was a simple fix of just adding SFML/include and SFML/lib/<mode> to the paths and libs. I will dig into why cmake-gui didn't generate it right later.
As for the list of projects... Gregouar's engine looks pretty awesome, going to dig into that a bit first. GatorQue I am not sure about, I can see it being very useful for general 2D games but not necessarily for 2.5D that I have planned. I do need to deal with the GUI at some point as well, is there a benefit of using SFGUI over TGUI (or other way around)? I will check out Zoost & Zoom as animations are an area I will need as well, most of which can be done with a simple sf::Sprite list and increment an iterator with each frame as needed.
So far SFML does have a clean design and the only thing I am not overly fond of but can deal with is the multiple lib files created. I know why it is done this way (IE:not all projects need everything) but for a project that consumes the majority of SFML its easier to just list a single library. Also with most modern linkers you can do conditional linking and exclusions for pieces you don't need.
Mike
-
I did a git clone about an hour ago of Thor and only ran into one minor problem with the cmake files.
Hm, have you followed the tutorial (http://www.bromeon.ch/libraries/thor/v2.0/tutorial-installation.html) on my homepage?
I do need to deal with the GUI at some point as well, is there a benefit of using SFGUI over TGUI (or other way around)?
I took a look at SFGUI some time ago, I don't know TGUI at all. TGUI is a younger project, but I don't know the two GUIs enough to compare them.
I will check out Zoost & Zoom as animations are an area I will need as well, most of which can be done with a simple sf::Sprite list and increment an iterator with each frame as needed.
I think Zoost & Zoom focuses on animations of complex geometric objects (like bezier curves or concave polygons), I don't know if it directly interacts with sf::Sprite. But I have also written a class thor::FrameAnimation which should provide what you describe, namely a list of frames that are applied to a sprite. There is a corresponding example in your GitHub clone.
-
Hm, have you followed the tutorial (http://www.bromeon.ch/libraries/thor/v2.0/tutorial-installation.html) on my homepage?
I just looked it over and I followed the same steps as describe there. No real clue why it didn't generate properly but will dig into that soonish. I have a working setup now with the missing SFML refs in place for VS10.
I think Zoost & Zoom focuses on animations of complex geometric objects (like bezier curves or concave polygons), I don't know if it directly interacts with sf::Sprite. But I have also written a class thor::FrameAnimation which should provide what you describe, namely a list of frames that are applied to a sprite. There is a corresponding example in your GitHub clone.
Ahh, yeah that is a bit more than I need (for now) but still a cool set of projects. Using thor::FrameAnimation seems like a perfect fit for what I will need.
Mike
-
GatorQue I am not sure about, I can see it being very useful for general 2D games but not necessarily for 2.5D that I have planned.
Hello,
I am a contributor and user of the GatorQue Engine. I just wanted to point out that I've done 2.5d and 3d stuff with the engine in the past using pure OpenGL calls, as far as I know it still works just fine with 3d. Just thought I would point that out :P.
Here is some example screen shots.
(https://dl.dropbox.com/u/26522674/Screenshot-1.png)
(https://dl.dropbox.com/u/26522674/Screenshot%206.png)
(https://dl.dropbox.com/u/26522674/Screenshot-2.png)
Just thought I would Point that out. Ryan has really done a wonderful job on the engine, It has made my Programming projects a lot easier.
-
Thanks Cloudncali. That looks pretty awesome. I will need to take a closer look at it then. I did a very quick review and did not see anything about 2.5D... I will give it a whirl and maybe send back some patches.
Mike
-
No problem. I know we are lacking a bit of tutorials at the moment, if you have any questions feel free PM or Email me at
cloudncali@gmail.com
If you want to see a project using SFML you can check out my project burgled.
http://code.google.com/p/burgled/
Burgled is going be changed into a different game soon, but ill keep this up for an example.
-
I did a very quick review and did not see anything about 2.5D...
I'm not sure what this was referring to, but indeed SFML itself doesn't provide any functions for 2.5D handling, but since this is mostly a logical part it's obviously not the task of 'lower level' library like SFML to handle it.
SFML's graphics API basically simplifies the loading and drawing of primitives in a 2D plane. On the other hand it's possible to use custom OpenGL calls whenever needed or to simply let SFML create the OpenGL context & window and then go on with pure OpenGL. ;)
-
I did a very quick review and did not see anything about 2.5D...
I'm not sure what this was referring to, but indeed SFML itself doesn't provide any functions for 2.5D handling
This was in reference to GatorQue... SFML provides a basic framework for graphics, input, output, etc. It does not (and should not) handle anything beyond that basic framework. For the case of my game I am needing a bit of a small layer on top of the framework to render in 2.5D and provide a HUD like interface. Both of which are not things that SFML should provide necessarily. There are enough tutorials online to get SFML to do the 2.5D as well as load Tiled maps so that is not a problem, the HUD is another rather simple problem to solve as it can just be another set of textures with positional rendering for overlays.
Mike