1
General / Re: Implement Timestep and Gravity
« on: April 18, 2013, 04:36:03 am »
To make your movement less choppy, look into http://en.wikipedia.org/wiki/Delta_timing
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.
c:\sfml2>cmake -G "NMake Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=FALSE -D STATIC_STD_LIBS=TRUE -D SFML_STATIC=TRUE c:/sfml2
for (unsigned int i = 0; i < 3702; i++)
3702 tiles are not a trivial task to draw and this for every frame.
I'm not sure if you're moving your tiles inbetween. If you don't, I'd suggest you render all your tiles onto a sf::RenderTexture and then just extract that texture. With that you only have to make once those 3702 draw calls and afterwards just draw the extracted texture with one call.
The other way would be to use sf::VertexArray and map your tile textures onto the vertices. With that you'll also only have to make one draw call and you'll gain much performance.