Jump to content
  • Advertisement

Archived

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

leiavoia

SDL Games: ideal screen res and optimistic fps (what are you getting?)

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

Pretty simple questions: 1) For an SDL-based game, what''s the "normal" frame rate to have? 2) What would be the "ideal screen resolution"? I''m creating an SDL-based side scroller, somewhat like Super Metroid. I''m just toying around with the blitting and layering and such, and looking at the frame rates as i do. Seems i get 40-45 fps at 800x600 by blitting a background bmp image to the screen every frame. i only get 25-30 @ 1024x768. That''s with no game logic, just blit-loops. I wanted to know what people are using for their games and whether they would have done it differently. I''d like the higher res in my game, but it chunks up the framerates. I like the smoothness of the 800x600, but not the size, especially fullscreen. But the real Super Metroid was only TV resolution (very small), and it was a great game...

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
If you are using lots of aplha blending (transparency) SDL is not a good choice. I remeber reading on the SDL newsgroup a while back that SDL is not well suited for that.

One of the code maintainers suggested using OpenGL for those kinds of apps.

Share this post


Link to post
Share on other sites
Blitting a bmp vs a png will only be significant if you didn''t convert the surface to the proper format first. The way the image is stored on disk should have no relevance to your performance.

Remember SDL is a 2D api and you don''t get much acceleration from that. I think you can expect frame rates of between 30 and 60fps for 800x600, and no higher than 50fps for very simple scenes at 1024x768.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]

Share this post


Link to post
Share on other sites
PNG images loaded with SDL_image are automatically converted to the alpha-blended type surface, that''s what i was getting at. For me, i usually don''t convert surfaces manually. If i need alpha blending, i just load a PNG graphic and let SDL do the rest.

Share this post


Link to post
Share on other sites
I almost ALWAYS convert the loaded bitmap to the same pixelformat as the screen.

maybe its superstition, but it SEEMS like it SHOULD be a lot faster....

Share this post


Link to post
Share on other sites
Are there any resources on the net for developing 2D games with OpenGL? All i can find is 3D related items. I''ve not started to learn OpenGL at all yet, but would be interested. But i''m not interested in super-cool 3D yet, since i don''t want my project to get overly complicated.

Share this post


Link to post
Share on other sites
just dont blit every single frame unless you absolutly need to blit. that alone will allow your frame rate to go up much higher.

Share this post


Link to post
Share on other sites
that is good advice and my technique on my current project: a TBS game with lots of menues. However, my current project is an action game. I''m experimenting right now with particles and explosions (the fun stuph :-), so not blitting each frame is not an option for most situations in this game. Although i understand what you are getting at.

Share this post


Link to post
Share on other sites
If you want to learn OpenGL, just download the redbook from the articles & resources and look up on glOrtho(). The Ortho mode is perfect for 2d rendering where objects which are further away dont appear smaller.

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.

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!