Let me start by saying that I’m no expert. Not in game creation, anyway.
So take the following advice with a grain of salt. Also, I’ll likely refine my opinions and practices as I develop more games. Also also, this isn’t going to be about game theory, business, marketing, or anything like that. This really going to be about the technical side of game making. Okay, with that out of the way… Let’s proceed.
Unity is my preferred game engine for a variety of reasons. Not the least of which is the underlying software language used for writing code.
So my first tip is very simple: Use C# (types are your friend).
Some other lessons I’ve learned making my first two games in Unity:
- Less Code is Better Code: Leverage as much of the engine as you can.
- SOLID/YAGNI/KISS methodologies apply to software for games too. Small laser-focused behaviours are better than large sprawling ones. But don’t go crazy.
- Use custom events for triggering changes in state and game logic.
- Relatedly, keep all your event definitions in a central place. Here’s an example from Drumpf Flinger 9000.
- The physics engine is your friend.
- The physics engine is your enemy.
- Treat every behaviour1/script as transient. (Everything that gets set up needs to be torn down). This is helpful when changing/reloading scenes.
- If you’re using unit tests, never test engine code. Only test your own algorithms.
- Save optimization for the last step. Make it work, then make it faster.
- Unity has a lot of features (I haven’t come close to discovering them all), keep reading and keep exploring.
- It’s a great thing to get pre-release feedback. It’s even greater to let their feedback shape and improve your game. I got some terrific feedback from my alpha testers (thanks guys!) that really improved Drump Flinger 9000.
No, that’s not a typo. Unity uses the British spelling of behavior. ↩︎