• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Thoughts on frameskipping?

S

seanm

Guest
Hey, I'm super interested in making a 120fps game.

I hate delta timing, so I'd rather just make the game run at 120, and leave it at that.

The obvious issue is that most people are going to play on a 60hz monitor. So my thought is that if I just skip the draw event every second frame on a 60hz monitor, the game will run at 120fps and not be half speed on a 60hz monitor.

Now this seems to work and look great. I'm just wondering what people think or any issues people have had with this.

cheers
 

RangerX

Member
My opinion is that anything over 60fps is a waste of time and ressource. Most "everybody people" don't care over 30 fps. Experienced eyes and gamers prefer 60. It feels MUCH MORE natural and same smoothness as real life. Over that? 99,9% of existing brains don't bother. Of course you can theorically decipher 120 from 60. Did you now you can spot something at 1000 fps given proper contrast? This is because your eye process change in lightness, in a constant stream. Thing is, when it gets really natural and smooth, the brain doesn't bother anymore thinking "is it smooth?" and it just goes in "automatic mode" to save processing lol.

Anyhow, I really think that while possible and while someone (prolly with some extra obsession and conviction) can think it matter somehow but realistically it doesn't and going over 60 fps is therefore a waste of time and ressources.

EDIT: am speaking in matter of visuals here. Maybe code read at 120 fps can make a different for some AI responsiveness or controls responsiveness, stuff like that.
 
S

seanm

Guest
There is a reason I am doing this that relates to the logic of the movement. But also, I have an 144hz monitor, and the difference between a 60hz game and a 120hz game are astronomical. I could make a perfectly acceptable game at 60fps, but I enjoy the clarity that 60fps provides.

But running the game, which has a good amount of stuff going on, and thousands of objects, still runs at 1k fps on a 60hz monitor.
 

Roa

Member
gamemaker sucks at this. You use delta time, which is crappy because of the environment, or you stick with steps. You can never tell the logic thread to sleep or make up for time, so things either go all the time, or go until it reaches the step speed. You can "skip" the draw event, but It still renders the frames at step speed regardless if you draw to the canvas. Also, you screw all those people that use vsync.

Your best option is just to account for step speed.
 
S

seanm

Guest
@Roa The thing is,

The screen doesnt tear on a 60hz monitor if I frameskip the game running at 120fps.

To be clear, frameskip = draw_enable_drawevent


edit: I'll create a new build of the game, where everything is scaled up 4x and I'll see what the performance is like on that at 60fps. because if it's the same I might just use that at 60fps
 
Last edited:

Roa

Member
I dont think it matters sean. draw event just disables in game drawing and passing things to render. I'm almost certain windows still runs the game in frames by tick rate.

Test it with the fps string. I bet it will always say 120 even with skipping. its still being rendered to windows, just the render in game is not updating.

Try fraps
 
Last edited:
J

Jaqueta

Guest
The problem when running a game in 120 Steps, is that even people with 60Hz monitor, will need a better CPU to run the game.
On my game, which is locked at 60, a lot of people where able to get more than 30, but not 60, because of the CPU. Now try imagine this with 120.

If you want your game to run properly on all machines, DeltaTime is the way to go, even if it's a pain in the *** to make it.
 

Roa

Member
The problem when running a game in 120 Steps, is that even people with 60Hz monitor, will need a better CPU to run the game.
On my game, which is locked at 60, a lot of people where able to get more than 30, but not 60, because of the CPU. Now try imagine this with 120.

If you want your game to run properly on all machines, DeltaTime is the way to go, even if it's a pain in the *** to make it.
Even delta time is really bad in gamemaker because of the fore mentioned. There is no way sleep threads to reserve CPU time so it always runs full gun, petal to the metal. Gamemaker simply isn't designed with this kinda of asynchronous design between graphic updates and logic updates. It likes to march in step and actively fighting this kills performance.
 
Last edited:
J

Jaqueta

Guest
So, if Frame skipping may screw up the game for older machines due CPU if you use a high room_speed, and DeltaTiming is terrible, what is the solution? Go to Unity? (lol jk dont ban me pls)
 

Roa

Member
delta timing can work backwards to a point if you have an FPS cap, but its more to play catch up. Maxing the room speed to meet FPS requirements however is very lossy, and it puts a lot of work on the CPU, probably maxing a core, which in turn kills the max speed of everything in general.You start competing for time with other apps and hiccups are more common given its still on a tick system, just really fast.

The frame skipping sean mentions, I dont even know if it could be considered real frame skipping lol. It just makes room for the in game render. The only real winning move is to just program for each possible speed. Its just the nature of the environment. They will probably fix this in GMS 2.0 with yoyo compile or something.
 
S

seanm

Guest
@Roa, The game seems to behave the same if my monitor is at 120hz or 60hz with draw event disabled every second step.
There is no screen tearing, and nothing weird seems to be going on. I am getting a solid 1k fps real.

I'm not seeing what is wrong about this.
 
J

Jaqueta

Guest
But, the reason for that isn't because your monitor is 144hz and your playing at 120 FPS? Wouldn't people with 60hz monitors get tearing?
 
S

seanm

Guest
No i set my monitor to 120hz and 60hz to test this.

If my monitor is at 60hz, and I skip every second frame, the game does not tear. It looks great.

If my monitor is at 120hz and I don't skip any frames, the game doesnt tear, and it looks even better.
@Jaqueta
 
Top