TrainBeaser for iPhone
The moose likes Game Development and the fly likes What is happening in the background when we pause a game? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Game Development
Reply Bookmark "What is happening in the background when we pause a game?" Watch "What is happening in the background when we pause a game?" New topic
Author

What is happening in the background when we pause a game?

Kamanashis Biswas
Greenhorn

Joined: Dec 02, 2011
Posts: 8
What is happening in the background when we pause a game??? And how the game resume and starts???

Hi All of You,

Can any of my friend tell me What is happening in the background when we pause a game??? And how the game resume and starts??? in Java prospective .
I want to know the step by step scenario. I face this question in an interview . And I could not answer it properly .

Thanks
Kamanashis Biswas
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 8428

I'm not a game designer, but my guess is that some of the threads are paused.


Never ascribe to malice that which can be adequately explained by stupidity.
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 2771

Well, what I would do in Java is simply stop some sort of timer that's responsible for updating the scene, and when the screen has to be repainted, it checks whether the game is paused and draws an extra filter or text on top.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 3901
depends on what you mean by paused. in age of empires 2 you can move your view around the map, queue the production of men ,give orders to your men etc. in other games you cant


I never took notes in college. That's how I got a 4.0 the first 2 years, and a 3.5 the second two years.
Jj Hill
Ranch Hand

Joined: Jul 25, 2011
Posts: 34

You need to post some code, or at least how your program works. If you're using threads for animation, pause the threads. If you're using timers, stop the timers. For multiple threads/timers, just make an array of them and use a for loop to pause/stop each thread/timer. However, if you are doing calculations for animation outside the thread/timer, the stopping of the thread/timer will not be enough.
 
 
subject: What is happening in the background when we pause a game?
 
Threads others viewed
Chess Server
A.I. idea --> Free Cell proof
HFO Cover Model Entries
In listview changing background of button in rows on click of button in one row
I'm having trouble with my game...
developer file tools