Lurker News
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!

Comments (181) 117 threads

zhichu#
I like small games like this. We can have a simple playing while resting.
indigochill1 reply#
This is a wonderful little game. The concept and execution is extremely concise but the thing that really sealed the deal for me was noticing the escalating difficulty by making the paddles shrink.
lessmilk1 reply#
Awesome, thanks for the comment! Yes first the paddle shrink, and then later the ball starts to speed up.
aasasd1 reply#
Excellent. My favorite implementation of Pong is PLBM Pong from the DOS days: you can make the ball crawl at first and speed up gradually until it's all frantic jiggling of the paddles. Much fun've been had in the two-player mode.

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.

samstave#
Difficulty +1 ; Let the ball split into multiples at some stage
maaaaattttt1 reply#
Let me use this thread to tell this somewhat related story of mine.

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.

pierrebai1 reply#
Ever heard of Arkanoid[1] ? Your changes maps pretty much to what the bonus pills did in Arkanoid. Some possibility in Arkanoid that you did not mention in your version:

   - Makeing the paddle wider or narrower
   - Multi-ball
   - Capturing / releasing the ball when it hits the paddle.
   - Destructive ball (pass through walls)
   - Extra life
[1] https://www.classicgame.com/Arkanoid
maaaaattttt#
Absolutely! I loved playing that game so much! And indeed, most of the inspiration for the bonuses came from Arkanoid, trying to experience this feeling of getting the bonuses again.

Sharing to good and bad bonuses between us (the two players) definitely added a cherry on top of this experience though.

listless1 reply#
I was gonna go with “Flappy Pong”, but either way, has major Flappy vibes. Great little game, though. Has the element that makes you want to keep playing it.
vikingerik#
"Flappy Pong" exists, as an Atari 2600 game no less: https://www.atariage.com/store/index.php?l=product_detail&p=...

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.

nsxwolf1 reply#
This feels like a playable version of Flappy Bird. The physics are sane and feel right. Flappy Bird seemed designed just to frustrate.
samstave#
>>designed just to frustrate.

We calls thems engagement in these here neck 'uh tha woods.

Load more comments