I was inspired by the hand game shotgun, and I wanted to make a similar, online game that was more fun and can be played with your friends even with lockdown.

What it does

There are 4 moves: charge, beam, forcefield, and atomic.

  • You start with 0 charges, and charge lets you gain a charge
  • Beam makes you lose a charge and lets you attack another user
  • Forcefield blocks against beam and costs 0 charges
  • Atomic costs 6 charges and defeats everybody The game is turnbased, so you cannot see what the others do until everyone moves. Once everyone moves, there are animations that show what happened.

How I built it

I used AWS AppSync in conjunction with web sockets, DynamoDB, and GraphQL to allow users to see the actions and moves other users in the room took and I used antd for react animations on a canvas. The website scales because it can support any number of users in the same room. There would just be more users that appear around the circle. The bold user is you and the names of everyone are under their sprites.

Challenges I ran into

Making animations that correspond to where each user is was difficult. For example, if you shoot someone else the bullet has to be angles towards the other person and go towards them. I had to use a lot of math to calculate the paths.

Accomplishments that I'm proud of

This was a game that I wanted to create for a long time, so I feel very accomplished that I finally had the skills to do so and that it looks better than I thought it wood.

What I learned

I learned how to make cool react animations and how to make the paths to do so.

What's next for Laser

I will add an instructions page and perhaps more moves so that the users have more options to choose from when they move. I also want to get a different domain (like so that its not hosted on my domain and more people would use it.

Built With

Share this project: