Classdesigne relating to games

Hey, I just finished my little Pong project and now I want to go on with a little Jump'n'Run Game. I want to make it clearly arranged, because I don't want to loose motivation in the middle of the project. So my question is, where can I learn something about Classdesigne relating to games? I don't really have an idea whether to create a new class for certain things or not. My major question is how to save the levels though?! Should I make a new class for every level?



greetings

Idealy you would have your levels stored in some sort of file format. Then you have a single class which loads the levels from the file corresponding to that level.



As to your question about how you decide which goes in a seperate class…

I usually have a very logical seperation between my classes. If things logically belong together, I put them in the same class. So everything related to the player (name, HP, score, location, …) goes in one class and then you have another class containing everything for the enemies. (Although these would probably benefit from inheritance since there is a lot of overlap between the two)

Is it possible to create the entire level in java and then export it with all the necessary stuff to a jme file? I'm using jme2.