This usually involves improving your algorithms, skipping work the user won’t see, factoring your target hardware into the design process, or modify

Making Your Game Go Fast by Asking Windows Nicely

submited by
Style Pass
2022-01-14 03:00:17

This usually involves improving your algorithms, skipping work the user won’t see, factoring your target hardware into the design process, or modifying your game’s content.

We’re not talking about any of that today. This post is a list of ways to make your game run faster on Windows–without making any major changes to your game’s content, code, or algorithms.

I employ these optimizations in Way of Rhea, a puzzle adventure written in a mix of Rust and a custom Rust scripting language. While this project is written in Rust, all the optimizations listed here are language independent–where the translation isn’t straightforward I’ve provided both Rust and C++ examples.

One day, while working on some optimizations, I discovered that completely disabling one of Way of Rhea’s subsystems made the game slower. That…didn’t add up. Doing less work should take less time, so I did some investigating.

My initial assumption was that some weird dependency on that subsystem resulted in more work being done when it was absent, but that turned out not to be the case.

Leave a Comment