How to make the Stacker Game in JavaScript + P5js
Vložit
- čas přidán 5. 08. 2024
- Code from video: editor.p5js.org/BarneyCodes/s...
Stacker is an iconic game and you can make it yourself! In this video you can follow along as I make stacker using JavaScript and P5js. You'll learn how to make the blocks move, how to use keyboard interaction to place the blocks, how to set up menu screens, the whole lot!
Follow me:
Support the channel: www.youtube.com/@BarneyCodes/...
Twitter: / barneycodes
Reddit: / barneycodes
Chapters:
0:00 What is stacker?
1:03 Setting up P5js
1:46 Creating a block
4:36 Making the block bounce between edges
8:09 Placing blocks
12:06 Drawing placed blocks
13:55 Detecting overhangs
17:48 Handling non-existing blocks
18:47 Cutting off overhangs
19:36 Making sure the blocks are placed correctly
20:29 Game over man, game over
22:28 Polishing
23:15 Adding a score
24:20 Increasing block speed each layer
25:29 Adding menu state
29:00 Game over screen
30:44 Win screen
31:06 Space to play again
32:47 Fixing the win condition
34:00 Final product!
#creativecoding #p5js #javascript
How close did I get to making the actual stacker? 😂
If you'd like to see what else I'm working on, it would be great if you could wishlist my game Star Mining Co. on Steam! s.team/a/2584800/
I really appreciate that you keep your mistakes in the video and don't cut them out in post processing. I learned a lot, thank you for the video! ^^
Thanks! I think it's important to keep it in so people get a realistic view of programming! Glad you enjoyed the video!
THANKS FOR THIS
No worries!
cool video thanks Barney!
No problem, thanks for watching!
@@BarneyCodes I teach CS so finding your vids very helpful
That's awesome! What sort of topics do you teach?
Fzero big blue