
Discover why good coding practices matter for Unity city builder projects. Learn how maintainable, reusable code, automated tests, and clear documentation enable rapid feature development and fewer bugs.
Study game architecture in Unity 2019 by organizing code into presentation, application, domain, and data layers. Learn to prototype using clean architecture and robust business logic for city builder games.
Learn how unit testing, as an automated quality assurance practice, provides fast feedback during refactoring and ensures code remains clean and solid by focusing on granular methods and classes.
Create a tiny, structured game design document for a city builder, outlining game mechanics, resources, growth goals, and platform constraints to guide rapid development and feedback.
Explore an art prototype to shape the style, color palette, and look of a city builder, prototyped in Unity with an isometric grid map and free assets, iterating from feedback.
Resolve OS X unzip issues by showing two methods to extract asset zip files: use a terminal unzip command, or download an archiving application to unzip safely.
Explore Unity asset import, prefabs, and scene setup for a city builder by installing ProBuilder, TextMesh Pro, and Post-processing, plus UI assets from the asset store to prototype gameplay.
Prototype a Unity town in 2019 using prefab models, a pro grid with three spaces, a grass ground plane, and an isometric camera.
Implement city state calculations and a placement manager for single-structure and area placements, roads, and power and water reach, using an MVC architecture and AI for cars and pedestrians.
Set up the city builder project by creating prefabs from the UI and main camera, and create a new scene for the building mechanic prototype with a ground plane.
Create a Unity 2019 input manager that captures mouse clicks on the ground via camera raycasting, uses a ground layer mask, and prevents UI interference with the event system.
Refactor the code by creating a grid structure class to store the cells, manage and retrieve data, check occupancy, and replace buildings, with Unity edit-mode tests.
Learn to implement a cell data structure to store what has been placed on the map, using a multi-dimensional grid, a structure model, and a taken flag.
Test and place buildings on a grid in Unity by refactoring grid checks, implementing place on grid logic, and validating indices with unit tests for robust city builder code.
Switch between selection and placement modes with a UI panel and cancel action, add camera movement, and implement a UI controller to manage build and cancel buttons and panels.
Update camera movement and input manager handling with delegates and an interface, wiring the game manager to pan around and refine movement for a solid prototype.
Implement the state pattern by extending the input manager to support pointer down, change, and up events with continuous input, and refactor for area and road placement.
Implement the state pattern in Unity by building an abstract base state with input handlers and a game manager coordinating transitions, then implement states for player selection and building placement.
Implement the state pattern in a city builder by adding selection and building states to the game manager, enabling state-driven input, transitions, and structure placement.
Run play mode unit tests in Unity to verify state transitions in a city builder by setting up fixtures and simulating UI interactions that switch between selection and building states.
Refactor the placement system by introducing a building manager to handle grid creation and interactions, reducing the game manager’s responsibilities and improving modularity for placement and state testing.
Have you ever created a game prototype that was really cool but as you have started building on it every new feature seemed to introduce bugs in the old code? Or maybe this 1 feature that you had in mind and thought as being 2h of work to implement ended up taking 2 weeks?
If this sounds familiar I encourage you to take a look at this course. In this course we will learn best practices for programming games. We will focus on the general game structure, code structure and how to use design patterns in our game to solve different issues that will arise. By using Unit Tests we will create some degree of certainty that our code will run as it should even after adding new features and refactoring the previously written code.
Those are mostly overlooked topics in most courses on how to create games. There is a reason for it. They show you how to create a prototype. Your game prototype must be created fast, can be crude and can have bugs. It's role is to get you feedback if your game idea is promising.
My goal in this course is to give you an idea about broad range of topics mainly connected with programming. On an example of a city builder game we will look at how to use different design patterns, create unit tests and refactor the previously written code to account for the new features that we want to introduce into our game.
After receiving a couple of reviews I can see that sometimes I can go too fast through some aspects and I don't explain some more basic concepts of the code. Please take this into consideration that some intermediate knowledge of C# and a good understanding on how Unity editor works is crucial for you to get the most out of this course.
I hope that I can help you improve your coding skills where it comes to game development. At the same time I am sure that not everyone will be satisfied with my delivery and the quick pace at some points. Please know that you have 30 day to apply for a refund. I don't want anyone to feel dissatisfied with their purchase.
*This course is made using Unity 2019. You should be able to follow along using latest LTS (long term support) version of Unity 2019.