Search code examples
oopgame-engineooad

Code design for a 2D game


I am in need of some resources on how to design the main components of a basic 2d game. Let's call it an "engine". How should I design my renderer, scene manager, entity manager a.s.o. and how should they interact with each other? What about event management, resource management, ...

Maybe someone has some cool UML? Or any "tutorial"? Some general hints and tips?


Solution

  • I've actually also struggled some in order to get a hold of some good tutorial for a while. I found tons of mediocre sites with working game-code but lacking explanations.

    What helped me the most was probably just skimming through game code I found casually looking around, and also reading the chapters of the book on this site: Killer Game Programming with Java

    You can find some game-code to look through on these sites:

    http://www.cokeandcode.com/info/tut2d.html

    http://www.javacooperation.gmxhome.de/TutorialStartEng.html

    Hope you found this helpful!