Coding Challenge #41: Clappy Bird!

preview_player
Показать описание


References:

Related Coding Challenges:

Timestamps:
0:00 Welcome!
0:34 About the positioning of the pipes
2:10 Implementing spacing to the pipe object
3:35 Moving the center of the space between the pipes to a random location
7:05 Adding a random spacing
8:03 Implementing sound interaction
11:31 Adjusting the threshold with a slider
14:21 Adding another threshold to apply the force only once
17:02 Testing the clappy bird!
17:50 Come up with your own ideas!

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

#flappybird #gamedevelopment #clappybird #javascript #p5js
Рекомендации по теме
Комментарии
Автор

where the hell has this guy been all my life?!!?
.
.
.
your gonna be big one day m8

electricmanectric
Автор

I think an interesting idea to generate the pipes would be to use perlin noise to determine where the gaps should be. That way the game will have a bit of a flow to it instead of random gaps!

jasonlabbed
Автор

Looks like a lead into a Guitar Hero singing game thing. With your other videos about frequency and amplitude you could have the "bird" follow the pitch and check if it maps to notes in a song. Then we can find out how well you sing.

cacowen
Автор

What i did in my example for building pipes is, have always fixed empty space (example 200), then for top pipe, select random Y from 100 to height-(100+emptySpace), and then generate bottom pipe, from height to top+emptySpace,

The 100+emptySpace, is so i will have emptySpace, and have at least 100px of bottom pipe.
I could also have this emptySpace to be random from like 100 to 300, so it will make game a bit more challenging

ludanca
Автор

you could make it even better by measuring the increase in sound, a clap is instantaneous loud, but if you're talking, the volume increases more slowly

spicybaguette
Автор

this will be a great addition to my flappy clone as an assignment in school.
ty

avihayl
Автор

Isn't it way easier to just take a random height for the top pipe, and for the bottom you can do
var spacing = random(20, 100);
this.bottom = height - (this.top + spacing);
Idk, seems easier to me

bigwhite
Автор

OMG, this is so funny, programming is so cool xD

Naej
Автор

Fun challenge. Was always a fan of this channel. Now that we are all in lock-down, what a perfect time to watch more of these videos.

rosslahive
Автор

I understand this is pretty old but I would have personally did the pipes like this:

-Pick a random number between the height minus spacing and 0.
-This number is the top pipe.
-The bottom pipe is the top pipe number plus spacing, down to the height of the canvas.

EG:

Random number is 200 pixels, space is 50 pixels. This makes the top bar 150 pixels tall, then a 50 pixel space, and the bottom bar from 200 pixels to the bottom of the canvas. (:

xNameless
Автор

Thanks for your videos, really enjoy the way you do those coding challenges. Keep doing that!

swim
Автор

This guy is on a different level. Love the mans art. A true inspiration to young software developer

cd
Автор

the frequency of the clap is different of the frequency of the talking voice!
can you calibrate with the frequency of de audio you capturing?

LouiSatto
Автор

The first thing i thoght for the pillars, was making one a random height from 0 to height - (min open space)(like, the size of the bird mabe), and then have the second pillar height - ( other pillar + min open space).

Edetwo
Автор

I think it'd be interesting to try making the upward force on the bird increase with the loudness of the clapping. I got the impression that this is what you were intuitively trying to do when playing. (Still having a threshold below which no force is applied, of course).

chrizzie
Автор

Double treshold is called a debounce in electronic

nobocks
Автор

The low threshold idea could easily be improved. Instead it should look at when volume is no longer increasing. In other words the clap has ended rather than having to wait and causing yourself more problems if you clap again too early.

ryolo
Автор

Can't stop watching your videos! Videos are awesome!! You are awesome!!!!

dlwooo
Автор

can you post a video about how to get a reference p5 sound

Coldr_
Автор

hahahah that was intense you can talk while your speaker clap sound was jump by itself and or you just say jump

allainegaming