UESL shield and game controller

UESL Game Maker · Mission 1 of 2

Give your game a memory

Store a player profile, preserve a checkpoint, and update a star counter.

Classroom prototype: UESL Star Trail, a game in which players collect stars across levels.

UESL’s foundation supports community and opportunities through gaming for people with intellectual and developmental disabilities. Our examples model a game maker’s settings and scores; ask players what helps them enjoy a game.

1. LxD Cycle Process

Empathize: A game maker needs a clear way to represent player settings and progress. A player may want reduced motion or a slower preview.

Define:

  • POV: New makers need to trace each state change so a checkpoint and a live score do not get confused.
  • Learning goal: Choose types, initialize meaningful variables and explain assignment order.

Ideate:

  • HMW: How might a player see exactly what changed after earning a bonus?
  • Activity: Predict the star counter, playtest it, then compare the stored and updated totals.

Prototype & Test: Build the examples below. Ask a peer to explain the checkpoint and suggest one useful setting. Revise from their actual feedback.

2. Lesson Plan

Objective: Model a UESL game’s state with variables and assignments.

Success criteria: Choose a suitable type, trace reassignment, and explain why a stored total must be recalculated.

Tech Talk · 3 minutes

A variable names a current value. game_title names text; level_one_stars names a count. Python names are case-sensitive, cannot begin with a digit, and cannot be keywords. Choose names that explain their purpose.

Evaluate the right side first, then assign the result to the left. stars = stars + 5 needs an initial value. Each assignment replaces the previous value; a total is a stored result, not a live formula. Python names can later refer to another type, but keeping a consistent purpose makes code clearer.

From College Board: Topic 3.1 covers representing values, choosing meaningful names/types, and tracing the latest assignment (AAP-1.A/B, pp. 63–64). The AP assignment arrow is ←; = tests equality.

3. Reference Guide

Game-maker data Python type/example Why this type?
Game name or player tag str: "Star Trail", "007" Text keeps letters and leading zeros.
Collected stars int: 10 Count whole items.
Preview speed multiplier float: 0.75 Allow a fractional speed.
Reduced-motion setting bool: True A true/false choice.
Multiple level scores list: [10, 20, 15] A collection, introduced in 3.2.

Initialization gives a name its first value; reassignment replaces it. Python needs no separate typed declaration. "10" is text, while 10 is numeric: Python input() returns text, so int("10") + 5 gives 15 (Python input() documentation).

Operation Python College Board pseudocode
Initialize stars = 10 stars ← 10
Update stars = stars + 5 stars ← stars + 5
Compare stars == 10 stars = 10
Display print(stars) DISPLAY(stars)

AP uses Boolean values true/false; the OCS runner spells them TRUE/FALSE. College Board’s DISPLAY adds a space; this runner displays each call on a new line. Our paired examples print the same values in the same order without nonstandard text-plus-number expressions.

4. Code Examples

Playtest controls: In C and Popcorn, select Python or Pseudocode to load the matching program. Pseudocode comments explain each line. Edits stay while switching; Save keeps the current code and language after reload. The trash button restores the Python starter. Changing one version does not translate your edits into the other.

A. Simple · Set up a player profile

game_title = "UESL Star Trail"
player_tag = "007"
preview_speed = 0.75
reduced_motion = True
print(game_title)
print(player_tag)
print(preview_speed)
print(reduced_motion)

Output: UESL Star Trail, 007, 0.75, True. These are configuration values; applying them to a game would require connecting them to its controls.

B. Intermediate · Preserve a checkpoint

stars = 10
checkpoint_stars = stars
stars = stars + 5
checkpoint_stars = checkpoint_stars + 2
print(stars)
print(checkpoint_stars)

Output: 15, then 12. Both started at 10, then changed independently. A checkpoint stores the value at the moment of assignment.

C. Complex · Playtest a star bonus

Predict the original, stored and recalculated totals. Then change the bonus from 5 to 0.

Code Runner Challenge

UESL 3.1 - Playtest the star counter

View IPYNB Source
# CODE_RUNNER: UESL 3.1 - Playtest the star counter
game_title = "UESL Star Trail"
level_one_stars = 10
level_two_stars = 20
level_three_stars = 15
total_stars = level_one_stars + level_two_stars + level_three_stars
print(game_title)
print(total_stars)
level_two_stars = level_two_stars + 5
print(total_stars)
total_stars = level_one_stars + level_two_stars + level_three_stars
print(total_stars)
Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...

Both versions output: UESL Star Trail, 45, 45, 50.

Star-counter snapshot Before bonus After bonus, before recalculation After recalculation
Second level 20 25 25
Stored total 45 45 50

5. Hacks & Practice Tasks

Create your homework page

  1. In your portfolio repository, create navigation/homework/3-1.md; create the folders if needed.
  2. Paste this frontmatter at the top, replacing your-github-id:

    ---
    layout: post
    title: UESL 3.1 Homework
    author: your-github-id
    permalink: /homework/3-1/
    ---
    
  3. Add ## Popcorn, ## MCQ, ## Homework, ## Tests and ## Design Thinking. Copy the Popcorn example and adapt Example C. Format your work like this:

    ```python
    # Your UESL prototype goes here.
    ```
    Prediction: ...
    Actual output: ...
    
  4. Run your Python solution in the lesson or your class editor. Markdown code fences display code; they do not execute it. Record both required tests and explain the result.
  5. Preview, commit and push. Open your published /homework/3-1/ page and submit its full URL through the assignment form below. Include MCQ 3.1: __/4 | answers: __,__,__,__ in the notes.

Submission rules: Initialize every test, identify the code language, include actual output, and verify your published link opens. Keep private player information out of examples.

Popcorn Hack · Checkpoint challenge

Two minutes: Predict the live stars and checkpoint stars. Run, then explain why they differ.

Code Runner Challenge

UESL 3.1 Popcorn - Keep the checkpoint

View IPYNB Source
# CODE_RUNNER: UESL 3.1 Popcorn - Keep the checkpoint
stars = 8
checkpoint_stars = stars
stars = stars + 4
print(stars)
print(checkpoint_stars)
Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...
Checkpoint debrief · reveal after predicting

Both versions display 12, then 8. The checkpoint holds the earlier value.

MCQ Check · Maker decisions

Record A, B or C for each before revealing the key.

  1. A player tag is "007". Best type? A integer · B string · C Boolean.
  2. After stars ← 8, checkpoint ← stars, stars ← 12, what is checkpoint? A 8 · B 12 · C 20.
  3. Which AP operator assigns a value? A = · B == · C ←.
  4. A bonus changes a level’s stars. When does a previously stored total change? A Automatically · B When reassigned/recalculated · C When displayed.
MCQ answers and explanations

B, A, C, B. Text preserves 007; the checkpoint copied 8; the arrow assigns; displaying a total does not recalculate it. Count one point per correct answer and record your actual score out of 4.

Homework Hack · Build your UESL star counter

  1. Choose a game name and a reduced-motion Boolean setting. Use separate level-star variables starting at 12, 18, 10; print the name, setting and total.
  2. Add a bonus of 5 to level two. Print the stored total, then recalculate and print it again.
  3. Record predictions and actual results: original/stored total 40, updated total 45. Restart with bonus 0; all three totals should be 40.
  4. Design-thinking note: Name a player’s need, your goal, a setting/representation you considered, the prototype you built, and one test or revision. Explain why reduced motion should be a player choice.

Next mission: 3.2 replaces separate level variables with a collection. What would 100 separate variables cost a game maker to maintain?

6. Grading Plan (1 Point Total)

Part Points Evidence
Popcorn 0.2 Prediction, working code and checkpoint explanation.
MCQ 0.2 0.05 per correct answer; record answers and score.
Homework 0.3 Suitable names/types and correct bonus/recalculation.
Tests 0.2 Both bonus cases and actual output explained.
Design thinking 0.1 Player need, choices, prototype and test/revision.

Quick validation: All sections present; fresh starting values; totals match; explain assignment versus comparison; published link opens.

7. Lesson Revisions & Feedback Evidence

  • Feedback received: The previous runner PR was too broad for this lesson contribution.
  • Revision made: Kept the changes in the two lesson pages; reused OCS runners and styles, added UESL examples and the seven-stage lesson structure.
  • Peer playtest: Pending. Record reviewer → confusion or access need → revision → actual retest result. Do not invent player feedback.

References

Credits: Adapted by Adhvay Iyer, Ishan Shrivastava, and Rohan Chandra; based on John Mortensen’s original variables lesson.

Submit: Published homework URL, Popcorn, MCQ answers/score, both tests and your design-thinking note. Python uses the existing OCS execution service; if it is unavailable, retry or use your class editor. Pseudocode runs in the page.

Submit Assignment

Click to upload or drag and drop
PDF, ZIP, images, documents, or Jupyter notebooks (.ipynb) (Max 10MB per file)

Need to update a submission later? Open the submissions dashboard.