Teaching someone to build a game engine is mostly a lesson in restraint. The subject is enormous, and the temptation is to hand over the whole map at once — entity systems, memory layouts, render passes — before the student has seen a single pixel change colour because of something they typed. What works instead is a small target, a very explicit frame, and a long pause before introducing any abstraction.
Start from something they want to see move
Ask what they want on screen by the end of the first session, and take the smallest version of it. A square that slides with the arrow keys. A cube that spins on its own. A camera that orbits a model. A visible, personal goal beats any curriculum, because it converts every technical decision into a means rather than a rule.
Then say what you are deliberately not covering: no lighting, no models, no editor. Naming the exclusions is what keeps the first session encouraging instead of crushing.
Teach the frame as five sentences
Before the first line of code, write the loop out in words on a whiteboard: read the input, work out how much time passed, update the world, draw it, repeat. Then turn each sentence into a function with that exact name. Beginners can usually read code; what they cannot yet do is hold the idea of a frame in their head, and everything else in an engine is a detail hung on that idea.
Run the loop with a print statement before drawing anything. Seeing the frame counter climb is the moment the subject stops being abstract.
Let them type it, break it, and repair it
- They type every line from a blank file. Copy-paste hides the syntax you are trying to teach.
- After it works, break one line on purpose and ask what the error message is telling them.
- Run the program every ten lines, not at the end of the hour.
Debugging is the actual skill. A beginner who can read an error and form a guess is independent; one who can retype a tutorial is not.
Withhold abstractions until the concrete version hurts
The strongest teaching sequence is: do it the dumb way, feel the pain, then introduce the pattern as relief. Keep the entities in a plain array until adding a fourth type of object becomes annoying, then a component list arrives with a reason attached. Hand someone a general system before they have felt the problem and they will use it as a magic box, which means they cannot debug it.
The same rule applies to your own code. When you pair, resist the urge to show the elegant version of their file; the elegant version is the answer to a question they have not asked.
Review by asking, not by editing
Keep your hands off the keyboard. Ask what happens when the window is resized, what occurs if the file is missing, where the value came from, what happens on the second frame. The answer that starts with “I think” is the next lesson.
You will know the teaching worked when they can explain the frame without notes and fix a small bug while you watch without speaking. Schedule the next topic from whatever they stumbled on, not from the plan you wrote in advance.