Theory: Highlight the mechanical issues of continuous tracking when attempting single, independent actions like attacks or menu choices.
Slide 7: What is an Event?
Direct Script: “In software engineering, an event is simply an occurrence of significance detected by a computer. In real life, an alarm ringing is an event, and your response is waking up.”
Discussion Prompt: Ask students to name physical examples of events in their home or school routines.
Slide 8: Event-Driven Programming
Direct Script: “Instead of running top-to-bottom continuously, event-driven programs listen quietly in the background. The system remains passive until a user click triggers a specific sub-routine.”
Theory: Introduce event-driven architecture, explaining its importance in modern software design and operating systems.
Slide 9: Event Listeners vs Loops
Direct Script: “Imagine checking your phone every two seconds for notifications versus having it ring only when you receive an actual message. The second approach represents an event listener.”
Theory: Contrast CPU-heavy polling loops with lightweight, reactive event listeners.
Slide 10: Analogy: Accelerator vs Button
Direct Script: “Continuous control is like holding the gas pedal down in a car: you maintain progress. Event input is like the car horn: you press it once, and it blows once, regardless of how long your hand rests there.”
Discussion Prompt: Have students brainstorm other gaming mechanics that act like an accelerator or an action button.
Action Reaction: Teacher Guide
Page 2 of 7
Session Facilitation & Speaker Notes
Mr. Norman Trujillo
Page 3: Slides 11 - 15
MakeCode Arcade block implementation and exercise setup.
Slide 11: MakeCode Arcade Controller Events
Direct Script: “In MakeCode Arcade, controller events live inside the red controller toolbox category. Let us open this toolbox and examine the available blocks.”
Walkthrough: Instruct students to open MakeCode Arcade and find the red 'Controller' block section on their screen.
Slide 12: Anatomy of an Event Block
Direct Script: “Look at this red container block. It wraps around other operations. Whatever block sequence we slide inside will run immediately when the event triggers.”
Theory: Explain that event blocks function as independent containers (wrappers) on the open canvas workspace.
Slide 13: Side-by-Side Comparison
Direct Script: “Compare the purple continuous movement block with this red event container. The continuous block moves velocity automatically. The event block responds only on activation.”
Walkthrough: Show the exact visual differences of block shapes, logic execution, and coloring in the editor.
Slide 14: The on A Button Pressed Block
Direct Script: “The A button pressed block is our fundamental wrapper for physical interactions, like shooting, jumping over gaps, or opening locked doors.”
Discussion Prompt: What other gaming interactions should be triggered by the main A button?
Slide 15: Discrete Left Press Exercise
Direct Script: “Let us begin our hands-on exercise. We are going to program a sprite to slide left by exactly 10 pixels on each press. We will follow a four-stage process.”
Theory: Set up student workspace, detailing objectives and preparing them for the physical coding workflow.
Action Reaction: Teacher Guide
Page 3 of 7
Session Facilitation & Speaker Notes
Mr. Norman Trujillo
Page 4: Slides 16 - 20
Live coding step-by-step for discrete sprite movement.
Slide 16: Step 1: Creating the Sprite
Direct Script: “First, initialize your project. In the on-start container, place a set-mySprite block. This instantiates our player asset in computer memory.”
Walkthrough: Guide students to locate the blue 'Sprites' menu and drop the character block inside the blue startup loop.
Slide 17: Step 2: Placing the Event Block
Direct Script: “Next, grab an on-button-pressed block from the red category. Drag it onto your canvas. Use the arrow selection list to change the target button to ‘left’.”
Walkthrough: Show the drop-down selection list inside the red block interface on the screen projector.
Slide 18: Step 3: Modifying Coordinates
Direct Script: “Now, grab a change-coordinate block from the blue category. Slide it inside the event block. Make sure it targets the x coordinate and set the value to -10.”
Walkthrough: Demonstrate sliding the change-x block inside the red frame until it clicks and snaps into position.
Slide 19: How Coordinates Work
Direct Script: “Let us recall the coordinate math of MakeCode Arcade. The screen is 160 pixels wide by 120 pixels high. Subtracting from x shifts us leftwards, while adding to x shifts us rightwards.”
Theory: Detail the X and Y coordinates mapping, noting that Y = 0 starts at the absolute top of the viewport.
Slide 20: Step 4: Simulator Testing
Direct Script: “Now, locate the virtual game simulator panel. Click the left direction button multiple times. Observe how the sprite moves discrete steps instead of sliding continuously.”
Walkthrough: Point to the simulator panel on the left of the editor screen, displaying movement feedback.
Action Reaction: Teacher Guide
Page 4 of 7
Session Facilitation & Speaker Notes
Mr. Norman Trujillo
Page 5: Slides 21 - 25
Jump physics implementation and coordinate math execution.
Slide 21: Guided Discussion: Why Did It Move?
Direct Script: “Why did the character move that way? With event movement, coordinates shift strictly once when the hardware register is fired. This results in absolute discrete control.”
Discussion Prompt: Contrast how chess-like grid movement feels compared to a real-time running simulation.
Slide 22: Exercise 2: Adding a Second Action
Direct Script: “Now, we will add a second event listener to create a tactile jumping mechanism. When button A is pressed, the sprite should jump upwards and fall back down.”
Theory: Introduce vertical axis movement logic, laying out the sequence required for simulating gravity physics without physics engines.
Slide 23: Simulating a Jump with Coordinates
Direct Script: “To simulate jumping, we must decrease Y to shift our player upwards, wait a brief duration, and then increase Y by the same amount to return to the ground.”
Theory: Highlight the directional axis rules: Y decreases to move up, and Y increases to move down.
Slide 24: Jump Code Breakdown
Direct Script: “Drag a red A-button-pressed block onto your grid. Put a change-y by -30 block first, insert a pause block set to 150 milliseconds, and then place a change-y by 30 block last.”
Walkthrough: Show the finished block configuration on the screen, detailing the chronological execution path.
Slide 25: Testing and Tweaking the Jump
Direct Script: “Run your simulation and test your A button. Does the movement feel snappy? If the sprite moves too slow, decrease the pause time. If you want it taller, increase the coordinate values.”
Discussion Prompt: Challenge students to experiment with different millisecond values and compare their results.
Action Reaction: Teacher Guide
Page 5 of 7
Session Facilitation & Speaker Notes
Mr. Norman Trujillo
Page 6: Slides 26 - 30
Student challenge support and common debugging scenarios.
Slide 26: Challenge 1: Teleportation Link
Direct Script: “Here is your first challenge. Program the B button so that pressing it instantly teleports the sprite to the center of the screen, coordinates X = 80, Y = 60, regardless of its position.”
Walkthrough: Monitor the room, offering guidance to students as they design their custom B-button trigger.
Slide 27: Challenge 1: Solution
Direct Script: “To resolve this challenge, use the absolute set-value blocks instead of change-by blocks. This replaces relative offsets with direct coordinate assignments, instantly snapping the character to the center.”
Theory: Explain the difference between absolute value setting (teleportation) and relative incremental offset changes (sliding).
Slide 28: Challenge 2: Action Button Magic
Direct Script: “Now for our second challenge. Program the right arrow event. When clicked, your character must jump 15 pixels to the right AND execute a visual camera shake effect.”
Walkthrough: Circulate throughout the room, helping students locate the screen effects category under the Scene toolbox.
Slide 29: Challenge 2: Solution
Direct Script: “Look at how we stack the horizontal coordinate shift and the visual camera shake effect inside a single container. Both execute in rapid sequence, linking visual feedback to player action.”
Theory: Reinforce the concept of serial thread execution: blocks in a container run top-to-bottom within microseconds.
Slide 30: Scenario 1: The Infinite Jump
Direct Script: “If your sprite jumps up but never returns, double check your coordinates. It is common to accidentally use subtract-Y twice. Ensure your second coordinate block has a positive sign.”
Discussion Prompt: Have students check their neighbors' systems for negative sign bugs.
Action Reaction: Teacher Guide
Page 6 of 7
Session Facilitation & Speaker Notes
Mr. Norman Trujillo
Page 7: Slides 31 - 35
Debugging nest limits, design perspective, and homework review.
Slide 31: Scenario 2: Unresponsive Controls
Direct Script: “If you place an event block inside another event block, the system gets confused and greys it out. Drag the nested container out onto the open workspace grid to fix this.”
Theory: Explain event listener registry limits in backend compilers. Nesting events is a structural syntax error.
Slide 32: When to Use Which Control
Direct Script: “As game designers, you must choose control structures wisely. Use continuous inputs for roaming maps or racing cars. Use discrete event inputs for attacks, menus, and jump actions.”
Discussion Prompt: What control style would you select for a brick-breaker game versus an adventure game?
Slide 33: Key Takeaways
Direct Script: “Remember: events monitor for physical clicks. Horizontal coordinate shifts alter X, while vertical ones modify Y. Keep event containers separated and nested at outer levels.”
Theory: Review key lessons: event registers, screen resolution maps, and workspace syntax standards.
Slide 34: Homework Assignment
Direct Script: “For homework, write a short reflection on these questions. What are the advantages of events? When are they practical? How does the feel of immediate reaction change the player experience?”
Theory: Promote metacognition by linking code structures to the subjective player feel of gaming responsiveness.
Slide 35: Closing & Questions
Direct Script: “Excellent progress today! Email your completed reflections to me at ntrujillo@csa.edu.ni. Prepare to integrate these events into a playable game prototype during our next session.”
Theory: Close class, confirm assignment delivery standards, and provide a preview of the upcoming prototype workshop.
Action Reaction: Teacher Guide
Page 7 of 7