This content has been marked as final. Show 1 reply
I was thinking of having a class one for each screen, but many screens means many classes. I am not even sure how to start with the titlescreen as i am completely new to J2ME.No, that is not what you want. Like you should always do in programming, do-not-start-with-the-code. Very bad practice!
Start with a piece of paper and draw some simple screen designs. Menu, in game screen, control widgets, etc. Get something visual going quickly.
Next, Use some proper non-programming related terms to describe the game and stick to them. You do not have screens, you have rooms. Each room has doors in its walls which leads to another room. All the rooms together form a maze. Each room has different properties. It can have 1-4 doors, it might hold an item, a trap, an enemy, etc.
Given from the short description I have given you, you should already be able to distill a simple design. You can already easily identify two main classes: Maze and Room. A Maze consists of rooms. Each room links to 1-4 other rooms through a door. Each room has zero or more elements in it which are different from room to room. You will want to be able to control per room what it contains. I smell a simple grid based data structure; but then you still need a way to actually create the data for the game. There are two basic options: create a level editor, or auto-generate the mazes based on some simple rules. The latter would be the best choice in this case, as you get endless levels. The former has the benefit of having precise control over the design and difficultly of a maze.
Auto generated levels become more difficult when you want to add an option to save progress though, as you'd need to be able to not only recreate the level (hint: generate based on a seed) but also restore the progress that the player made in that level. Its up to you really.
When you have your game fleshed out, its time to start taking the technology into account. You'll have a nice set of functional and technical requirements that you need to fulfill; a good resource on J2ME game programming will probably help you to fulfill most of them. Don't expect to just be able to do this, you'll need to study J2ME a lot and probably do a whole set of test and play programs before to figure out how to do even the simplest things. I recommend you get a good book in stead of trying to piece it together using the internet, in moments like this you need something coherent in stead of something as fragmented as the web.