Tynker Running animation Game – Step-by-Step Guide for Beginners

Tynker Running Game – Step-by-Step Guide for Beginners

In this project, we create a Running Game using Tynker where two actors run automatically across lanes.Players can boost the runner using the space key, and the game decides a winner based on who reaches the finish line first.

 Game Objective

  • The actor runs continuously from left to right

  • Press SPACE to boost speed

  • Touching the green equalizer keeps the runner moving

  • Touching the red-green equalizer declares the winner

 Elements Used in the Game

 Actors

  • Actor 1 – Player runner

  • Actor 2 – Opponent runner

 Game Objects

  • Green Equalizer – Track boundary

  • Red-Green Equalizer – Finish line

  • Background – Running lanes

 Step-by-Step Coding Guidelines

 Step 1: Set Up the Actor Movement

Code Logic:

on start
→ forever
→ set rotation style left-right
→ move 35 pixels
→ animate Side Run
→ wait 0.7 seconds

Explanation:

  • forever keeps the actor running continuously

  • set rotation style left-right prevents upside-down rotation

  • animate Side Run gives a realistic running effect

  • wait controls speed (lower value = faster)

 Step 2: Add Boost Using Keyboard Control

Code:

when space pressed
→ move 25 pixels

Explanation:

  • Each time the space bar is pressed, the runner gets a speed boost

  • Makes the game interactive and fun

 Tip: You can change pixels to adjust difficulty.

 Step 3: Lane Control Using Touch Detection

Code:

when touching Green Equalizer occurs
→ point towards left edge

Explanation:

  • Keeps the runner aligned in the lane

  • Prevents the actor from going out of bounds

  • Introduces collision-based direction control


 Step 4: Declare the Winner

Code:

when touching red green equalizer occurs
→ say "Actor 1 won!" for 2 seconds

Explanation:

  • The red-green equalizer acts as the finish line

  • First actor to touch it wins

  • Adds a clear goal to the game

 Gameplay Instructions (For Players)

  • 🏁 Game starts automatically

  • 🏃 Actors run continuously

  • ⌨ Press SPACE to boost speed

  • 🟢 Stay in your lane

  • 🔴 Touch the finish line to win
















 

 

Comments