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
Printable View
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
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.
I'm sorry but I did not get what you meant by:
:)Quote:
If you have rendering separate from game state updates,
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
Ok Thank you, I'm gonna try that. :)
Thank you for your help, the code worked. ;)
So,
When do we get to see your game.....
You really are interested? :)
But I don't think you would want to see it because my game, as it is, has many problems. :p