| 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?
|
|
|