Inspiration

Just came to hack and have fun while learning new technologies (Sokect.io and Containers!!!)

What it does

It's a multi-game mode snakes application that works in real-time and allows two people with an internet connection from around the world to play CycleSnakes.

How we built it

We used HTML, CSS for the UI and Canvas. We used JavaScript to control our snakes and dynamically load the fruits and we used Socket.io to send data between two players in real-time.

Challenges we ran into

A really complex problem we ran into was that when hooking up our express.js and node our socket.io connection was hooking up to the hidden server (bin -> www) that was running instead of our main app.js server that was running. Finally, after 9 hours of self trying, 3 hours of a mentors assistance and one more mentor helping for 6 minutes we solved it and regained hope!

Accomplishments that we're proud of

  • Sending data back and forth while using persistence to keep a constant game frame without any drops
  • Hosting on Cycle's back-end with an incredebily small image (20mb instead of the standard 1GB from Docker's templates)
  • Multiple game modes!

What we learned

  • How to use Socket.io and build a fully functioning app with it
  • Container's and the future of Back-End Hosting
  • Docker Images and how to minimize the size (by over 1000%)

What's next for CycleSnake

  • A Leader board system
  • Interpolation of snake's footprint data (For people with even slower wifi's or longer latency)
Share this project:
×

Updates