Results 1 to 4 of 4
  1. #1
    Xzar is offline Member
    Join Date
    Nov 2012
    Location
    Victoria, BC
    Posts
    14
    Rep Power
    0

    Default State Based Game

    How do I go about making different states for a game. The states will include the main menu, options menu, in game, paused, and multiple other states.

    Let me know if you need more info. Not sure what else to say

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: State Based Game

    Those would just be views. You could model them individually if you like.

  3. #3
    Xzar is offline Member
    Join Date
    Nov 2012
    Location
    Victoria, BC
    Posts
    14
    Rep Power
    0

    Default Re: State Based Game

    Can you point me in the right direction? I don't know where to look and google has been unsuccessful

  4. #4
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Location
    VA
    Posts
    1,323
    Rep Power
    6

    Default Re: State Based Game

    It's just OOP. There is no specific guide, you could design it a hundred different ways.

    One way might be that every "screen" you see is some master class called a "View" or "GameView" or something. Then you could subclass this master object with subtypes that are specific to your needs - like button views for showing main screen, options, settings, etc... or a List view for showing things like credits, high scores, instructions, etc... and a gameplay view that allows user interaction and the drawing of the gameplay screens.

    This is more a modeling exercise than an implementation one - once you have a plan for how it's to be modeled, the implementation should be rather easy.

Similar Threads

  1. Managing my Game State... suggestions?
    By 0026sd in forum Java Gaming
    Replies: 5
    Last Post: 12-07-2011, 08:06 PM
  2. Replies: 2
    Last Post: 02-14-2011, 02:27 PM
  3. dynamically populate the city combo box based on the values of state combo +ajax+jsp
    By sandy1000 in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 12-29-2010, 10:00 AM
  4. Replies: 2
    Last Post: 08-05-2010, 04:49 AM
  5. Question about creating a Game State Manager
    By nolsen01 in forum New To Java
    Replies: 1
    Last Post: 03-05-2010, 10:23 PM

Posting Permissions

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