Making a Cookie Tapper Game on iPad with Visual Coding
Making a cookie tapper is one of the quickest ways to build a complete game in hyperPad. The player taps a cookie, the score goes up, and a Label shows the new total. This step-by-step tutorial builds that loop on iPad with visual Behaviors, then adds an upgrade the player can buy.
Use the cookie as a starting theme. Give your game its own name, art, and sounds rather than copying another game's assets.
What you need
- hyperPad or hyperPad Starter on iPad. Starter's one Project is enough for this game.
- A cookie Graphic. Draw one in an iPad art app, or import an image you have the rights to use.
- About 30 minutes.
What you will build
| Player action | Game logic | Visible result |
|---|---|---|
| Tap the cookie | Read the score, add the points per tap, save the new value | The score Label updates |
| Tap the upgrade | If the score covers the cost, subtract it and add 1 point per tap | Each tap is worth more |
| Tap reset | Set the score back to 0 | The Label returns to 0 |
Step 1: Set up the Scene
Create a new Project and add these Objects to the Scene:
- a cookie Object in the center
- a Label at the top that shows
0 - an upgrade button Object with a Label that reads
Upgrade: 10 - a small reset button for testing (you can remove it later)
Step 2: Add a score Attribute
Select the cookie Object and add two Attributes:
score, starting at 0perTap, starting at 1
Attributes let your Project remember values that Behaviors can read and change. Keeping both on the cookie puts all the game's numbers in one place.
Step 3: Make the cookie respond to touch
Open the Behavior Editor on the cookie and add Started Touching. This event starts the chain each time the player touches the cookie. Connect it to:
- Get Attribute to read the current
score. - Add Values with
scoreas the first input and 1 as the second. - Set Attribute to save the sum as the new
score.
The order matters. Read the current value, calculate the next one, save it, then update the screen. The same pattern works for health, coins, and any other counter. If this is your first Behavior Tree, read the Behavior Interface overview first.
Step 4: Show the score in a Label
Pass the new score into Set Label and point it at the score Label. Press play and tap the cookie. The number should climb by one with every tap.
If the score Label stays at 0, check the value connected to Set Label. If the Label changes but jumps by the wrong amount, check the inputs on Add Values.
Step 5: Add tap feedback
Once the score works, make each tap feel good. After Set Label, add a quick Scale By to pulse the cookie and a Play Sound for a short crunch. Keep the effect brief so the cookie is ready for the next tap.
Test feedback and score separately. If the animation plays but the number does not change, check the Attribute chain.
Step 6: Add an upgrade
An upgrade gives the player a choice: spend points now so every future tap earns more. This one costs 10 points and adds 1 to perTap.
- On the upgrade button, add Started Touching.
- Use Get Attribute to read
scorefrom the cookie Object. - Add If to check whether
scoreis 10 or more. - When it is, subtract 10 from
scorewith Subtract Values, then save it with Set Attribute. - Read
perTap, add 1, and save it back with Set Attribute. - Update the score Label with Set Label.
Now go back to the cookie's tap chain from Step 3. Replace the fixed 1 in Add Values with a Get Attribute that reads perTap. Each upgrade now makes every tap worth one more point.
To make later upgrades harder to reach, add a third Attribute for the cost and raise it after each purchase. For a full store with several items, follow the currency and virtual shop tutorial in the hyperPad documentation.
Playtest the complete loop
Start from a score of 0 and run through each check.
| Test | Expected result |
|---|---|
| Tap once | The score increases by exactly 1 |
| Tap quickly many times | Every tap produces one score update |
| Tap upgrade with fewer than 10 points | Nothing changes |
| Tap upgrade with 10 or more | The score drops by 10 and each tap now adds 2 |
| Use reset | The Attribute and the Label both return to 0 |
Change one value or connection at a time. That makes it easy to tell a logic error from an effect that only needs tuning.
FAQ
Do I need to know how to code to make a tapper game?
No. You build the whole game with Behaviors in the Behavior Editor by connecting events and actions. You still learn real programming ideas like events, variables, and conditions.
Can I make this game with hyperPad Starter?
Yes. hyperPad Starter is free and includes one Project, which is enough for a cookie tapper.
Why doesn't my score go up when I tap?
Check that Started Touching is on the cookie Object and that Set Attribute saves to score. Then confirm Set Label points at the right Label.
Can I share my cookie tapper?
Yes. Publish it to the hyperPad Hub so other creators can play it. The paid hyperPad app can also Export it to the App Store.
Next step: turn your tapper into a full clicker
Your cookie tapper now has a score, feedback, and an upgrade. Next, add a second upgrade that earns points automatically over time, then ask a friend to play it without instructions. When it is ready, share it with the hyperPad community for feedback. Want another small tap-based project after this one? Try making a one-button game on iPad. If you like simple arcade loops, try making retro-style games on iPad next. For a classic that adds movement and a growing body, see making a Snake game on iPad without code.
