Stage 2 · Lesson 4 of 7
Small scripts and composition
Good gameplay code is built from small parts with one job each: a health , a mover, a damage dealer, a pickup. attaches components to . Godot builds scenes from child nodes.
Unreal adds to Actors. Building objects from parts like this is called composition. You can make a new enemy by combining existing pieces, instead of writing a new class or copying code.
It also makes bugs easier to find, because each part is small. (one class extending another) still has a place, such as a base enemy class, but keep those family trees shallow.
Common trapa single player script of thousands of lines that handles input, health, animation, sound and UI together.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CourseFreeUnity Learn: Junior Programmer Pathway
Unity Technologies · Beginner
Unity's official free C# pathway, with small playable projects in every unit
- GuideFreeLearn C#
Microsoft · Beginner
Microsoft's free C# lessons, for the language itself when Unity code feels unfamiliar
Practise
Keep handy
Also worth your time
The exact order Unity calls Awake, Start, Update, FixedUpdate and the rest
- Game Programming PatternsGo deeper
Free book on the state, observer, component and other patterns games rely on