I recently tried to play Wolfenstein New Order, I realized that unlocking the framerate makes the game break. why? (sorry for bad english)

@weew@lemmy.ca
link
fedilink
English
941Y

because it’s easier.

You have one “frame” where you just do everything: read the player input, do whatever actions, calculate collisions and physics and whatever, and draw everything when all those calculations are done.

Then you move on to the next frame and do everything again. Everything lines up all the time and always happen in the same order. Simple, quick, and consistent.

To decouple calculations and framerate, you don’t know when the game will try to draw something. It might be in the middle of when you’re calculating collisions, or moving the units, or calculating physics. Or you might end up doing multiple calculations while the GPU is slow and can’t draw anything.

So you have to add an extra layer in between, probably saved to some memory somewhere. Now every time the GPU draws something, it has to access that memory. Every time you calculate something, you also access that memory. Let’s hope they DON’T try to read and write on the same spot at the same time, that could cause bugs. And so much memory access, you’ve basically doubled your memory bandwidth requirements.

It’s complicated, more resource intensive, and introduces potential bugs.

@teawrecks@sopuli.xyz
link
fedilink
English
15
edit-2
1Y

And not just easier, but cheaper. On lower end platforms it’s expensive to do floating point calculations all over the place because you don’t know how long it’s been since the last frame. If you can assume the frame rate, you can get a lot of performance back too.

Create a post

From video gaming to card games and stuff in between, if it’s gaming you can probably discuss it here!

Please Note: Gaming memes are permitted to be posted on Meme Mondays, but will otherwise be removed in an effort to allow other discussions to take place.

See also Gaming’s sister community Tabletop Gaming.


This community’s icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

  • 1 user online
  • 119 users / day
  • 187 users / week
  • 482 users / month
  • 1.87K users / 6 months
  • 1 subscriber
  • 2.48K Posts
  • 40.1K Comments
  • Modlog