low 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

low FPS

Post by Willy Elektrix »

Someone played the PC version of Void Pyramid on Steam and is complaining about a low frame rate. Apparently the game runs at 18 FPS (according to the Steam framerate counter). The problem is persistent even if he restarts his computer. It is the same if he runs the game in full screen or windowed mode.

I am asking him to send me the specs for computer, but I haven’t received them yet. In any case, I can smoothly run Void Pyramid on a computer with 1.8 ghz and 768 MB of RAM, so I doubt he does not have enough processing power.

He sent me his debug file, but it isn’t very interesting. He has his screen size set to 1920x1040, which is pretty high resolution. Could that matter?

Any thoughts?

Code: Select all

---start_new_debug---
Loading K:\SteamLibrary\steamapps\common\Void Pyramid\voidpyramid.rpg
curdir: K:\SteamLibrary\steamapps\common\Void Pyramid
tmpdir: C:\Users\HAPEXI~1\AppData\Local\Temp\ohrrpgce20161223072024.295.tmp\
settings_dir: C:\Users\HapexIndustries\AppData\Roaming\OHRRPGCE
Name: Void Pyramid v1.4
Partial game data upgrade...
Last edited by: [[OHRRPGCE wip 20161115.8213 gfx_directx+sdl+fb/music_sdl FreeBASIC 1.05.0 (01-31-2016) x86   Win32 32-bit]]
archinym creation info: OHRRPGCE wip 20140514
get_screen_size: true screen size 1920x1080
Desktop resolution: 1920*1040
automatic_scale_factor(0.8), screen size: 1920*1040
Setting graphics scaling to x4
Config gfx.fullscreen = 1, genFullscreen = 1
SETVISPAGE(gfx_showpage) took 71ms
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

All OHRRPGCE games by default run at 18.2 fps, and it was only recently possible to set any other framerate.

So it is not a bug, it is by design, and the reason you can't see any problem is because it has always run at that framerate for you, and for all other players, this person is just the first to complain about it.

The framerate of 18.2 was picked very early in the OHRRPGCE's development because it was the frame rate used by a particular DOS timer interrupt. Googling for "18.2 fps" brings up some interesting threads on the topic-- from 1997 ;)

If you do want to try increasing the frame rate go to "Edit General Game Data" and look at the bottom for "Framerate:" As soon as you change this it will pop up a warning about limitations and compatibility issues. Particularly be aware that that the speed of everything in the game changes when you change the frame rate. You can compensate for this on the map by changing walking speeds, but there is not currently any way to compensate for it inside the battle-system.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

The low framerate does have the draw-back that movements are far less smooth than they would be at 60fps. A lot of players who play high-framerate game will notice that. I want to add an option to run the game logic at 18 fps, but draw the screen at 60 fps so everything is nice and smooth and walking speeds and animations don't change. In fact, I already implemented that 8! years ago, but I never merged it into the engine because it was just a hack, which will break if you use any script commands for positioning things on the screen yourself. (You can try it here). It needs to be opt-in. I have been meaning to revive that patch. (I see it handles movement speeds and a lot else incorrectly, and needs rewriting.)
but there is not currently any way to compensate for it inside the battle-system.
The battle system always runs at 18fps regardless of that setting. It would be nice to change the battle system to 60fps, regardless of that setting.

BTW for future reference, you should show the start of the debug log as well, which is the part that provides the important engine version and platform information.
Last edited by TMC on Fri Dec 23, 2016 10:41 pm, edited 4 times 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:BTW for future reference, you should show the start of the debug log as well, which is the part that provides the important engine version and platform information.
I will do that.
Bob the Hamster wrote:All OHRRPGCE games by default run at 18.2 fps, and it was only recently possible to set any other framerate.
Aha! I guess I'm not surprised to hear that. I mistakenly believed that OHRRPGCE ran at 30 FPS because of "What are the limits on various things?" article of the wiki.

It reads: "The only realistic limitation on slices is memory and speed. If you add too many slices, your game will run too slow. The number of slices that is "too many" will vary depending on the speed of your computer, the arrangement of the slices, and the complexity of the scripting you are performing on them. For example, you can fill the whole screen with 320x200=64000 rectangle slices of size 1*1 and probably still run at 30 fps, but if you tried to iterate over all those slices every frame with a script it would be very slow."

Upon reading it closer though, I realize that it does not necessarily say that OHR games run natively at 30 FPS. Thanks for helping me clear this up.
User avatar
kylekrack
Liquid Metal Slime
Posts: 1240
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

Yeah, it's good to keep in mind changing the framerate will change everything that moves. Doing it after making cutscenes and animations and stuff can be pretty sucky, considering sometimes you have to recount all the frames for stuff to make it appear slower/faster. One of the first things to notice is that walking speeds are much smoother, but if you ask me, the frame switch is way too fast.

I don't know if there is an easy way to change it, but I remember when playing Macabre, all the walkabouts looked like they were vibrating as they walked.
My pronouns are they/them
Ps. I love my wife
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

You can easily replace all the wait() commands with your scripts with calls to a wait18() or similar script that calculates and performs the correct number of wait ticks. Some other commands like slice velocity commands can also be dealt with similarly, but of course many other things can't. Last time I scripted something to run at 60 fps I expressed all delays in milliseconds instead.

I agree with you that the walking animation is too fast when you turn up the frame rate (and it's even too fast at 18 fps when using Walk In Place), but stay tuned! (There is no easy way to change it yet)
Last edited by TMC on Tue Dec 27, 2016 3:15 pm, edited 1 time in total.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I often add a constant to my scripts like:

Code: Select all

define constant(18, second)
Then I can write things like:

Code: Select all

wait(second / 2)
Post Reply