Skip to content

CCindy7/RedLightGreenLight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Red light, green light

My first front-end project, written after a month @Ironhack web dev bootcamp.

It was inspired by the tv show 'Squid Game' and is a combination of the children game 'red light, green ligth' and an obstacles race.

Technologies used :

HTML, CSS, JS, Canvas

Details

When the player clicks on 'Play', the game canvas is drawn and the music starts playing.
Tortillon, the turtle has to reach the sea, but can only move if music is playing.
The player makes Tortillon move using the arrow keys (right, left, up).

There are three differents music speeds, which are played randomly.
Once a music comes to end, a new one is played at a random time between 2 and 4s.

If Tortillon moves when music is not playing, he returns to the starting point and there is a sound message explaning the penalty.

Crabs move in the opposite direction of Tortillon when music is playing.
If not, they stay in their position.

If Tortillon gets pinched by a crab or bumps into a fence, music stops playing and a sound indicating the collision is played.
A “gameover” message appears in the form of a cloud in the sky.
A timer is activated (setTimeout) and after 2s, the player returns to the homepage.

If Tortillon reaches the sea, the player wins, the music stops playing, and there is a diving sound.
A plane flies in the sky showing a congratulations message, then the player returns to the homepage.

Give it a try

Click to play

Homepage

Homepage (2)

Playing

Playing

Loose

Game over

Win

Win