Menus and game logic question (NetworkStateManagement sample)

Last post 04-25-2008, 10:16 PM by Tuork. 2 replies.
Sort Posts: Previous Next
  •  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

    Re: Menus and game logic question (NetworkStateManagement sample)

    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

    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?
View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback