Jump to content
  • Advertisement
Sign in to follow this  
ViperG

2D Games and Display Lists

This topic is 4904 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

Write now my game blackskygame.com is drawing everything in imediate mode, but I was looking at display lists and they look pretty easy... Quesiton is weather or not Display Lists will help a 2d Game? What would you guys recommend? Right now the particles are what kill my fps the most? would they do better in a display list or vertex array?

Share this post


Link to post
Share on other sites
Advertisement
I suppose you are using OpenGL?

Display lists are used for static geometry and some other things such as state changes... For a particle system I recommend vertex arrays over immediate mode. The overhead of calling OpenGL commands is most likely killing your performance.

Share this post


Link to post
Share on other sites
Quote:
Original post by skanatic
The overhead of calling OpenGL commands is most likely killing your performance.


Nah, i've tested it. it's not a serious issue. I've done immediate vs display lists for things like tile arrays and it doesn't seem to make any huge impact on the rendering. Really, the geometry of such things is not very complicated, especially in a 2D game where pretty much everything is a simple textured quad.

That doesn't mean that display lists can't be helpful, but as mentioned, it's really only for static geometry. Things that change from frame to frame might really be better off in immediate mode.

Share this post


Link to post
Share on other sites
Ok thanks for the reply. I'll mess around with vertex arrays and see what they do.

I did test my particle system, I was using state changes vs directly coding the coords, and the state changes were only like 1-5 fps slower that I could tell when I was running in the 250 fps range.

If I was doing a really advanced 3d game id do all that, but the biggest thing that improved performance is when I did multitexturing, it almost doubled my fps vs blending 2 quads.

Really the reason my particles kill my fps is that since im doing blending and drawing soo many it just slows down the game a little bit. I'll see what I can do to optimize them.

Share this post


Link to post
Share on other sites
Quote:
Original post by ViperG
Really the reason my particles kill my fps is that since im doing blending and drawing soo many it just slows down the game a little bit. I'll see what I can do to optimize them.


Are you using the "new" point sprite extension for your particle system? If not you might want to give it a try.

There are some nice hints in the "Red book" on how to effiently use display lists.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!