Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 16 years ago

Closed 15 years ago

#291 closed enhancement (invalid)

Extend GameStates

Reported by: rgrieder Owned by: nobody
Priority: minor Milestone: Version 0.3 Codename: Castor
Component: Control Version: 0.2.0
Keywords: GameState Cc:
Referenced By: References:

Description

The GameState implementation in Orxonox is currently not ready for practical use, especially with the GUI. Currently there are only an "enter" and a "leave" function plus a state transition algorithm. This concept has a serious issue: You cannot load a GameState without entering it. For instance it would be very useful to load GSGUI (GUI GameState) in advance so that entering it requires only very little time.
A suggestion to solve this problem would be to introduce a "load" and an "unload" function, also implemented by the GameState class. The idea is that we will be able to load and unload an arbitrary GameState (with all its parents) from anywhere in the GameState tree, maybe even with console commands. State transitions will stay the same as before.

As a direct consequence to this change we have to rethink the concept in the GUIManager because most of it's code can simply be put in the load/unload functions of GSGUI. There still has to be a mechanism to choose the right GUI sheet. That may require some more thinking…

Change History (3)

comment:1 Changed 16 years ago by rgrieder

Rewrote the GameState concept. But there's still the issue with load/unload. Otherwise things seem to be pretty much finished.
Maybe somebody can address the problem of WHEN loading WHICH game state. It is very much a conceptional question, so it will require some thinking…

GUIManager problem has been resolved as well.

comment:2 Changed 15 years ago by rgrieder

Implemented load/unload by using c'tor and d'tor. All GameStates requiring graphics are now constructed AFTER graphics have been loaded.

comment:3 Changed 15 years ago by rgrieder

  • Resolution set to invalid
  • Status changed from new to closed

All the work I've done so far have led to the conclusion that c'tor/d'tor and activate/deactivate is about all we need so far.

Note: See TracTickets for help on using tickets.