Hacker News new | past | comments | ask | show | jobs | submit login

When I was that age I made a bouncing ball in Flash (ActionScript, similar to JS).[0]

This is still my "hello world" when trying out a new game dev environment because it covers:

- drawing

- movement

- input

- acceleration

- gravity

- friction

- collision

And all of these in essentially the simplest possible way.

Most of all, it's a lot of fun to have a bouncing ball, and even more fun if you can use the keyboard or mouse to play with it!

For a more structured approach, I'd say draw a circle (or square), then add movement, then make it fall down, then a floor to catch it, then bounce it, etc...

[0] It's not too hard to do in pure JS / Canvas (I am very fond of tiny builds with no dependencies), tho the canvas API is surprisingly unpleasant, so I'd recommend something like Pixi or Phaser.






I still lament the loss of Flash. It’s ability to get in there and as a single user do everything from design to animation to code front end and back end was enormously flexible and easy for creatively engaging and creating. It fit the “bicycle of the mind” concept.

As far as I know, no single tool has replicated that kind of freedom. For rapid prototypes that one could actually iteratively build on top of top make a full application it was amazing.

I know about the issues and why it isn’t secure etc etc, but in terms of you could interact with it to create we are still at a loss.


I've dreamed of cloning Flash for a long time. Aiming for full compatibility is infeasible (unless you can convince the Ruffle folks to give it a go once they're done with Ruffle!), but aiming to capture the spirit of Flash (e.g. build Flash like authoring tools on top of TS/WebGL) is certainly doable.

The Wick editor was one such attempt, though it didn't gain traction and was abandoned.

Also there seem to be quite a lot of us who feel this way -- a dozen or more every time Flash is mentioned on HN -- maybe it's time we got organized? "Everybody talks about the weather but nobody ever does anything about it!"


I feel you.

I have looked at the Wick Editors source code and managed a sucessful build with some minor changes and felt picking it up is doable, but not easy. But a satisfying way to develope for me, would require a rewrite of many parts. Or most parts, except the UI ..

Pixi as the graphical base would be the way, I think.

But I could not do it as a side project as of now, maybe one bright other day.


Have you checked out https://haxe.org/ It supports Action script, and is the spiritual successor to Flash

When HTML5 was supposed to replace Flash, I just thought I didn't know enough about HTML5. Turns out that it was never an adequate replacement and it was just more Web 2.0 sterility.

I mean, I miss silly flash games and 0 other applications of flash. I can see why people miss it from a creator point of view, but it was extremely annoying in general.

It was a double edged sword. If you were not good at making something it would show, but if you wet good and wanted to do something out of the box it was incredible flexible.

From the stand point of freedom for the individual to create in their own way digitally it is unmatched. People can learn UI and UX but it’s really hard, nearly impossible to create a vast ecosystem and the the community that flash once was.


It was great for animation with interactions. Also, flash files could easily be saved and shared offline.

For anyone wanting to do this in JS, check out Dan Shiffman’s Nature of Code 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.


I 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


Many bouncing balls are also doable without knowing any actual physics. Balls overlap? Push them away from each other such that the next frame they'd no longer overlap. The result looks surprisingly acceptable.

And if you add some blur (I think in Flash this was just a property you can set) based on how fast the ball is moving, it somehow looks more satisfying still.


One of my favorite projects was a bouncing ball sim synced over the network. So you could mess with the balls in one window and it would update in the other too. I never added ball-on-ball action though...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: