Post-release: Dating Sims (Engine Edition)

I wanted to make this post to talk about things I learned while making DatingSims. Making DatingSims was very much a learning process for us and we really wanted to use it to expand our own understanding of the full end-to-end process of making a game. For my part this was all about the backbone of the game. My background before creating this game was actually mostly in the java world although not java web development like most people but building modding platforms for the game Minecraft. Due to this a lot of my existing knowledge of how to build a program actually had to go out the window as what is a best practice for a lot of applications is often very bad for making games where you care a lot about memory footprint, layout and the overall performance of the game.
For DatingSims we decided not to use an existing engine or framework as its a simple game and it would defeat the goal of trying to learn. So everything to make the game run was written by me just for this project. With perhaps the obvious exception of using opengl for rendering and fmod for sounds.

Avoid Abstraction

This is where my java background really bit me as abstraction is a built in fact of life in java. In C++ conversely I started off with a similar mindset and quickly realized of course that this is completely the wrong attitude to take. I took it a step farther however and stopped abstracting even in places where it would be normal for a more generic engine. I however did not want to make a generic engine as the abstraction required by an engine to perform a variety of functions some of which are not required for this specific time all have very real memory and performance costs. While code reuse is the general benefit of an engine this can also be achieved through clever and consistent design. By the end of the project my C++ code ended up very close to C with classes only used in a few areas.

Avoid Over-engineering

Following on from the last point another thing I had to work hard to avoid was writing code that I didn’t need. Its easy when writing a piece of code to perform some function to want to flesh it out. However often this tangential functionality goes unused and if later I did need some aspect of it would often be easy to add the functionality then rather than trying to predict what I would later need. Similar to this is that I tried to predict some kinds of utilities that I might need but almost invariably never used. I think this was almost a form of procrastination for me at times.

Design Key File Formats Early

This one is a little less general than the other points. For context DatingSims uses these scene files to store all the dialogue interactions, scene images and transitions, sounds, and choices which is then loaded by the game and processed to figure out how to transition around a large state machine which controls the game state. This file is what Cogle primarily spent her time working in and is just shy of 20,000 lines long (for simplicity we merged our multiple scene files into one in the final copy of the game). I only designed this format about halfway through the project and some directives were added in the last weeks or days of development. I think that had I fully designed this format from earlier on we would have had to do less passes through the script. When Cogle was writing the first draft of the script we simply didn’t know some of the directives for things like playing sounds which were added later and because of this she had to do a later pass through just to add sounds which likely took longer than adding the sounds during the first draft as at each point you have to reorientate yourself for the current context of the scene to determine which sound to play.

Prototype Early and Often

This is one that frequently comes up and I’ve known it before but I got very bogged down at times with trying to do large monolithic changes and the lack of visible progress or being able to test really gets to you and makes it hard sometimes to know where to continue working. Towards the end I changed tack and started a shorter change cycle even though the size of some of the features I was creating wasn’t that different from the earlier stages of the project. Doing shorter changes cycles just mentally makes me feel better
about the project as I felt like I was getting more done and consequently ended up usually working for longer and actually getting more done.

These are a few of the placed that I feel my mindset really changed over the course of the project but the overall feeling was one of constant improvement which I hope to continue into our next game. Hopefully more on that later.