How to make the Stacker Game in JavaScript + P5js

Sdílet
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

Komentáře • 10

  • @BarneyCodes
    @BarneyCodes  Před rokem +5

    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/

  • @amodmanjarekar4556
    @amodmanjarekar4556 Před rokem +1

    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! ^^

    • @BarneyCodes
      @BarneyCodes  Před rokem +1

      Thanks! I think it's important to keep it in so people get a realistic view of programming! Glad you enjoyed the video!

  • @naijagamingseries
    @naijagamingseries Před rokem +3

    THANKS FOR THIS

  • @djneils100
    @djneils100 Před rokem +3

    cool video thanks Barney!

    • @BarneyCodes
      @BarneyCodes  Před rokem +3

      No problem, thanks for watching!

    • @djneils100
      @djneils100 Před rokem +2

      @@BarneyCodes I teach CS so finding your vids very helpful

    • @BarneyCodes
      @BarneyCodes  Před rokem +2

      That's awesome! What sort of topics do you teach?

  • @andy_de2041
    @andy_de2041 Před 4 měsíci

    Fzero big blue