← Teacher guide

A first game in Construct

Students build Spell Caster with Construct 3's guided tour or its written Beginner's guide (the same game either way), then sort what the game does into behaviours (the engine moves the object every moment) and events (a condition, then actions). They change one event, find where damage is set, and make a change of their own.

Construct games · Start here · about 60 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Predict 3 min · Build it 25–30 min · Investigate 10 min · Modify 7 min · Make 10 min

Before class

Try it first on a student laptop: open editor.construct.net and choose Take a guided tour. Construct needs WebGL (graphics support in the browser). Without it the editor loads but warns that it can't open any layout views, and nothing can be built. Locked-down or old laptops are the usual cause; try another browser or an updated one.

The free edition is enough: no sign-in, no seats. Spell Caster uses 10 events, and the free edition allows 50. Students should save a copy of their project to their device before closing the tab (Construct keeps nothing for them unless they sign in), so a second lesson can carry on from it.

Two routes, one game: the guided tour, inside the editor, points at each thing to click; the Beginner's guide on construct.net is the written version. Students who were away, or who want to go back over a step, can use the guide. Construct updates itself, so a step may look slightly different from the guide's screenshots.

The one idea: a behaviour is something the engine does for an object every moment; an event says when something happens and what to do then. Picking (the wider step) is the next big idea and gets its own lesson later; here it's only a first look.

The Beginner's guide is by Scirra (Construct's makers), licensed CC BY 4.0. This lesson links to it and does not copy it.

Running the lesson

  1. Predict: most students say nothing happens because no event uses the keys. Leave it open until they play.
  2. Build it: circulate during the first event. Ask which side is when and which side is what to do.
  3. Investigate: for each sorted item, ask where in Construct you'd look to change it: the object's behaviours, or the event sheet.
  4. Modify: insist on a prediction before they change the 3. Then ask them to change it back.
  5. Make: ask each student to name their own change as a behaviour change or an event change.

In class

On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.

The hard part (on purpose)

The build takes most of the lesson, and fast builders click through the tour without reading what each step is for. Stop the class once the first event is added and ask what the left side and the right side of the row each mean.

When students get stuck

What you will seeA question to askThe fix
The editor says it failed to initialise WebGL.Which browser are you using?Try an up-to-date Chrome or Edge, or another laptop. If none work, pair the student with someone whose laptop does.
A student lost their place in the guided tour.What's the last thing you added?Open the Beginner's guide and find that step. It's the same game, so they can carry on from there.
A student thinks an event is needed for every movement.Which object moves, and what behaviours does it have?Click the object and look at Behaviors in the Properties panel. The behaviour is doing the moving.
A student can't find where to change damage.At what moment does a goblin get hurt?When a spell hits it, so look for the event with Spell on collision with Goblin.

Answers to the checks

  1. do the arrow keys work?: Spell Caster's event sheet has ten events. Not one of them mentions the arrow keys. When you play the game, what will the arrow keys do?
    They move the player. The Player object has the 8 Direction behaviour, so the engine moves it with the arrow keys every moment. No event is needed.
  2. Sort them: What makes each of these happen in Spell Caster: a behaviour, or an event?
    The player moves with the arrow keys → A behaviour; A spell flies forward after it appears → A behaviour; A goblin walks across the screen → A behaviour; The player turns to face the mouse → An event; A spell appears when you click → An event; A new goblin arrives every 3 seconds → An event
  3. Green arrows: Some events have a green arrow beside the condition, such as "On left button clicked". "Every tick" doesn't have one. What's the difference?
    A green arrow: once, at the moment. Every tick: over and over
    The green arrow marks a trigger: it fires once at the moment, such as each click. Every tick runs on every frame, about 60 times a second, which is why the player keeps turning to follow the mouse.
  4. Find Nib's mistake: Nib's player drifts forward on its own. Click the line where Nib first goes wrong.
    line 3
    Line 3: the 8 Direction behaviour already moves the player with the arrow keys. Nib added an event that also moves it, every tick, whether a key is pressed or not. Delete that event.
  5. Predict the change: Event 8 says: Every 3 seconds, create a Goblin. You change the 3 to 1. What will happen?
    Goblins arrive three times as often
    The event makes a new goblin each time the timer comes round. Once a second instead of once every 3 seconds means three times as many.
  6. Find the right event: You want each spell to do 2 damage instead of 1. Which part of Spell Caster do you change?
    The Spell on collision with Goblin event
    Damage happens when a spell hits a goblin, so it's in that event's actions: Goblin, subtract 1 from health. Change the 1 to 2.
  7. Wider: which goblins lose health?: Five goblins are on the screen. A spell hits one of them. The event runs: Goblin, subtract 1 from health. How many goblins lose health?
    Only the goblin the spell hit
    "On collision with Goblin" picks only the goblin that was hit. The actions underneath then apply only to that one. This is called picking.

Stretch and support

Stretch: Make a goblin that's harder to beat (more health) and worth more points, without adding a new event. Which existing events and properties do you change?

Support: Pair students for the build: one reads the step, one clicks, swapping each event.

Exit ticket

In Spell Caster, a spell flies forward after you click. What makes it appear, and what makes it fly?

An event makes it appear (on left button clicked, spawn a Spell). Its Bullet behaviour makes it fly.

What each step is for

Where it leads

Next in Construct games (planned): Objects and layouts, then Behaviours, which is the home of the idea planted here. Students who did App Builder apps already know events, variables, sub-events and picking.

For students who did MakeCode Arcade: Arcade moves sprites with velocity blocks and a controller block, where Construct uses behaviours. Same job, different tool.