Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am creating a game using C#, GDI+ and Raster images (2D images). For performance sake, I believe that I should have the game change the user's resolution to 800 x 600 and run the game in that setting. However, the graphics look distorted in a wide screen since the aspect ratio for 800 x 600 is different than from a wide screen. I cannot figure out how to determine the aspect ratio.

How is game programming normally handled on different resolutions? Should I even change the user's resolution? If I dont change the resolution, the game slows down a lot.

Also, some wide screens will "maintain the aspect ratio" when changing the resolution to 800 x 600 (thus creating black bars on the right and left) and some wide screens will fill up the entire screen. How do people handle that situation??

share|improve this question
    
Why deal with this performance hit? Any reason you considered and rejected XNA? –  Jonathan Dickinson Oct 31 '11 at 11:44
    
I already got into GDI+ before I heard about XNA. The game is half way built. Is XNA that much better? Is there not perf hit to XNA? I don't know much about it. ------ I continued looking around. I think ppl either use a 800 x 600 aspect ratio if the screen is regular, otherwise they use 1280 x 720 for wide screen. –  CRobinson Oct 31 '11 at 12:02
3  
Don't forget about 5/4 screens and others. You will need some general solution. –  Krom Stern Oct 31 '11 at 12:19
    
@CRobinson XNA is hardware accelerated - you should really put some research into it, and it is 10x faster to make something in it compared to GDI+ (once you learn it) - especially for 2D games. –  Jonathan Dickinson Oct 31 '11 at 12:22
3  
Why not just add a black border instead of changing the resolution. Movies get away with this all the time. –  Tili Oct 31 '11 at 15:28

1 Answer 1

In your current situation I would advice to get device resolution that is most similar to your planned resolution or slightly bigger than it (800x600 -> 1024x720) and deal with it manually. Add black areas on sides or some artistic patterns that complement your game.

As already said GDI+ is not a common approach to 2D game nowadays, but the general principle of dealing with various screen aspects still stands.

share|improve this answer
    
Thanks for all the advice. I'm pretty new to this. What are some good books on XNA? Probably a stupid question, but is XNA backwards compatible to Windows XP? –  CRobinson Oct 31 '11 at 12:51
    
That question I can't answer here. I'm more of an OpenGL guy. –  Krom Stern Oct 31 '11 at 12:58
    
... I should add that although I'm new to game programming, I'm not new to programming. I did application development for 12 years. So I wouldn't need a book that's too basic. –  CRobinson Oct 31 '11 at 13:06
    
Take a look at this question: gamedev.stackexchange.com/questions/19141/… –  Krom Stern Oct 31 '11 at 13:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.