#Make frame skipping confugurable

7 messages · Page 1 of 1 (latest)

rapid oar
#

When framerate gets low, the game tries to compensate by ticking multiple times before drawing. That is sensible when the source of lag is the drawing, but makes the game even choppier when the source of the lag isn't the graphics, but the mindstone.

Let's take the extreme case of the mindstone script taking a second to execute (just to illustrate), then instead of one frame per second, the game only renders one frame every three seconds (and saves basically no time relatively speaking). It also can get in the way of debugging if you can only see the prints of every third frame.

There is probably a way to figure out when it's actually beneficial to skip frame drawing and when not, but letting the user choose to activate/deactivate frame skipping is probably easier to implement, less error prone, and addresses the issue of laggy mindstones impacting the frame rate much more than they need to.

thorn flame
#

the entirety of the mind stone runs every frame - it can't skip frames because we write code assuming that it will never skip frames

the choppiness isn't from drawing, its from the mind stone processing all the code that was written in it

the game runs at 30fps normally, but lowers the framerate when that's not possible

skipping drawing frames wouldn't work unless the mind stone is drawing something massive and inefficient, which at that point it's the user's fault

imports are often laggy if you're using multiple, or some of the larger ones

soft rover
#

not what he is talking about bitty

#

by default unity will skip draw frames if its taking too long, though its apparently possible to override that with some variables made for capturing video.

#

it still runs the logic tics, so stonescript runs every frame, but it wont show every frame on screen.

plain quarry
#

#1224239278389727344 message similar suggestion

rapid oar
#

@plain quarry yes same suggestion, sorry for the duplicate