Making your game engine production-ready
After publishing 2 games on Steam using my own game engine, I thought it would be useful to write what I consider to be useful tips to have a production-ready game engine and start releasing commercial games where you can be proud of the work you accomplished.
A “production-ready” game engine doesn’t need to be able to make huge games, it’s especially unnecessary if you are a solo-developer working on smallish games. It just needs to be able to make games, and make them run well on many computers and configurations.
Some of these tips are general, some are really specific.
Features
- Only work on features that will be useful to the game you are making at the moment. You can have an infinite amount of features in a game engine, but only a very small part of them will be useful to the game you are making. Focusing on the features you need instead of the features you want will bring you closer to the goal of publishing a game.
- Avoid cutting-edge graphics API features. Unless your game relies on them, obviously. Even though players may have the hardware for it, it’s important to remember that a lot of them do not update their drivers regularly and may even play games with drivers which are 2 or 3 years old. If you really want to use these features though, you can ask players to update their GPU drivers when they launch your game, but whether they are willing to, or even know how to, is something you have no control on.
- Only support platforms you own. If you do not have a Mac, I would not recommend to make a Mac build from someone else’s Mac where you can’t spend hours testing on. Especially as you will sometimes need to quickly push updates, which you wouldn’t be able to do if you don’t have the hardware to. This also applies to Linux if you are working on a Windows machine. You can probably make a Linux build if you use WSL (Windows Subsystem for Linux) but as it doesn’t support GPU passthrough, you won’t be able to test on it. Just make a Windows build and let Proton do the work for you for Linux support (I wouldn’t recommend bothering with a Linux dual-boot if you are not familiar with Linux, the way the shared libraries are managed is different from Windows and not knowing how it works can cause your game to launch on your machine but not on someone else’s (for example: all Steam Decks)). And if you don’t have a Windows machine, I would recommend to have a dual-boot for Windows to be able to build and test on it, this is where most of the players are.
- Avoid opening a console. Opening your game and having one (or multiple!) console opening spamming a bunch of log lines before the game actually launches is unnecessary. Keep this for your debug build or just use log files, in case you want players to report crashes by sending you a log file. On Windows, with Visual Studio, you can add this line at the top of your main file so your program doesn’t open a console at launch:
#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
- Add support for the distribution platform. If you plan to publish your game on Steam, players will appreciate that your game contains achievements, and it’s not even hard to add. Get the Steamworks SDK and the Steamworks documentation and implement the features you need. Remember to isolate it correctly so you can still make builds that do not require Steam. Here is an example on how Steam is implemented in NutshellEngine, as you can see, it’s not many lines of code, and there are features you probably don’t even need there.
- Think about localization. If you can support multiple languages, it’s interesting to do it. It includes being able to read text from a file with non-ASCII characters (for example, UTF-8). It may also force you to change how you are loading your fonts and rendering your characters on screen.
- It’s your engine. You know its strengths and weaknesses, you know its limits. Make a game you think you will be able to make on your engine and improve it with the features you need to actually make the game.
Production
- Put care into your tools. The main difference I see between a small game you make during a game jam and a commercial game is the amount of time you will put into it, game jams generally have a short deadline, your own games most probably don’t. If you don’t have any tool to work with your game engine, like an editor (either one you make yourself or even an external one, to build scenes for example), the time you spend working on your game will be miserable and you will suffer from it. User eXperience (UX) is generally something we only think about when working on projects that other people will use, but it will also greatly benefit you. Having a snappy editor, with nice shortcuts and features to simplify the development (for example: a way to apply modifications to multiple objects at once, instead of applying the same modification to each object one by one, or a way to detect which line of which script crashes a game) will greatly reduce your frustration working with your engine and the time you will take to develop your game.
- Working on a game = Working on the engine. While working on your games, you will find missing features or find that your editor lacks some quality-of-life features. The time you spend working on your game engine or working on your game is not time lost for the other, you won’t have to make these features again for the next games.
- Know your debugging tools. gdb on Linux, Visual Studio’s tools on Windows, etc. Make a macro to add breakpoints using code in your engine. Use RenderDoc for rendering issues, NVIDIA Nsight Graphics or AMD Radeon GPU Analyzer (or whatever tool your GPU manufacturer has) for measuring graphics performance (do not use RenderDoc to measure performance!! It replays the commands and won’t give you precise values). There are many external tools that will help you with debugging and optimization, learn to use them.
Testing
- Send a small game made with your game engine to your friends. You want to know if the game even launches on their computer, and if not, why? It can be something as simple as the assets paths being wrong when you are not launching your game through the IDE (classic Visual Studio mistake). It’s also a way to determine what a computer needs to launch a game made with your game engine, which will be useful when working on the minimum system requirements on your Steam page.
- Check your engine’s behaviour with devices connection and disconnection. What happens if you connect and disconnect a controller during gameplay? Can you play with a newly connected controller? What happens if you have multiple controllers connected? Which controller is your game reading the inputs from? What happens if you change the audio output device during gameplay? Does the sound now come from the new default audio device? You don’t know what setups your players will use, but anticipating these scenarios will allow you to support these not-so-uncommon ones.
- Test your game at multiple resolutions. How is the text you are rendering on screen appearing at a resolution you are not used to? Is it big enough to be readable at lower and higher resolutions (think of Steam Deck players)? Does it go outside the window’s boundaries? Is it blurry at higher resolution (you can consider implementing SDF (or associated method) text rendering so it can scale well at higher resolutions)? Also try on non-16:9 aspect ratios, the Steam Deck has a 16:10 aspect ratio (1280x800) and it can change a lot on your game if you don’t consider it.
- Find playtesters. This is more of a general game development tip rather than a game engine development one, but it applies to both. Players do things you don’t while playing your game, and they can also find issues with the game engine by doing things you don’t often do (like multiple Alt-Tab, minimizing the window, etc.).
Back to NutshellEngine index