First hello all here!
I'm a French game programmer (3 years of pro experience) who discovered SFML through a friend a while ago while searching for clean and fast-to-setup library for game developpement.
I'm working currently on two different projects using SFML: the first is an original board game (I mean like Reversi, not like Warhammer :wink:) and the other a much more ambitious game, not yet completely designed, but it will feature a very rich world, with active 'wild life' / NPCs and some music-based gameplay. Both projects have professionnal/commercial ambition.
(Now the history/blog part
) I'm coming from Allegro (great, but integration with OpenGL was still lacking last time I checked), then I considered SDL (seems very feature complete, but didn't appeal to me much), then found SFML.
So far, I'm quite satisfied with it, it's straightforward and working as it should whether I need OpenGL or use its 2D rendering facilities. So thanks to the developer(s) for that!
Now after the praise, some remarks. :twisted:
I've not read the whole forum(s) to check if somebody already made all them, sorry if it is the case.
+1 on the following feature requests :
- change window icon
- add a file archive support (not critical for me)
- basic collision detection in sf::Sprite (ie sprite bounding box overlap)
- animated sprite support
There is something I'm unhappy with ATM, it's the RenderWindow / Drawable tie in.
From what I understand, the only way to render a Drawable is by using RenderWindow::Draw(Drawable). Furthermore, there is no facility (collection) of Drawable in the RenderWindow (or elsewhere). So it means, to render my entities, I have to loop through them, get their Sprite instance and draw it using my window.
What I'd like to do, is have my entity class hold its own rendering code (ie a virtual Render() method), which can be either simply displaying a Sprite, or some OpenGL stuff, or something else (if I use a model library for instance).
I can do just that of course, but then I have a dependency on RenderWindow in my class (the obvious way is to have either a reference to the RenderWindow instance stored in the entity class, or passed to Render as a parameter). This raise two issues for me. First if I don't use the RenderWindow in my Entity::Render() (which should be the case in most entities after first prototyping is over), I still pass/store useless references, secondly, it makes the class itself dependent on SFML, something I want to avoid since I aim at easy portability to different platforms.
What I'd like would be the ability to call a Sprite.Draw() method, without a RenderWindow instance, the way I can make calls to OpenGL. It would be perfectly OK to call a method in RenderWindow before and after that, like this:
RenderWindow.SpriteBatchStart()
foreach Entity in World
Entity.Render()
RenderWindow.SpriteBatchEnd()
Currently, I'm avoiding this by referencing a global var, which isn't very pretty (extern RenderWindow *g_RenderWindow...).
About the Sprite class specifically now, it don't seem to have a 'hotspot' feature (maybe that's what is noted as 'fixed' in roadmap?), so I must add for instance half its size to the object coordinate before drawing. It hasn't got animation features as far as I know, so I'd have to switch Images myself, hold timings and hotspot information, etc if I want to use animated sprites. Neither has it got 'module' features, ie combining different parts/images, which is very useful for some kinds of games.
The conclusion to this is: currently, the sf::Sprite class is either too 'heavy' for me, if I want to control it from my code (it contains useless position information), or too 'light', if I want it to do all the stuff I need.
One question to finish this post, are there plans to include tilemaps/tilesets facilities, if not, how would you implement them using SFML? Using lots of Sprites? Or OpenGL quads?
Thanks for reading this long post
and for any answers.
Be assured I appreciate the great work on SFML so far despite my criticism!