i wanna add a timer to my ping pong game, so that every 30 seconds the players paddle will be halved in sized (to add more of a challange to the game). is there any way to do this? i allready know how to divide the paddle by two, so i only need to add the timer.
3 replies to this topic
#1
Posted 16 October 2011 - 04:13 AM
|
|
|
#2
Posted 16 October 2011 - 04:26 AM
A conclusion is where you got tired of thinking.
#define class struct // All is public.
#3
Posted 16 October 2011 - 12:22 PM
Just use int startTicks = SDL_GetTicks() and then doy our stuff before using endTicks = SDL_GetTicks() - startTicks;
endTicks will have the milliseconds between when you set startTicks and when you set endTicks.
^The tutorial above has it all^
I recommend you read all of Lazy's tutorials (apart from OpenGL and stuff).
endTicks will have the milliseconds between when you set startTicks and when you set endTicks.
^The tutorial above has it all^
I recommend you read all of Lazy's tutorials (apart from OpenGL and stuff).
Please, write clearly with proper structure. Double spacing makes the text feel un-jointed, Capitalizing Every Word Means People Stop Before Every Word Sub-Consciously Which Is A Pain In The Backside, and use code tags! (The right most styling box).
#4
Posted 16 October 2011 - 10:45 PM
kinda like how you would limit the FPS in your game?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









