Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 14 years ago

Last modified 12 years ago

#110 new enhancement

Context-Switching

Reported by: bensch Owned by: patrick
Priority: critical Milestone: Old Orxonox tickets orx-v0
Component: GeneralFramework Version:
Keywords: context switch Cc:
Referenced By: References:

Description

Context-Switching

idea

currently we are using singleton-classes, to render the scene, draw all enemies, collisions and so on.

The idea of context switching is, that by modifying the NullParent to be switchable, we can just enter a MenuScreen, and switching back, after we are finished.

implementation

since this is a State

  • extend state.h to hold the entire state of the current Level.
  • create a Stack where the current state can be pushed in, and a new one can be overlaid.
  • Not much must be Stored.
    1. NullParent-reference
    2. Current Camera
    3. Current World
    4. some more minor things

The idea is not, to switch to an entirely new Level, and change back to the first one, but to change to a menuscreen, and back again.

This is just state-preservation.

Change History (3)

comment:1 Changed 14 years ago by patrick

  • Milestone changed from 0.3.9 to 0.3.7_gui

comment:2 Changed 13 years ago by bensch

  • Milestone changed from 0.3.7_gui to future-tasks
  • Type changed from defect to enhancement

do not think, that this is possible in conjunction with ClassList (maybe if we get away from it again, but it is so convenient :) and we do not have time to switch 1000000000 times… )

comment:3 Changed 12 years ago by bknecht

  • Milestone changed from Features to Old Orxonox tickets

Milestone Features deleted

Note: See TracTickets for help on using tickets.