XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Menus and game logic question (NetworkStateManagement sample)

Last post 04-25-2008 10:16 PM by Tuork. 2 replies.
  • 04-25-2008 9:07 PM

    Menus and game logic question (NetworkStateManagement sample)

    A group of friends and I have been working on a small project for some time now and we recently added menus and whatnot to the game, basing ourselfs on the NetworkingStateManagemente sample on the site.

    So far everything is working, but I am left with the doubt, should the game logic be inside the "GameplayScreen" class? Isn't it a bit weird to have program logic inside the "interface" (as in Graphical interface)??

    I've programmed for quite a while now, and I've almost always made a clear distinction between program logic and the interface. A-la-MVC model, if you will. This is probably why this seems a bit off to me.

    Anyone care to enlighten me on the situation?

    many thanks.
  • 04-25-2008 9:30 PM In reply to

    Re: Menus and game logic question (NetworkStateManagement sample)

    Answer

    The classes in the example are poorly named. It is a "Game State" sample and all of those "xxxScreen" classes are actually game states. The GamePlayScreen class should have been called GamePlayState. As a state, it's perfectly fine to have game logic there. As far as a graphical interface, they aren't. They are game states that have a graphical representation.

    That should ease your mind. ;-)

     

  • 04-25-2008 10:16 PM In reply to

    Re: Menus and game logic question (NetworkStateManagement sample)

    Well, "State" is a term I'm not really familiar with, but it does make a lot more sense now. Thanks!

    I'll get back to coding now....
    Where did I leave my coffee cup?
Page 1 of 1 (3 items) Previous Next