Jump to content
This is not recommended for shared computers
Sign in anonymously
Don't add me to the active users list
Paradigm Shifter hasn't added any contacts yet.
16 December 2013 - 03:34 PM
You can get around that by doing
if(right pressed) ang velocity += some amount;
if(left pressed) ang velocity -= some amount
newang = oldang + ang velocity
16 December 2013 - 03:06 PM
It's very useful calling srand more than once in a program, to reset the random number generator to a known state. Typically you would do that at the beginning of a level or a simulation.
It is useless calling it more than once with an unknown seed though (which is what calling it with time(NULL) does).
15 December 2013 - 04:33 PM
Change the positions, that will work correctly if the texture is not square.
15 December 2013 - 12:54 PM
Sounds like you need a spring? http://en.wikipedia.org/wiki/Hooke%27s_law
15 December 2013 - 10:01 AM
Lol that's shocking! In a golf game it's easy just to store the ball position every frame (since it makes sense to precalculate the trajectory when you hit it) and just run that back. Electronic Arse more like!
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC