Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do make a flappy bird game
- monkey2012halfpint
-
0 posts
How do make a flappy bird game
How do you make a flappy bird game can I have some code help
- kiwilover2736
-
1000+ posts
How do make a flappy bird game
There are various tutorials on YouTube, so i'd recommend searching for one. You can always also check already existing Flappy Bird games here on Scratch!
- Zenocker
-
9 posts
How do make a flappy bird game
Look at some tutorials! They’re basically everywhere.
Just look it up on google/YouTube.
Here’s the first video I found when searching on google:
https://www.youtube.com/watch?v=WNElB_uppNQ
(Not advertisement)
Just look it up on google/YouTube.
Here’s the first video I found when searching on google:
https://www.youtube.com/watch?v=WNElB_uppNQ
(Not advertisement)
- OsomKoolGuy
-
78 posts
How do make a flappy bird game
you can use some code like this to get the bird to work:
when green flag clickedThen for the pipes you can use
forever
if <mouse down?> then
change y by (10)
end
change y by (-10)
end
when green flag clicked
forever
if <touching [sprite1 v] ?> then
stop [all v]
end
end
when green flag clickedYou could program a velocity system for the bird if you know how instead of the more simple approach given
forever
repeat until <touching [edge v] ?>
go to x: (-200) y: (0)
change x by (-10)
end
end
- youormeletsbringit
-
74 posts
How do make a flappy bird game
You can get an idea from the code in my project https://scratch.mit.edu/projects/1000104964
- abubriski
-
500+ posts
How do make a flappy bird game
when green flag clicked
forever
change [yV v] by [-1]
change y by (yV)
end
when green flag clicked
forever
if <key [space v] pressed?> then
set [yV v] to [5]
wait until <not <key [space v] pressed?>>
end
end
- abubriski
-
500+ posts
How do make a flappy bird game
And for the pipes:when green flag clicked
forever
change [yV v] by [-1]
change y by (yV)
endwhen green flag clicked
forever
if <key [space v] pressed?> then
set [yV v] to [5]
wait until <not <key [space v] pressed?>>
end
end
when green flag clicked
go to x: (240) y: (0)
forever
wait (pick random (3) to (10)) secs
create clone of [myself v]
end
when I start as a clone
glide (5) secs to x: (-240) y: (0)
delete this clone
Last edited by abubriski (June 5, 2024 12:11:32)
- PointerOS_software
-
35 posts
How do make a flappy bird game
Just put this code on the bird sprite: How do you make a flappy bird game can I have some code help
when green flag clicked
forever
if <not <<key [whichever key] pressed?>>> then
repeat until <(vertical velocity) = [0]>
change [ vertical velocity] by [-1]
end
else
set [ vertical velocity] to [5]
end
end
you can increase the vertical velocity value in the else branch to increase the speed of falling. Also you can rearrange the code so as to omit the “not” operator if u want.
follow this code by:
when green flag clicked
forever
change y by (vertical velocity)
end
then go to the obstacle sprite and you can make some clones scripts for the obstacles and if then clone touching bird, broadcast death, game over.
- PointerOS_software
-
35 posts
How do make a flappy bird game
The mouse down script could be abused and players could just hold onto the mouse button instead of clicking in an order, also changing Y this drastically will make way for some choppy movements. you can use some code like this to get the bird to work:when green flag clickedThen for the pipes you can use
forever
if <mouse down?> then
change y by (10)
end
change y by (-10)
end
when green flag clicked
forever
if <touching [sprite1 v] ?> then
stop [all v]
end
endwhen green flag clickedYou could program a velocity system for the bird if you know how instead of the more simple approach given
forever
repeat until <touching [edge v] ?>
go to x: (-200) y: (0)
change x by (-10)
end
end
- ayushdel_test
-
1 post
How do make a flappy bird game
Bird code -
obs-
when green flag clicked
set [gravity v] to [0]
set [canI v] to [1]
forever
change y by (gravity)
change [gravity v] by (-1)
if <touching [obs v] ?> then
set [gravity v] to [-10]
set [canI v] to [0]
end
if <touching [edge v] ?> then
set [canI v] to [0]
end
end
when [ space v] key pressed
if <(canI) = [1]> then
set [gravity v] to [10]
wait (.1) secs
end
obs-
when green flag clicked
set [score v] to [0]
if <(canI) = [1]> then
set [y v] to (pick random (80) to (-80))
go to x: (290) y: ((y))
glide (1) secs to x: (-290) y: ((y))
if <not <(canI) = [0]>> then
change [score v] by (1)
end
end
Last edited by ayushdel_test (June 6, 2024 10:03:36)
- abubriski
-
500+ posts
How do make a flappy bird game
That's why I made sure to do it this way (I am not @OsomKoolGuy):The mouse down script could be abused and players could just hold onto the mouse button instead of clicking in an order, also changing Y this drastically will make way for some choppy movements. you can use some code like this to get the bird to work:when green flag clickedThen for the pipes you can use
forever
if <mouse down?> then
change y by (10)
end
change y by (-10)
end
when green flag clicked
forever
if <touching [sprite1 v] ?> then
stop [all v]
end
endwhen green flag clickedYou could program a velocity system for the bird if you know how instead of the more simple approach given
forever
repeat until <touching [edge v] ?>
go to x: (-200) y: (0)
change x by (-10)
end
end
when green flag clicked
forever
change [yV v] by [-1]
change y by (yV)
endwhen green flag clicked
forever
if <key [space v] pressed?> then
set [yV v] to [5]
wait until <not <key [space v] pressed?>>
end
end
- beastly-creator
-
2 posts
How do make a flappy bird game
in your bird sprite {coding}:
when green flag clicked
forever
change y by (-5)
if <touching color [{of bottom layer, what ever colour it is}] ?> then
switch backdrop to [your game over screen]
broadcast [your choice]
hide
end
if <key [up arrow] pressed?> then
change y by (5)
end
if <touching [your choice of obstacle] ?> then
switch backdrop to [your game over screen]
broadcast [your choice]
end
when green flag clicked
forever
next costume
wait (1) secs
end
when green flag clicked
go to x: (-132) y: (20)
when I receive [a different one of your choice]
forever
change y by (-5)
if <touching color [{of bottom layer, what ever colour it is}] ?> then
switch backdrop to [your game over screen]
broadcast [your choice]
hide
end
if <key [up arrow] pressed?> then
change y by (5)
end
if <touching [your choice of obstacle] ?> then
switch backdrop to [your game over screen]
broadcast [your choice]
end
obstacle coding {not bird}:
when green flag clicked
go to x: (195) y: (20)
forever
change x by (-3)
wait (0.2) secs
end
when I receive [your choice]
hide
stage\backdrop
when green flag clicked
switch backdrop to [your game on]
when I receive [your choice]
switch backdrop to [your game over one]
wait (5) secs
broadcast [a different your choice]
switch backdrop to [your game on one]
Last edited by beastly-creator (Oct. 14, 2025 09:16:33)
- beastly-creator
-
2 posts
How do make a flappy bird game
ignore the red bits
just telling you for what sprite
just telling you for what sprite
- Discussion Forums
- » Help with Scripts
-
» How do make a flappy bird game