Page 1 of 1

60 FPS!

Posted: Thu Mar 19, 2020 9:23 pm
by Willy Elektrix
I just realized that the recent stable version of OHR automatically adjusts walk animations to look right in higher frame rates. WOW! THANKS!

Is there something I should be aware of before I start tweaking my game to run in 60 FPS?

Gotchas That I Already Discovered:
Battles are not in 60 FPS (I don't use the battle engine, so I'm good.)
Need to slow down hero walking speed.
WAIT commands need to have their ticks increased.
Tile animations need to be slowed down.

Posted: Thu Mar 19, 2020 10:51 pm
by Bob the Hamster
I think you have covered all the major ones :)

Posted: Fri Mar 20, 2020 12:19 am
by Willy Elektrix
Bob the Hamster wrote:I think you have covered all the major ones :)
Excellent. REALLY looking forward to implementing this. =)

Posted: Fri Mar 20, 2020 7:10 am
by TMC
Did you hear that a few months ago someone came by wanting to record a Let's Play of Alien Squatter, but complained that the game was running at a low framerate. They didn't want to do it before the game gets upgraded to 60fps.

The only other thing to consider are slice and camera movement/velocity commands, which measure time in ticks.

Beware that the map and tileset editors display tile animations at the wrong speed if the game's fps isn't set to 18fps.
I suggest you do a search-replace of "wait(" in your scripts with "wait18(":

Code: Select all

script, wait18, ticks = 1, begin
  if (ticks == 1) then (wait(1))
  else (wait(ticks * 600 / 183))   # convert ticks from 60fps to 18.3fps
end
(If the original wait amount was 1 tick, then it assumes you're waiting until the next tick instead of waiting for a certain length of time.)

I think we should have some a builtin script equivalent to that, or a setting which automatically stretches all the wait commands without you having to do anything. Plus also a "wait ms" command to count time in (milli)seconds.

I'm planning to implement fractional movement speeds and add a setting to adjust all the walk speeds, so that if someone changes the framerate, all the movement speeds (as measured in pixels per second) stay the same. If you do it manually, it's not going to be a problem. I was hoping to get it into the next version, but that's really soon, so unlikely to happen before then.
Of course Alien Squatter has no moving NPCs (that' I'm aware of), so that's easy.

Posted: Fri Mar 20, 2020 3:50 pm
by Willy Elektrix
TMC wrote:Did you hear that a few months ago someone came by wanting to record a Let's Play of Alien Squatter, but complained that the game was running at a low framerate. They didn't want to do it before the game gets upgraded to 60fps.
I didn't know that!

Thanks for that script, that will be much easier than going in manually to edit all those scripts. As usual, you've been a big help!