1. 25

  2. 19

    I followed this tutorial to get started on my falling sand game project*. It’s a concise introduction to some really useful tools - using this ecosystem has been a total joy and has enabled me to build things in the browser with incredible performance, without sacrificing the web niceties I’m used to like quick feedback cycles and performance tracing via devtools. The browser support is also really strong, my game (mostly, WIP!) works on mobile and most browsers (I think) Highly recommend this book!

    * https://maxbittker.github.io/sandtable/


    1. 7

      This is so so so awesome <3

      1. 4

        Holy crap. That game is awesome. The way the different elements interact so intuitively is just incredible. I was playing around with destroying things with acid, but then I realized half my screen was acid and it was fun trying to get rid of it. I love how gas and lava interact, and also how ice will cause surrounding water to freeze. And also, putting a bit of lava under some wood and then using wind on the wood actually scatters the embers of the wood. Wow.

        That’s a really incredible project!

        1. 3

          thank you so much! falling sand games were a part of my childhood, I love their mode of play through experiment-building.

          My eventual goal is to allow the user to program, fork, and share new elements of their own design, and mix them. Defining an element right now has an intentionally simple cellular automata api surface, and I hope to eventually figure out how to compile and link wasm modules in the browser to allow hundreds of elements, so you can try out usernameFoo’s “Alien Plant v4” against usernameBar’s “pink super acid”

          I’ll need to understand the wasm toolchain a lot better to make that happen though

        2. 3

          This game is amazing. thank you. Also, I want the last two hours of my life back 😅

          1. 8

            Thank you! This is a bit silly considering that I posted this on a public forum, but my one request is to please not share the game more broadly yet, I have a lot of things I still want to implement before I show it to people outside the context of it being a tech demo. Posted it here because I appreciate this learning resource so much!

          2. 2

            I love the smoke effect!

            As I sit here posting my girlfriend is whispering in my ear, “what is clone?”

            1. 2

              Thanks! I adapted most of the fluid simulation code from here, learned a lot about webgl doing so! https://github.com/PavelDoGreat/WebGL-Fluid-Simulation

            2. 1

              holy shit the plant actually catches on fire when it touches lava this is awesome

              1. 1

                the dust can explode…..

            3. 13

              If any of y’all go through the tutorial, we would super appreciate it if you took notes along the way and shared your feedback with us!

              1. 3

                I really want to use WASM but almost all of my JS is working with the dom so I don’t think I could replace much of it yet

                1. 1

                  Am I blind or is there no mention of cargo-web? I think that is an invaluable tool!