Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Determing FPS within another FPS .. How?
#4
(11-11-2022, 11:06 PM)SMcNeill Wrote: Why not use _LIMIT to set the FPS and then calculate position/graphic based on it?

Mouth_Open = X times per second or Limit / x
Mouth_Closed = Not Opened  Wink

Move = x pixels per second or Limit / X

Mouth should open 5 times per second?  On limit 30, it's open starting at 0, 6, 12, 18, 24 on your loop counter, for 3 loop count, for example.

Yes, I could do that. That's another good method I can add to the two I pointed out above. I'm trying to find the system the original programmers used. This web site contains "The Pacman Dossier":

https://www.gamedeveloper.com/design/the...an-dossier

If you scroll down about a quarter of the way you'll see a diagram of the PacMan and Ghost speeds and when they are to occur. The "Norm Dots" and "Fright Dots" columns can be ignored, they are simply the result of skipping one frame every time Pacman eats a pellet.

Each of these speeds come out to an equal FPS when you multiply 60 by the percentage. There must be a simple algorithm I'm overlooking that relates to this.

I found the original source code to Pacman (Z80 ASM) but oh lord, I have not dabbled in Assembler in years, and never in Z80, only x86. I suppose if a resident math wizard doesn't come to my rescue I could always wade through the thousands of lines of ASM code to see if I can glimpse the inner workings. Ugh.
Reply


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



Users browsing this thread: 2 Guest(s)