0
\$\begingroup\$

It takes too much processing power to do game logic on every rendered frame (60fps), so what if I made my game save frames?

It would actually calculate important stuff 20 times a second, and the render loop just interpolates the 2 frames in-between to make it look like 60fps.

Is this a good idea for improving game performance?

\$\endgroup\$
  • 2
    \$\begingroup\$ Profile, profile and profile. \$\endgroup\$ – Tyyppi_77 Oct 4 '18 at 3:45
  • 1
    \$\begingroup\$ This is the basic idea behind Fix Your Timestep - gafferongames.com/post/fix_your_timestep - although the objective is timer stability rather than performance. Regarding performance, engineering for performance is not the same thing as optimization, and while premature optimization etc remains true, it's never too early to engineer for performance. Make sensible performance-related decisions from the outset and you may not even need to optimize at all. \$\endgroup\$ – Maximus Minimus Oct 4 '18 at 7:31
2
\$\begingroup\$

Yes. Some games do just that.

Even more, they run at constant (e.g. 10) fps for game logic and render at whatever fps they can. Solves whole bunch of problems between machines with different processing powers.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.