Back

Play Junkyard

divider

This is what you are building. Knock down every crate in the yard with five iron balls before forty seconds run out, and use the red barrels: they explode. By the end of Activity 1.11 you will have built the game underneath all of this, and everything else on this page is an add-on you can build next.

Controls: press Space on the title screen to start. Click anywhere to launch a ball from the crane toward the mouse. You get five. Press R to start the round over.

divider

What's In Here

Nothing in this game is decoration. Most of it comes from the first eleven activities; the rest are DLC, optional add-ons you can build once you have the core game working.

What you can seeWhere you build it
Anything at all on screenActivity 1.1
The yard, the floor, and crates sitting where you put themActivity 1.2
Crates that fall, land, and lean on each otherActivity 1.3
A stack of crates that are all the same crateActivity 1.4
A ball that flies at your mouse and wrecks the stackActivity 1.5
The game running in this page instead of in UnityActivity 1.6
How hard the ball flies and how heavy it isActivity 1.7
Three balls, a score, and a way to winActivity 1.8
Pressing R to start overActivity 1.9
The title screen and the round clockActivity 1.10
Heavy metal crates mixed in with the wooden onesActivity 1.11
Red barrels that explode and set each other offDLC: Explosive Barrels
Wooden crates that smash into piecesDLC: Crates That Break Apart
The slow-motion moment and the screen shakeDLC: Slow Motion on Impact
Crates, balls and the clock across the top, and the banner at the endDLC: Scoreboard

Notice how the work splits. Gravity, bouncing and crates tipping over all come from the engine, and you get them in Activity 1.3 without writing a line of code. Everything that makes it a game instead of a toy (the three balls, the clock, the win) is code you write in Activities 1.7 to 1.11.

The level is different too. In Activity 1.11 your game builds a new random stack every round. This yard was placed by hand, crate by crate, so that one good shot can set off a chain reaction.

divider

Before You Build

Play it for two minutes, then be ready to answer these out loud. No writing, nothing to submit.

  1. Where did you aim the second time, and why was it different from the first?
  2. Which shot set off the biggest chain reaction? Why do you think the barrels were put where they are?
  3. Name one thing you would add. Keep it to one, and keep it small enough to build in a day.

Hold onto your answer to the third one. Some of them are already built as DLC for this game, and the rest are fair game once you can write the code.