Inspiration
We wanted to do something with Websockets but didn't know. Then we worked off of the idea and came up with this
What it does
It's a multiplayer game that asks the users trivia questions (only true or false) For each question, users will be asked to move their avatars either to the right or left which represent true or false. When the timer goes down to 0, players who are on the wrong answer will drop through a platform. The last one standing wins.
How we built it
We built it using mostly socket.io and html canvas. Every time a user moves their avatar, their position is sent to the server which is then updated in an array which holds all of the clients' positions. After any event (like a player joining, movement, disconnecting, etc.) a listener on the client side takes it in and redraws the entire canvas client side.
Challenges we ran into
Getting stuff to work, working with socket.io and canvas for the first time. At first game was really laggy but it was because we hosted it on a really crappy server.
Accomplishments that we're proud of
We did it
What we learned
Using new and useful technologies, like the Websockets transport protocol. Will be very useful for future projects
What's next for hackny-2018
We'll go to the next one hopefully.
Log in or sign up for Devpost to join the conversation.