Discuss Scratch

EmmaGymnast
Scratcher
12 posts

Flappy Bird Basic Code

Lots of people have tried to make a flappy bird game, but have struggled with the code.
Here is a basic code that you can use- but make sure to give credit to me if you do use it.
For the bird:
whenclickedgotox:-100y:0repeatuntiltouchingcolor?changeyby-3ifmousedown?thenchangeyby8.5broadcastend

So this is the basic code (if i did everything right). For the repeat until touching color, the color would be the ground.
Now add this code to the bird:
whenIreceiveendhide

This is all there is to it. If you try this code yourself and it doesn't work, just let me know.

Last edited by EmmaGymnast (Jan. 28, 2017 19:06:05)

nonethenones
Scratcher
100+ posts

Flappy Bird Basic Code

or just.
whenIreceivestartsetgravityto0foreverchangeybygravityifkeyspacepressed?thensetgravityto4elsechangegravityby0

whenIreceivestartsetscoreto0showswitchcostumetocostume1wait1secsforevergotofrontiftouchingcoloridk lol?thenplaysoundpopuntildonebroadcastresetandwaitstopall
CSLSamFic
Scratcher
6 posts

Flappy Bird Basic Code

how bout the poles?
deck26
Scratcher
1000+ posts

Flappy Bird Basic Code

Please don't post random help. The forum works best if we let those needing help post new topics and help by responding where we have something useful to add.

Great that you want to help but please do so in the correct way.
blocksrostudio
Scratcher
2 posts

Flappy Bird Basic Code

how do you move automaticly forward
deck26
Scratcher
1000+ posts

Flappy Bird Basic Code

blocksrostudio wrote:

how do you move automaticly forward
Please create your own new topic if you need help.
Panganay19
Scratcher
19 posts

Flappy Bird Basic Code

Wyan100
Scratcher
1000+ posts

Flappy Bird Basic Code

Panganay19 wrote:

well i created mine https://scratch.mit.edu/projects/420340346/

Please don't unnecessarily bump old topics
Vaibhs11
Scratcher
1000+ posts

Flappy Bird Basic Code

whenIreceivegame startshowgotox:-150y:0foreverifdirection<180thenturnturndegreeschangeybygravityifkeyspacepressed?thensetturnto0changeturnby-1setgravityto0changegravityby1elsesetturnto0changeturnby1setgravityto0changegravityby-1
nonethenones code fixed!!
Hope this helps
Vaibhs11
Scratcher
1000+ posts

Flappy Bird Basic Code

blocksrostudio wrote:

how do you move automaticly forward
The pipes need to move by x value.
flappy will be in the same x position.
Vibrato
Scratcher
1000+ posts

Flappy Bird Basic Code

Vaibhs11 wrote:

snip
please don't necropost. you have bumped someone needing help off of the front page!

Powered by DjangoBB