wood burning stoves 2.0*
The moose likes Game Development and the fly likes Questions about basic game architecture Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Questions about basic game architecture" Watch "Questions about basic game architecture" New topic
Author

Questions about basic game architecture

Daniel Zuckermann
Ranch Hand

Joined: May 14, 2012
Posts: 50
Hello people,
I am trying to build a very simple and basic 2D game where the main focus lies on good architecture. I would like to implement it as a state machine with at least the following states:
- running
- paused
- stopped

However, more states could make sense, but I don't know which function calls or behaviors should be modeled as new states. Example: While the game is running, the user clicks on the settings panel to change some settings. Do I need a new state here or would the game just switch to the "paused" state? Would it be a better idea to disable the settings panel while the game is running?
Can every GUI view be seen as a new state or would that be overkill?

I am not sure if a concrete state should better be a subclass of an abstract state class or implement a state interface. It could also be interesting to save the game state persistently in a file so that the game can be resumed after rebooting the machine, but I don't know how complicated this is and if there is some kind of helper API out there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Questions about basic game architecture
 
Similar Threads
Finite state machine implementation
State Pattern
Some doubt regarding the Spec decript the MIDlet state change
Parallels vs. VMware Fusion vs. BootCamp
How to design a game?