|
-
Jun 9th, 2001, 01:24 PM
#1
Thread Starter
Lively Member
Pausing a game
Hi.
I want my game to be paused when the player presses P or something. How can I do that?
By the way, I'm using DDraw
-
Jun 9th, 2001, 09:26 PM
#2
If you have rendering separate from game state updates, just put an if statement around the updating, and use a boolean value that is toggled when the user pauses.
Z.
-
Jun 10th, 2001, 05:37 AM
#3
Thread Starter
Lively Member
I'm sorry but I did not get what you meant by:
If you have rendering separate from game state updates,
-
Jun 10th, 2001, 05:44 AM
#4
PowerPoster
I think he means something like
Code:
Do game loop
If blnGo = true then
Do all the funky game updating here
En if
Get keyboard presses
If 'P' pressed the blnGo = not blnGo 'toggles the paused state of the game
loop until 'Q' pressed 'for quit
Or something along those lines
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Jun 10th, 2001, 03:40 PM
#5
Thread Starter
Lively Member
Ok Thank you, I'm gonna try that.
-
Jun 10th, 2001, 04:37 PM
#6
Thread Starter
Lively Member
OK.
Thank you for your help, the code worked.
-
Jun 11th, 2001, 02:38 AM
#7
PowerPoster
So,
When do we get to see your game.....
Gentile or Jew,
O you who turn the wheel and look to windward,
Consider Phlebas, who was once handsome and tall as you...
-
Jun 11th, 2001, 03:21 PM
#8
Thread Starter
Lively Member
You really are interested? 
But I don't think you would want to see it because my game, as it is, has many problems.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|