Thoughts on efficiently solo developing a game without an game engine

I started prototyping a 2D game with Unity. And soon ran to performance and scalability issues using the build-in systems (Tilemap etc). To battle those issues I would need to build custom systems for those anyway, so I again decided to move to just plain C++. The game world is procedurally generated so luckily I don’t need a dedicated editor. As the project begun, I tried to focus on building a game instead of starting building a game framework (entity systems, filesystems, other abstractions etc..).

To reduce boilerplate as much as possible and to make refactoring fast and easy, I don’t use C++ headers for my code. I have one .cpp file that is compiled. That file includes all other .cpp dependencies I have. Much of the game code resides in a single .cpp file which is now around 5000 lines long. I have a build.bat that just uses the MSVC compiler and only use Visual Studio for debugging purposes.

In my code I don’t use classes at all. Just plain structs and functions. I do use templated structs and functions for arrays. I don’t use STL at the moment. Basically, I only use dynamic or fixed array as a container, so I wrote support that myself. I avoid abstraction as much as possible and only do it when it clearly improves code readability and understanding. I do use third-party libraries such as SDL for windowing and input, stb_image for image loading, stb_truetype and fontstash for ASCII text rendering and bgfx for graphics.

This way has worked well for me, keep iteration time low and motivation up. Results come up fast and I don’t spend time thinking code structuring, abstractions, system refactoring. Or should the new class name be XYZManager. At the moment, time to compile and run the game is much lower than script reload and play in current Unity!