Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm making a platformer game and I'm having some trouble wrapping my head around how to organize my classes. I'm wondering what the best way to have everything interact would be without passing parameters all over the place. I've heard of MVC, but does this apply? Should I look into it more?

Thanks in advance

share|improve this question
Nothing wrong with passing parameters. The key is to start, dont think about perfect designs, start and refactor once in a while. You learn from making mistakes, so go ahead and make mistakes, dont try to prevent them. – Maik Semder Jul 16 '11 at 19:23

There are no special rules for a platformer vs. any other game in this respect. I suggest that you just start making your game. You'll make a lot of mistakes, but hacking the game together while staying conscious of what one can do better is how I learned to create clean, organized code.

Here are some patterns that you should be aware of when making your game:

Two or three games from now, you'll be applying the principles that I linked to, and you'll be organizing your code better as a result of seeing how it all ties together from experience.

Another important point is that many people developing a game in their spare time do not finish it. Hacking your platformer together at the cost of a less than perfect code base might actually allow you to create a finished product. Then you can clean up the engine in version 2.0.

share|improve this answer
I'm slowly learning this, I run into so many walls when I try and make the best solution for my problem, when I could have solved it in 5 minutes by writing dirtily. But almost always the experience I get after just getting the result, ends up in me being capable of making a solution better than the best and dirty solutions combined. So in short, its best to heed this advice and stick to it: get it done. – dcousens Jul 16 '11 at 13:46

Your Answer


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.