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'm just starting out as a game developer and have created a few crappy but playable clones of classic games like pong, and bomberman. Being self taught (bless the internet) I do this by just stuffing in code to make the games work.

Now I feel the time has come to create something complete, for this I need to know how a game is structured. I've searched on the web but there isn't that much to be found. The only "high-level" language I know is javascript so reading a tutorial or article based on C++ doesn't help me that much.

I'm looking for good resource's pedagogically covering the theory and possibly examples (in Javascript or pseudo code that is understandable for a beginner) of how the game pieces fit together.

From the start screen to asset loading and running the game loop. I'm not looking for anything complicated like reading through a 4000 line source code. All I want to learn is where, how and when the main parts of every game should be called.

If you know any good resources to share, or maybe even have an answer for me I would deeply appreciate it.

share|improve this question
    
Games are structured in many different ways depending on your needs, your tech, and your personal coding style. And the best way to optimize is to profile what you already have. This question isn't really answerable. –  Tetrad Apr 2 '12 at 7:18
    
Did you even read the whole post? "I'm looking for good resource's pedagogically covering the theory" how is that not an answerable question? a link would be enough... –  hustlerinc Apr 2 '12 at 7:22
3  
Hasty to close this IMO. There is plenty of advice to be given about creating good event loops plus plenty of advice on creating optimal and efficient JavaScript. –  Tim Holt Apr 2 '12 at 7:36
1  
That's not actually comparable, asp.net has alot of information available, and has been around for a while. Whereas HTML5 in game-developement is pretty much newborn. And information is difficult to find. Also the question you linked asked for BEST practices, I'm just asking for some basic GOOD practices. And the specific problem: The missing information about HTML5 games. I could find alot of questions that are broader than this subject that are left open and have several votes. And atleast 3 people agree with me. –  hustlerinc Apr 2 '12 at 20:28
1  
If you have a question about the main game loop in an HTML5 game, ask that question. If you want to know how to load assets, ask that question. Same thing for a "start screen". Or how to profile an HTML5 game. Or how to optimize a specific set of functionality. But bundling it all together and asking "tell me how everything all sticks together", I think, is a bad question because it isn't specific enough. –  Tetrad Apr 2 '12 at 23:15
show 6 more comments

closed as not a real question by Tetrad Apr 2 '12 at 7:18

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.