The Arizona STEM Acceleration Project
Introduction to MS Make Code
(Eat the Food)
Introduction to MS Make Code (Eat the Food)
A [4th - 8th] Grade STEM Lesson
Robert Lane
January 2024
Notes for Teachers
See next slide for a video introduction to MS MakeCode and how I use it in my classroom. I am passionate about MS Makecode for a quick introduction to video game development before you dive into Scratch which can be overwhelming at times. There is not a better coding program to make video successfully in a short amount of time.
List of Materials
Standards
4th Grade :Concept: Algorithms and Programming (AP)
Subconcept: Algorithms (A)
4.AP.A.1 Compare and refine multiple algorithms for the same task and determine which is the most effective. Different algorithms can achieve the same result, though sometimes one algorithm might be most appropriate for a specific situation. Students should be able to look at different ways to solve the same task and decide which would be the best solution. For example, students might compare algorithms that describe how to get ready for school or how to tie their shoes. Students could use a map and plan multiple algorithms to get from one point to another. They could look at routes suggested by mapping software and change the route to something that would be better, based on which route is shortest or fastest or would avoid a problem. Another example might be to write different algorithms to draw a regular polygon and determine which algorithm would be the easiest to modify or repurpose to draw a different polygon.
4th Grade Writing Standards
Text Types and Purposes
Production and Distribution of Writing
4.W.4 Produce clear and coherent writing in which the development and organization are appropriate to task, purpose, and audience. (Grade-specific expectations for writing types are defined in standards 1–3 above)
4.W.5 With guidance and support from peers and adults, develop and strengthen writing as needed by planning, revising, and editing. (Editing for conventions should demonstrate command of Language standards 1–3 up to and including grade 4).
4.W.6 With some guidance and support from adults, use technology, including the internet, to produce and publish writing as well as to interact and collaborate with others; demonstrate sufficient command of keyboarding skills to complete a writing task.
National Standards
Computer Science (CSTA K-12 Standards)
Common Core English Language Arts (CCSS.ELA)
Next Generation Science Standards (NGSS)
Piskel - Sprite Editor
Objectives:
Today students will create Pixel Art for their video game.
Today students will take a stroll down memory lane and learn about the history of video games and why their has been a resurgence in retro pixelated video games.
Today students will write a computer algorithm for their character to eat food.
Today students will debug their computer program to ensure their video game works.
Today students will mod their video game to make the food move and add enemies.
Agenda (lesson time)
To complete this lesson it will take four class periods of 45 minutes.
Class #1 - History/Pixel Art/Game
Class #2 - Make the food move/Countdown
Class #3 - Add Enemy/Mod
Class #4 - Download games onto Gameboy like consoles.
Intro/Driving Question/Opening
How do video games work?
What makes video games fun?
Microsoft MakeCode
Hands-on Computing Education
#hourofcode
MS Make Code Arcade Compatible Devices
MakeCode Arcade
History of Arcade Games
An arcade game is a coin-operated video game machine installed in a public place like a restaurant, or an amusement park.
Arcade games rose to popularity in the 1970’s and 1980’s.
For a complete history, see: https://en.wikipedia.org/wiki/Timeline_of_arcade_video_game_history
The first successful Arcade game was called Pong, created by Atari in 1972.
Your favorite Arcade Games?
Pac-Man
Space Invaders
Donkey Kong
Resurgence of interest…
MakeCode Arcade
MakeCode.com
Getting familiar with MakeCode Arcade
Home Page
Create a New blank Project
Open your recent Projects
Import Projects (via a file or URL)
Step-by-step Tutorials
Game examples
Tutorials, Examples, Lessons
Getting familiar with MakeCode Arcade
Game Simulator
shows what your game looks like
Block Toolbox
Name and Save game to a file
Game controls hover mouse to activate
Simulator Toolbar
Programming
Workspace
Share game
via URL
Switch between
Blocks & JavaScript
Workspace Toolbar
Hide Simulator
Download
to Hardware
Workspace Context Menu
(right-click)
Getting Started
Open your browser to arcade.makecode.com
Or, click on the Arcade card from the MakeCode.com landing page
Create your first game
Eat the Doughnut – move your sprite around the screen and eat the doughnut before the time runs out!
Set the background
Select a background color
Create a Player Sprite
Design your Sprite
Sprite Editor
Pencil
Size
Eraser
Fill
Shape
16 Color Palette
Canvas Size
Undo/Redo
Control the movement of your Sprite
Try it out in Simulator
Create a doughnut Sprite
Set the image and type of doughnut
Set the position of the doughnut
Set the position of the doughnut
The Arcade game screen dimensions are 160 width x 120 height
0
120
Y
X
0
160
(0, 0)
(160, 120)
(160, 0)
(0, 120)
Start the Countdown
Win when you Eat the Doughnut
Win when you Eat the Doughnut
Win when you Eat the Doughnut
Complete Program
Play!
Save your Game
End of Class Period #1
Game Modding
“Modding” or Modifying existing games is a great learning activity
Options
Try JavaScript!
Use a Random Position for doughnut
Use a Random Position for doughnut
Make the doughnut appear and disappear
Make the doughnut appear and disappear
Add sounds
Add Score
Add Effects
Complete Program with Mods
End of Class Period #2
Share your game!
Click the Share button in the top left of the screen
Name your Game
Take a screenshot of your Game
Click to Publish
Copy/Paste game link in email, Share on Facebook, Twitter, or scan QR code on phone
Class #3 & 4
Arcade Hardware
Trade your Meowbits with your Neighbors to play your game!
Download your game to Meowbit
Build your own Arcade Cabinet!
4th and 5th Grade Padlets
Assessment
Differentiation
I always have the code available to to students in the form of a slide or a video. Some students prefer text and others are visual learners. Making sure students have access to what you are doing at all times is essential to getting an entire class with a working game with no bugs.
Remediation
Extension/Enrichment
MS MakeCode challenge cards. Students can be challenged to add lives for their player. They can add levels and change scenes. There really is no limit to what students can produce when you introduce them to the basics of computer science. There is no ceiling for extension or enrichment with this lesson. Just take a look at the Padlet how students have gone above and beyond.