Just a word on SFML performance in drawing a lot of sprites:
I have a benchmark for my engines that creates 500 animated objects, each with an independent and quite complex (voluntarily unoptimized! It could easily be!) move sequence that is computed in Lua. I get about 35 FPS. A simpler move sequence gives me around 110 FPS.
I was curious so I programmed a little profiling lib today and checked where the horsepower was going:
- 95% of the time is spent calculating the next frame.
- Which means only 5% of the frame is spent drawing.
- Out of the 95%, about 1 or 2% is checking keyboard/mouse/window events
- I'd say 2% for the engine itself (collision detection, etc.)
- 90% spent computing the move sequences (it's sequential, unoptimized, very complex and goes through a Lua interpreter, but still that's the kind of complexity you could easily get for a "whole city" above
.
Even better, I have an option on my engine that separates the update from display, and thus on a dual core display doesn't even matter at all.
That's to say: Don't worry too much about drawing lots of sprites, that's maybe not your bottleneck thanks to SFML.