Introduction
In this Hour of Code lesson, students will create a fun interactive Cookie Clicker game. They'll design a cookie that increases a counter when clicked, animate it with a bounce effect, and reward the player after reaching a target number of clicks.
Objectives
Students will:
- Design a simple interactive game using Elementari’s visual layout tools.
- Use coding blocks to track and update a variable when an object is clicked.
- Incorporate animation and sound to create engaging player feedback.
- Apply basic logic to trigger events when specific conditions are met (e.g. reaching 10 clicks).
Code Stories and Games with Elementari
With Elementari, students bring their code to life through storytelling and interactive design. This project introduces core coding concepts like variables, events, and conditionals in a creative, game-based format that’s simple and fun for beginners.
New to Elementari? Click on the orange Start button to jump right into the lesson for free. Check out our Getting Started Guide for an overview of how Elementari works with your class. Get started for free for up to 35 student accounts.
Coding Concepts Covered
Functions in Sequence Increment Number Variable ConditionalsStudent Instructions
Choose a cookie image and a title text for your game screen.
Create and display a number variable to track the number of cookies.
Use the Increment Variable
block to make the cookie image add 1 to the variable cookies each time it is clicked. Play a sound effect as well!
Add logic to have the cookie bounce when players reach 10 cookies.
Add a background and props!
Interactive Project Example for Students
Play through this lesson's example project created on Elementari. Use this example to guide and motivate your students.