Advertisement

Programming Alleyway/Breakout

Started by October 24, 2000 08:29 AM
9 comments, last by DJ_House 24 years, 2 months ago
Thanx for checking out Klunk

Ok, I don't just ignore the framerate...I just don't have a set one. I use a scaling factor based on how long it takes to do some operation. So, the ball moves the same distance every second, no matter what the computer. The only downside is that it is choppier on slower computers (it moves by bigger distances).

Ok, the xVel and yVel are changed something like this:

xVel=xVel/timeScale
yVel=yVel/timeScale

Where timeScale is the inverse of the time it takes to do something (1/time). So, the longer it takes, the smaller the variable, and the bigger the increments. Because if it takes longer than the computer is slower.

Yet again, I hope that helps.

-MSkinn99

What's done is done (Until you hit Undo)

Edited by - MSkinn99 on October 26, 2000 7:42:14 PM
-MSkinn99What's done is done (Until you hit Undo) :)Two wrongs don't make a right; but 3 lefts do.You'd be paranoid too if everyone was out to get you.
Yet another game programming web page...

This topic is closed to new replies.

Advertisement