Results 1 to 10 of 26

Thread: State machine - requesting advice

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    You just have to be careful on not to make it more complicated than the variable approach. Maybe i'm oldschool, but i still prefer the case-statement with variables. Main state, and possible sub-states, like:
    Code:
    TMainStates = (msIntro, msMenu, msGame);
    Actually that's all i need from states i think, most of the time. From the top of my head i cannot think of a single scenario where i'd need sub-states or more main-states than that.

  2. #2
    Quote Originally Posted by User137 View Post
    Actually that's all i need from states i think, most of the time. From the top of my head i cannot think of a single scenario where i'd need sub-states or more main-states than that.
    The place wehere I might use susbstates is right in the MainMenu for handling sub menues (New game screen, Save game screen, Load game screen, Options menu, Credists screen, etc.)

    You are handling your games by only using three states? Where do you do initialization and finalization parts? Please don't tell me that you are one of those guys who make games in a way that every ingame resouce gets loaded a t the verry start of the aplication and not only when they are needed to.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •