Wednesday, April 17, 2024
banner
Top Selling Multipurpose WP Theme

Flappy Hen is an iconic sport. Gamers should fly the fowl so far as doable.

How do I play the Flappy Hen sport?

The participant controls the fowl utilizing the spacebar. Each time the participant presses the spacebar, the fowl flaps its wings and flies away. The fowl should cross the pipe whereas flying. Every time a fowl crosses the pipe, the participant beneficial properties a rating. If the fowl touches the pipe, the sport is over.

Steps to create a Flappy Hen sport

Step 1: Create the background

Click on on the background possibility choice within the backside proper nook and choose the blue sky background.

flappy bird game

Step 2: Create the parrot and pipe.

[スプライト オプションを選択]and choose the parrot as proven under.

Change the scale of the parrot to 25.

For pipes, click on the Add Sprite possibility and choose the pipe saved in your pc.

Change the pipe measurement to 150.

flappy bird scratch game
Flappy bird scratch game background

Add pipe sprite

Flappy bird game for kids

Step 3: Write code to loop the pipe in-game

Flappy Bird game code for kids

If you happen to click on Flag, the pipe will clone itself each 2 seconds in an everlasting loop. Because of this pipes will proceed to type till the tip of the sport.

Step 4: Pipes transfer from left to proper when cloning

Scratch's Flappy Bird game

When a replica of a pipe is created, the pipe is created with an x ​​worth of 240 and a y worth of -80 to 80. It then strikes from proper to left each 4 seconds till the x place is -240. The y place would be the earlier place of the pipe.

Step 5: Make the parrot flap its wings if you press the spacebar.

Scratch's Flappy Bird game

Click on on the flag and the fowl will transfer again to its unique place. Then the y place is decreased by 3 pixels. This implies the fowl will transfer down.

Flappy bird game for kids

Urgent the house bar increments the y place by 6 and strikes the fowl up. Presently, hold the fowl costume with its wings down. The costume then adjustments to a state with its wings raised and the fowl begins to rise. Notice that the fowl is consistently transferring down in a loop. Press the house bar and the fowl will begin transferring up, making it seem like the fowl is flapping its wings.

Step 6: Earn factors in video games

Scratch's Flappy Bird game

Create a variable rating and initially set the worth to 0.

flappy bird game

When the pipe begins as a clone, we have to test if the x-position of the fowl is larger than the x-position of the opposite pipe. Because of this factors are added because the fowl crosses the pipe.

Step 7: Hen Sport Over Code

Scratch programming Flappy Bird game

If the fowl touches the pipe or touches the sting of the display, a sport over message might be broadcast. All different sprites should cease transferring. This implies the pipe will cease looping.

Step 8: Sport Over Code for Pipe

Scratch Flappy Bird Game

The sport is over when the pipe receives a message.

I hope this helps provide you with some concepts on tips on how to code this Flappy Hen sport. Now let’s create your personal sport.

Additionally learn: 10 Video games to Code with Scratch, Math Classes for Children, NWEA MAP Checks for Children.

banner
Top Selling Multipurpose WP Theme

Converter

Top Selling Multipurpose WP Theme

Newsletter

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

banner
Top Selling Multipurpose WP Theme

Leave a Comment

banner
Top Selling Multipurpose WP Theme

Latest

Best selling

22000,00 $
16000,00 $
6500,00 $

Top rated

6500,00 $
22000,00 $
900000,00 $

Products

Knowledge Unleashed
Knowledge Unleashed

Welcome to Ivugangingo!

At Ivugangingo, we're passionate about delivering insightful content that empowers and informs our readers across a spectrum of crucial topics. Whether you're delving into the world of insurance, navigating the complexities of cryptocurrency, or seeking wellness tips in health and fitness, we've got you covered.