Hi HN!
I made many small web games in the past with Unity or Phaser. But this time I wanted to make something completely on my own. So I coded a basic game framework in plain JavaScript, and used it to make Almost Pong.
This was a really fun project that taught me a lot about JavaScript, and I plan to make more minimalist games with this framework. Interesting fact: Almost Pong doesn't load any assets, all sprites and sounds are generated with code.
Happy to answer questions, and please let me know if you have any feedback on the game. Thanks!
https://archive.org/details/PLBMPongOut_1020
You could in fact do likewise: let the player choose the initial parameters and the speed of change. Maybe with preset difficulty tiers if high scores are kept.
When I was still at university we had a C class and were doing it in a computer lab with partners (back then very few students could afford a laptop). I was always partnering up with the same friend. Since we were a bit bored with the class we started building our own pong in C. Rendering was done in ASCII in the command line, with paddles being 3 pipes, the ball a capital 0 and the walls "#". We would spend some time at the beginning of the class building/improving it and at the end playing it. We used keys like "W" and "S" for the left player and "O" and "L" for the right player. Since the initial setup with rendering and "physics" of the game went quite fast, we thought about how to improve it and make it more fun.
What made it incredibly fun (at least for us) in the end, was the addition of bonus squares. So, between the two paddles, if the ball that you just touched hit a bonus square, it would activate an effect for you or for the game depending on the bonus. We had: - "wall", would create a 3 squares wall at the location of the bonus - "turn of the lights", would hide everything but the ball (even the paddles) - "gun", would allow you to shoot and destroy walls and bonuses - "bigger/smaller paddle", self explanatory - "net", would temporarily put a net behind you preventing you from missing the ball - and some more, like speed up the ball, add an extra ball, etc.
It's been my one and only experience building a game but I think it was the most fun I've had programming… If anybody is up for re-building a pong with bonuses I'd be definitely up for that ;)
Back on the topic: love the implementation OP, pretty addictive. And, as can be read above, it brought back some nice memories.
Sharing to good and bad bonuses between us (the two players) definitely added a cherry on top of this experience though.
I helped the author track down and fix a certain bug: the paddle would get stuck to the ground, when the fractional subpixel value of its y-coordinate was very slightly below zero. He sent me a free cartridge and T-shirt as thanks.
We calls thems engagement in these here neck 'uh tha woods.
Oh, and soon you'll see people here on HN competing to hack the top score as with previous games [1], either though writing an AI to play the game or by modifying the JS itself on the site.
[0] https://www.cnet.com/tech/services-and-software/no-flappy-bi...
[1] https://news.ycombinator.com/item?id=29921419
* https://news.ycombinator.com/pool, explained at https://news.ycombinator.com/item?id=26998308
Edit: oh wait, it's way more fun on Safari. On Firefox it feels slow and slugish, but on Safari it's great!
I think the game should scroll up infinitely as you progress. It will enhance the psychological feel of falling in space when the pong drops. And you can introduce levels, bosses, goals, etc.
The basic game play mechanic here is solid. Just like keeping a party balloon from hitting the ground!
Safari on m1 mac - no lag and frustratingly fun :)
And powerups in the middle that make ball bigger or grows one paddle again would be interesting.