If you’re trying to get into game development as a Software Engineer, finding learning materials with the right level of context can be challenging. You’ll likely face a choice between following materials introducing you to basic C# and OOP concepts while also describing Unity concepts, or starting with advanced tutorials and be left to figure out the core concepts deductively.
I started my programming journey around 17 years ago by picking up Game Maker. Countless hours spent coding little games and tools led me to a bigger passion for programming. Eventually, I was at a point where I focused mainly on Software Engineering. From my peers, I know this is quite a common path that many of us took to find programming.
Yet the game development scene has changed significantly from those days. When I went to pick up Unity after a long absence from game development, I was mostly interested in understanding the basic concepts: what are the fundamental building blocks of a game? What do I need to know about how these building blocks are represented in memory or on disk? How is idiomatic code organized? What patterns are preferred?
In the first article in the series, we’ll focus on those first two questions.
A Scene is the largest unit of organizing your objects in-memory. Scenes contain the objects making up your game.
In basic use, one scene represents a single level in your game, where one scene is loaded at any given point. In more “advanced” use, you can have two or more active scenes at a time. Scenes can be loaded additively and unloaded. Having multiple scenes loaded during gameplay comes especially handy when building a massive world; keeping far-away areas on-disk rather than in-memory will help you stay within your performance budget.
Every game object in Unity needs to be in a scene.