So here's an enumeration of lessons learned during development in the context of programming a builder/tycoon game that can have hundreds of agents.
In our game Academia, we employ a multi-scene architecture. We now have hundreds of scenes that are all additively loaded at runtime to compose the whole game. Sometimes, there are fixes or new features that requires changes to all scenes. Imagine doing this manually. Load scene, apply change, save scene. Repeat to hundreds. This is … Continue reading Process All Scenes in a Folder
The concept of null is considered as the billion dollar mistake and I very much agree. The defects caused by it is even more apparent in games where state changes happen a lot. In a complex simulation game like ours, we encounter a lot of NullPointerException (NPE) that we can't trace how it happened. It's … Continue reading Forcing to Handle Null
I’ve read a book called Code Complete about a decade ago. The mantra of that book is “the goal of software is to manage complexity.” That phrase is repeated throughout the book and it has stuck with me ever since. The idea is that since we make software to manage complexity, we should strive to … Continue reading My Thresholds for Refactoring
When we started making Academia, we didn't really plan out how are we going to manage our sprites. We just did the quickest way which was to make them individually and load them in the game. All of our game world sprites are stored in StreamingAssets. We load them dynamically when the game is run. … Continue reading Reducing Draw Calls Using a Simple Texture Packer
Every now and then, I'd like to share some of my small utility classes that I've made a long time ago but are still being used until now. The following are what I call some of my mini utilities. They can be used in your own Unity projects. (Note that I've removed method description comments … Continue reading Some Utility Code
One of my favorite features in reflection is the ability to know about the properties of a certain instance at runtime. This has helped a lot in making tools to aid game development. Basics The following code is the simplest way to iterate through the properties of an instance: PropertyInfo contains the information about a … Continue reading Reflection Series – Part 2: Harnessing Properties
Most of the character faces in Academia are generated in a procedural way. Each character has its own combination of face and head. Heads can either be hair or construction hat if they are workers. Both faces and heads are contained in a single texture so Unity may apply batching. To generate a character, you … Continue reading Render Two Sprites in One Shader
The foundation of every tile based games is the structure of their tile model. I think our game Academia has come a long way in the evolution of its tile structure. It's robust enough to be shown to the public. If you're making a tile based game, hopefully this helps you. I'll show you the … Continue reading Our Tile Class
I'm excited that we're making a builder type of game in the likes of Prison Architect Banished, and Rimworld. I love playing such games. Our's is a school management game where you can design classrooms, offices, hire teachers, design curriculum, and guide students to their educational success.