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.

So my game is done for now but every time it flashes on the screen and my game loop is awful. So crowded with logic.

I need to learn more about games and how they are running. My idea now is that at the heart of the game you have a while loop. Inside that you are checking for events to happen. Each time an event happens, you spawn a thread that accomplishes a task.

You then have a layer that draws on the screen the "map". Also a layer that says where objects collide. And finally the logic of how objects interact.

I am using C++ and SDL and I need a complete tutorial that takes me through a complex example to get started. I am a good programmer but have no experience with games. Any suggested tutorials would help.

All tutorials I have found so far are too easy and don't do anything worth while.

share|improve this question
    
if you are looking for a good SDL tutorial, you should take a look at Lazyfoo's but there are too many other great stuff out there. Check Other available tools before deciding to use SDL. –  Ali.S Dec 21 '12 at 21:57
1  
Tutorials being too easy indicates you don't need them. Make a game. –  Anko Dec 22 '12 at 2:21
    
What would you use if not SDL? –  Jonathan O Dec 22 '12 at 11:11
add comment

2 Answers

up vote 2 down vote accepted

The Lazy Foo articles section was a great guide for me. Obviously his tutorials are top notch for sdl but these cover other things like game loops, state machines, ai etc.

http://lazyfoo.net/articles/index.php

My game loops are just an extension of his ideas in the game loop article and its served me well.

share|improve this answer
add comment

I'm not a very good game programmer but I'll try to help you.

I suggest a very good book on game engine concepts called "Game Engine Architecture". You should definitelly read it.

And one more thing: dive into the code of open-source games like Supertux and Kobo Deluxe. Both have very good performance and well organized code.

Hope it helps! =)

share|improve this answer
add comment

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.