Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Determing FPS within another FPS .. How?
#10
(11-12-2022, 01:53 AM)LEM Wrote: For 85%, what if you do:
IF (2*frames) MOD 18 THEN ...

Would that work?

I was thinking in similar terms, along the lines of work I did with greatest common factors. With the one of 85% I came out with 2.5. Dang, not an integer, right? Well whogas? Let's try that mulitpiled to the frames MOD 20... Pretty close to 85%!

Input 2.5,20
Code: (Select All)
DO
    CLS
    INPUT x, y: j% = 60
    DO
        frames = frames + 1
        PRINT frames
        _LIMIT 60
        j% = j% + 1
        IF (j% * x) MOD y = 0 THEN
            ' skip frame
            skip = skip + 1
        ELSE
            ' do stuff...
            cnt = cnt + 1
        END IF
        IF j% = x THEN j% = 0
    LOOP UNTIL frames = 60
    PRINT "Total frames processed ="; cnt; "  Skipped ="; skip; "Percentage = "; LTRIM$(STR$(100 - (skip / cnt * 100))); "%";
    SLEEP
    CLEAR
LOOP

+1 to LEM. I think he's on to something.


Pete
Reply


Messages In This Thread
RE: Determing FPS within another FPS .. How? - by Pete - 11-12-2022, 02:23 AM



Users browsing this thread: 2 Guest(s)