Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Thermopylae

Speeding up my side-scroller and adding parallax layers

This topic is 5932 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a side scroller, currently I get about 110 FPS on my iBook 500 (with the speed limiter off, obviously) now that's drawing 108 textured quads, plus some UI stuff. Now 108 quads isn't a lot, and especially when I scale the scene out and, say double the number of drawn tiles, the framerate is halved (of course), but that is getting a bit low, isn't it? I am now looking into how to add a scrolling background image (parallax style), but by doing so will drop my frame rate even more. The easiest way seems to be tiling a 512x512 texture (since my card doesn't support non power of 2 textures) but that seems a bit clumsy too. I have experimented with vertex arrays, display lists, etc. But I can't seem to improve the perfomance. Currently I'm doing the traditional loop and draw all tiles on screen via GlBegin(GL_QUADS) GLVertex.... glEnd(), which is surprisingly still the speed champion. I'm not translating to every tile, instead I do one initial translate to the map offset, then draw the tiles incrementing the vertex positions. I could use display lists, but unless I made them much larger than the viewable area I would need to re-make them frequently. And if I did make them that much larger it would me more geometry to crunch per frame. Should I use seperate buffers? Or what? My experience in programming has always been of the old fashioned dirty-rects and blitters, so OpenGL is something of a new paradigm. So, what are the best practices for making parallax type scrollers in OpenGL? Thanks! [edited by - Thermopylae on September 16, 2002 3:38:45 PM]

Share this post


Link to post
Share on other sites
Advertisement
>> have experimented with vertex arrays, display lists, etc. But I can''t seem to improve the perfomance. Currently I''m doing the traditional loop and draw all tiles on screen via GlBegin(GL_QUADS) GLVertex.... glEnd(), which is surprisingly still the speed champion.<<

not surprising at all u are fillrate limited using vertex arrays VAR display lists, passing everything in world coordinate etc etc is NOT gonna help.
didnt i just post in these forums about fillrate (check recent posts)
with fillrate theres not much u can do, check the opengl faq (www.opengl.org) for some help (maybe?)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!