Mina Pêcheux - Since March 2021
This repository contains the code for my on-going series of tutorials on how to make a real-time strategy (RTS) game in the well-known game engine Unity! Throughout this series of tutorials, I explore C# scripting for games, GUI building, event systems, behavior trees, sound optimization...
You can find the list of all tutorials on Medium, or right below:
- Tutorial #1: Placing buildings
- Tutorial #2: Adding a very basic UI
- Tutorial #3: Setting up in-game resources
- Interlude #1: Introducing an event system
- Tutorial #4: Selecting units
- Tutorial #5: Transforming our data into Scriptable Objects
- Tutorial #6: Improving the UI
- Tutorial #7: Polymorphism, take 2!
- Tutorial #8: Boosting our selection feature
- Tutorial #9: Implementing character units and skills
- Tutorial #10: Moving the camera
- Interlude #2: Refactoring the event system
- Tutorial #11: Adding a day-and-night cycle
- Tutorial #12: Moving Character Units
- Tutorial #13: Adding a minimap and fog of war 1/3
- Tutorial #14: Adding a minimap and fog of war 2/3
- Tutorial #15: Adding a minimap and fog of war 3/3
- Tutorial #16: Introducing a sound system 1/2
- Tutorial #17: Introducing a sound system 2/2
- Tutorial #18: Preparing our game parameters
- Tutorial #19: Displaying our in-game settings!
- Tutorial #20: Saving the player’s data properly
- Tutorial #21: Adding players and unit ownership
- Tutorial #22: Producing some resources with our buildings
- Tutorial #23: Implementing behaviour trees for our units 1/3
- Tutorial #24: Implementing behaviour trees for our units 2/3
- Tutorial #25: Implementing behaviour trees for our units 3/3
- Tutorial #26: Levelling up our units! 1/2
- Tutorial #27: Levelling up our units! 2/2
- Tutorial #28: Adding some shortcuts
- Tutorial #29: Improving our players system
- Tutorial #30: Refactoring our save/load system with binary serialisation 1/2
- Tutorial #31: Refactoring our save/load system with binary serialisation 2/2
- Tutorial #32: Creating a debug console
- Tutorial #33: Using Unity’s terrain tools
- Tutorial #34: Improving unit navigation & adding unit formations 1/2
- Tutorial #35: Improving unit navigation & adding unit formations 2/2
- Tutorial #36: Using workers to construct buildings 1/3
- Tutorial #37: Using workers to construct buildings 2/3
- Tutorial #38: Using workers to construct buildings 3/3
- Tutorial #39: Boosting our game scene
- Tutorial #40: Fixing our minimap
The project was written in Unity 2019.3. This implies that, when loading it up with more recent versions of Unity, you'll need to auto-upgrade the project. This usually goes without a hitch, but there is for now 2 bugs that has been spotted by the followers and I:
-
incorrect lighting: upgrading to Unity 2020+ might lead to some strange lighting of the scene (because of pipeline render defaults and lighting settings changes). To get a similar lighting to the original project, make sure that you remove all baked lighting data, that all your (directional) lights are set to "Realtime" and that you ignore the environment lighting.
To do so, open the Window > Rendering > Lighting panel, go to the "Environment" tab, and set the "Intensity Multiplier" variable to 0 both in the Environment Lighting and Environment Reflections sections.
-
FOV shader bug (thanks to @Oarcinae): upgrading to Unity 2019.4 might lead to unexpected behaviour for the FOV shader (because of pipeline render defaults changes); to fix the issue, you can try modifying the
AlphaProjection.shader
and comment out the line:#pragma exclude_renderers d3d11 gles
(still an open issue #2, any help is welcome 🙂)