60 FPS!

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

60 FPS!

Post 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.
Last edited by Willy Elektrix on Thu Mar 19, 2020 9:44 pm, edited 1 time in total.
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7449
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I think you have covered all the major ones :)
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

Bob the Hamster wrote:I think you have covered all the major ones :)
Excellent. REALLY looking forward to implementing this. =)
TMC
Metal King Slime
Posts: 4090
Joined: Sun Apr 10, 2011 9:19 am

Post 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.
Last edited by TMC on Fri Mar 20, 2020 7:11 am, edited 1 time in total.
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post 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!
Post Reply