Determing FPS within another FPS .. How?
#5
(11-11-2022, 11:36 PM)bplus Wrote: I think of speed as pixels per frame something moves over the screen: speed = SQR(dx^2 + dy^2) if you want a formula
dx = speed * cos(HeadingInRadians)
dy = speed * sin(HeadingInRadians)  ' more formulas

If fastest thing moves 5 pixels per frame then for 85% of it is .85 * 5 = 4.25 for speed and so on...

If the heading is up or down it's all dy.
Likewise if only left or right it's all dx.

Sure, sure. I use those same formulas for a lot of my vector work. This is similar to the approach I mentioned using single precision values. Completely doable. I'm hoping to find the way the original programmers did it. My goal, if it's attainable, is to have the ghosts move in the exact same patterns as the arcade machine so established patterns of play will work. I'm very close. A pattern I know *almost* works. I just need to get these timings exact. I'll add an option to the game that seeds the RND generator so established patterns won't work either creating a whole new experience.

That Pac-Man Dossier I mentioned above has darn near everything one needs to clone the game perfectly, except for the method of FPS adjustment.
Reply


Messages In This Thread
RE: Determing FPS within another FPS .. How? - by TerryRitchie - 11-11-2022, 11:45 PM



Users browsing this thread: 2 Guest(s)