Coding Challenge #138: Angry Birds with Matter.js

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


References:

Videos:

Related Coding Challenges:

Timestamps:
0:00 Introduction!
1:30 Getting started with an Object Oriented Approach
11:05 Adding and using the physics engine
12:52 Making the ground static
15:38 Adding mouse constraints to control the bird
21:20 Adding the slingshot
27:00 Launching the bird with the slingshot!
30:57 Fixing bugs and things to refactor later!
33:07 Replacing the shapes with images
37:15 Adding restitution
38:47 Wrapping things up and improvements to make!

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

#matterjs #physicsengine2d #angrybirds #p5js #javascript
Рекомендации по теме
Комментарии
Автор

20 minutes in and just realized this was angry birds and no flappy bird

franchello
Автор

"it already knows the name bird.js" when it was first file you already made

CYXXYC
Автор

i don't even javascript but these videos definitely help me in terms of understanding how to properly break down an issue into a programmable solution. the jovial attitude just makes it more infectious.

Taterzz
Автор

I think the best way for the bird to reach Max speed is to release after test if bird position has reached slingshot point position not just delaying it 100ms,
PS: thx for matter.js explanation

krimo
Автор

41:24 such a weird kiss 😂
you are the funnest tutor on Youtube
Keep going!

abdulhadilababidi
Автор

A solution to dettaching the slingshot would be comparing the circle's x (call it c) value to the slingshot's x (call it s) value. If c > s and mouseReleased, dettach the slingshot.

xTWiZTED
Автор

I love very much the coding train channel. I learn whole javascript from this channel only.. I thank to this channel to makes me knowledgeable...❤❤

tejaswanama
Автор

Amazing presenter, great personality, even better coder and yet, the worse box drawer (that’s proportional and square) I have ever seen!
Love the vids!

SimpleCarGuy
Автор

I got a coding challenge for you.
You have done a lot of the really, really classic games, and a few modern ones, but I don't think we have seen you make any mid-era classics yet. So my challenge would be Dr. Mario.

For the uninitiated, you have a 8x32 grid. At random positions, 3-8 (depending on difficulty) "virus blocks" are placed. Your playing piece will start at the top middle and fall down. The pieces consist of 2 blocks of random colours. You may rotate the piece as it falls, just like in Tetris.

Your mission is to match up 4 or more blocks of the same colour, where the "virus block" is part of that chain. Once you do, all blocks in that chain disappears. Once all viruses are gone, you have won. If a piece lands in a way so that one block ends up over the top of the screen, you have lost, just like in Tetris.

If a piece land sideways with one block sticking out, and there is no block in the position right below it, the overhanging block will continue to fall, but you no longer have control over it, until it lands on top of another block or the floor.

Good luck, fellow programmers!

morphman
Автор

Him: making a bird.js file
Also him after 5 min: IT EXACTLY KNOWS WHAT I AM GONNA CREATE IN ADVANCE

zhabiboss
Автор

So good. The style, attitude and communication are brilliant!

simeydotme
Автор

Those libraries in your hands are simply OP. Keep it up!

adamulrich
Автор

the editing at the end of the the video was pretty good and also unexpected.

rukna
Автор

IMO, a better approach would be to replace the setTimeout controlling the slingshot release with an if statement that checks if the bird has crossed the point on the x-axis where the slingshot is placed.

KongBorup
Автор

4:00 "oh look it like knows what I'm going to do in advance" xD

MaxPicAxe
Автор

I always watch your videos for motivation in my own code. Thank you so much!

noahburget
Автор

i am learned English to watch your lessons. VERY NICE TANKS

lapetitemort
Автор

6:30 When he said that I imagined javascript reporting ''Error: Null Pointer Exception (I dunno what ur talkin about)"

joogps
Автор

If you had written it in python, you could've used semicolons as the boxes.

Thorou
Автор

You could just check the birds X if its a bit greater than the connection point of the sling (the bird is on the right) it should release. So that way it will only release if it actually moves to the right of the sling. Could also check the speed as well. Like if speed > X and x > slingshot.X + 5 fly()

Robber