Chicken Run

Chicken Run

Why did the chicken cross the road? To get her eggs! Help the chicken get her eggs back while dodging traffic in this Frogger inspired game.

The Code

Startup

On startup, we will set all the different types of values like the 8 different car positions, the egg, and the chicken. We will also make the animation for the chicken to add some life to it.

Buttons

Pressed

When one of the directional buttons is pressed, this will start the hopping animation and move the chicken in the direction pressed. We will give the player feedback by making a sound when we do so.

Released

After the player takes the finger off the button, we want to chicken to stop. Here, we will also check if it is out of the limit and make it face down if it is too high up and face up when it is too far down.

Collision

In the game, the player has 3 lives. This first function will subtract a life and tell the player they lost a life. The second function is giving points to the player when they go over one of the eggs.

Adding Car Movement

Lastly, we don’t want the cars to be just sitting there but we want them to move across the screen! Here we set the cars movement speed and where they end up. For certain cars, we want it to take a while before they show up again like the RaceCar because it would be annoying for it to continuously zip across the screen as it just went off.

Going Beyond

Clicking on the button below will take you to the project we just went through. Try changing around the car speeds to make it easier or harder for someone to play!

Start Clucking!

Sprites and Collision

Learn about Sprites and Collisions

Helicopter Ride

Use your helicopter to fly your team back to the base

Particle Effects

Showing off the built in particle effect

Newsletter

Get Social
Latest Press
October 11, 2019
September 26, 2019
August 23, 2019
August 7, 2019
August 5, 2019