Readit News logoReadit News
Posted by u/lessmilk 4 years ago
Show HN: I made a web game called Almost Ponglessmilk.com/almost-pong/...
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!

zhichu · 4 years ago
I like small games like this. We can have a simple playing while resting.
indigochill · 4 years ago
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.
lessmilk · 4 years ago
Awesome, thanks for the comment! Yes first the paddle shrink, and then later the ball starts to speed up.
aasasd · 4 years ago
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.

maaaaattttt · 4 years ago
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.

pierrebai · 4 years ago
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 · 4 years ago
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.

hyperpallium2 · 4 years ago
"flappy badminton" - the shuttlecock aka a "birdie" is traditionally made with feathers https://wikipedia.org/wiki/Shuttlecock )
listless · 4 years ago
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 · 4 years ago
"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.

nsxwolf · 4 years ago
This feels like a playable version of Flappy Bird. The physics are sane and feel right. Flappy Bird seemed designed just to frustrate.
samstave · 4 years ago
>>designed just to frustrate.

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

danielandrews43 · 4 years ago
You were one of my biggest inspirations for going into software engineering, I absolutely loved your website in high school and would always mess around with the source code to your games. Happy to see you’re still going!
lessmilk · 4 years ago
This is awesome to hear! I stopped making games for a few years to focus on other things, but now I'd like to get back to it.
cercatrova · 4 years ago
Remember when Flappy Bird was making $50k a day (or something like that [0]) and the creator should shut it down? Ah, memories. You could potentially recreate this to put on the mobile app stores and see how it does, I think a lot of people would play it.

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

dang · 4 years ago
I think the second-chance pool* lobbed this one onto the front page while the OP was offline. I emailed to let him know that it's at #1...twill be quite a thread to come back to!

* https://news.ycombinator.com/pool, explained at https://news.ycombinator.com/item?id=26998308

throwaddzuzxd · 4 years ago
That's a fun concept, but you might want to speed it up a little bit. I stopped at 20 because I got bored, it's way too slow. The ball moves too slowly and the paddles should shrink a bit faster. The change that occurs between 1 and 20 should probably happen between 1 and 5, or 1 and 3 instead.

Edit: oh wait, it's way more fun on Safari. On Firefox it feels slow and slugish, but on Safari it's great!

ArtWomb · 4 years ago
It's fun on Chrome 98 / Ubuntu as well ;)

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!

jseutter · 4 years ago
Chrome on m1 mac - laggy and frustrating in a bad way

Safari on m1 mac - no lag and frustratingly fun :)

hessart · 4 years ago
Hi. I've had the same (good) experience on both. Could it be something in your FF?
pgt · 4 years ago
Ah, I also stopped at 19 and didn't even notice the paddles were shrinking! Yeah, maybe speed up.

And powerups in the middle that make ball bigger or grows one paddle again would be interesting.