Skip to main content

Setup

Python Arcade is one game that grows over ten stages. Your workspace is the Trinket rail on the right side of every stage page. It starts closed so the lesson has more room. Open it when you are ready to code; it will stay open as you move between stages until you close it.

Setup takes about two minutes. No account, remix, or pasted link is required to start coding.

Save if you need tomorrow's work

The blank Trinket rail lets you start right away. If you need to keep the same project across devices or another day, use Trinket's Save, Remix, or Share tools in the rail before you leave.

Step 1 - Find your workspace

Look at the right side of this page and click Open on the workspace rail. You should see a Python Trinket with a code editor and a Run button.

After you open it, that same rail stays open as you move through the course. Each stage gives you new code to add to the same game. If you close it, it stays closed until you open it again.

Step 2 - Confirm it runs

Click inside the rail, replace anything in the editor with this tiny test, and press Run:

Think first

What are we testing?

Before you run anything, predict what the screen should do if the background is black and the writer color is white.

Check your thinking

The output area should turn black, and the message should appear in white.

Your turn

Type the smoke test

Type the test yourself. Do not worry about memorizing it yet; the goal is to prove Trinket can run Turtle code.

Need a hint?

Type it line by line. The first four non-empty lines import turtle, create the screen, set the background, then create the writer.

Python code task
Start your file

main.py

Where it goes: Replace everything currently in Trinket's main.py with this short test.

This is only a quick Trinket test. Stage 1 will replace it.

#!/bin/python3
import turtle

screen = turtle.Screen()
screen.bgcolor("black")

writer = turtle.Turtle()
writer.hideturtle()
writer.color("white")
writer.write("Python Arcade is ready", align="center", font=("Arial", 18, "bold"))

turtle.done()

You should see a black screen with the message Python Arcade is ready.

Step 3 - Know how to save

For a single class, you can keep working in the rail. For a multi-day camp, save before you leave:

  1. Open the Trinket menu or sharing tools in the rail.
  2. Choose Save, Remix, or Share, depending on what Trinket shows you.
  3. If your Code Coach asks you to sign in, use the account they provide.

Saving is a Trinket feature, not a Creator Hub step. The course itself no longer needs you to paste a Trinket link.

Optional - Download the sprite pack

The core game starts with Turtle shapes: a square-built cannon and circle aliens. If you want the finished game to look closer to the Python Arcade hero image, download these sprite skins and upload them into the same Trinket.

These files are GIFs on purpose. Python Turtle image shapes are most reliable in Trinket when the uploaded sprite is a .gif.

To load them into Trinket:

  1. Download each GIF above.
  2. In the Trinket rail, open the project file or assets panel.
  3. Upload all six GIF files into the same project as your Python code.
  4. Keep the filenames exactly: player-ship.gif, alien-purple.gif, alien-blue.gif, alien-green.gif, alien-yellow.gif, and alien-red.gif.

The stages still work if you skip this. The sprite code later in the course includes a fallback so missing files use the original square and circle shapes instead.

Setup check

  • You opened the right rail and it shows a Python Trinket.
  • The test program runs and you see the white text.
  • You know where Trinket's save or share tools are if your class needs them.
  • Optional: the Python Arcade GIF sprites are uploaded to Trinket with their exact filenames.