Easy Stacker Game with JavaScript + P5js



Easy Stacker Game with JavaScript + P5js

Easy Stacker Game with JavaScript + P5js

Code from video: https://editor.p5js.org/BarneyCodes/sketches/DHuoT1QDE

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:
Twitter: https://twitter.com/barney_codes
Reddit: https://www.reddit.com/user/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

Comments are closed.