Rock, Paper, and Scissors Battle: a do nothing JS app

Rock, Paper, and Scissors Battle: a do nothing JS app

ยท

2 min read

I created a tiny app that simulates a Rock, Paper, and Scissors Battle that initially places pieces randomly around the screen and then chasing after their nearest prey. It's interesting to see the outcomes being completely random and unexpected up until the end.

Press any key, click, or tap to reset. Otherwise the game restarts itself.

This was an attempt to create something for the JS1024 (2021). I started on this just after the deadline so I wasn't planning on submitting it but rather just see if I could create something for it.

Turns out, it's very hard to do and getting even a small app down to 1024 bytes seems impossible.

Inspiration

I was initially inspired by a video that was going on around Twitter and I even retweeted it:

Nice. I love how it's so easy to recognize the concept of this simulation. Simple and inspiring. #gamedev https://t.co/MgUBVHO5Vk

โ€” Lewis Nakao (@lewdev) February 17, 2021

I always wanted to create my own version of it.

I've been working on a side project that I'm losing motivation for so I let myself get distracted and created this app. I'm half-falling asleep at my desk right now but I'm just kind of tired of not publishing anything lately.

Anyway, I hope people can enjoy what I make and even learn something by being able to check out the source code (it's messy so don't expect it to be awesome). I learned a lot creating the little app too.

Code Golf

What's really getting my attention these days are these challenges where you have to create apps and make them as small as possible. Essentially, code.golf, which, like Leet Code has a bunch of challenges but it scores you based on how small your solution is. Then recently there was the JS1024 contest that I missed.