Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

How would you do this?

Thread view: 
Jeff - 03 Jan 2006 17:03 GMT
This article describe a simple mobile game:
http://www.javaworld.com/javaworld/jw-08-2004/jw-0809-j2me.html
But how would you have implemented a simple game menu in this game. With a
game menu I mean a canvas showing off some selections....

My suggestion is this:
myCanvas.checkKeys calls a public method in the Jump class (midlet class).
This method calls the myGameThread.pauseGame().. and then opens another
canvas and give it focus....
But I'm not sure this is the correct way of doing it, so I would like to
know how you would have done this?

Jeff
Oliver Wong - 09 Jan 2006 20:35 GMT
> This article describe a simple mobile game:
> http://www.javaworld.com/javaworld/jw-08-2004/jw-0809-j2me.html
[quoted text clipped - 7 lines]
> But I'm not sure this is the correct way of doing it, so I would like to
> know how you would have done this?

   Almost every game I build is based around a hierarchical state machine.
A in-game menu is just another state that gets pushed onto a stack of
states. When in this state, the game world does not get updated (so a
monster can't kill you while you are adjusting your sound volume, for
example), and when the user is done, the state just gets popped off the
stack, and the user is right back exactly where she was in the game. With
this system, the game can be paused and the option menu accessed at any
moment; even during cutscenes or the loading screens, for example.

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.