3 ms·
For anyone wanting to do this in JS, check out Dan Shiffman’s Nature of Code https://natureofcode.com/ https://natureofcode.com/ Uses p5js, so nicer than pure
by relaxing 2y ago
For anyone wanting to do this in JS, check out Dan Shiffman’s Nature of Code https://natureofcode.com/ https://natureofcode.com/
Uses p5js, so nicer than pure canvas.
Note there’s a big leap from making a simple physics toy to making a game.
- andai 2y agoI actually turned my "ball that can accelerate with keyboard input" into a physics puzzle platformer with minimal additional code (platform collision). I rebranded the ball to a box and made it so it plays a rocket animation in each (opposite) direction when you press the arrow keys. (In Flash, this was trivial!) Made it so you had a certain amount of fuel and had to land to refuel. I remember all of this taking a day or so, but I might be misremembering. I had it mostly working but then I changed something, broke it, and didn't know how to fix it. (Box kept sinking through the floor) These days I'd probably just use Box2D hahah