Skip to content

Latest commit

 

History

History
40 lines (39 loc) · 3.15 KB

File metadata and controls

40 lines (39 loc) · 3.15 KB

Spaceship Battle and Hunting!

A fun multiplayer browser-based online spaceship-themed game using React as frontend, Node.js as backend, Firebase as cloud database and SockJS for realtime communication. We also used redux-firestore for accessing data easily.

Features

         In this game, user can register and log in and create customized personal profile (including avatar, bio and spaceship color) and check other player's profile.
         Hunt: user plays himself and try to hunt as many points as possible in one minutes by getting fuels and shooting asteroids through basic keyboard control.
         Battle: user joins game with another player and try to beat each other in one minute.

Install and Run

git clone https://github.com/ziliHarvey/Online-Spaceship-Battle-and-Hunting-Game  
cd Online-Spaceship-Battle-and-Hunting-Game/  

Build your own firebase (Cloud Firestore option) instance and configure firebase apikey in store.js as firebase config setup instructed.
Be sure to add a waitingRoom collection with one document of boolean field gameIsOn, string field id1, id2, player1 and player2.

npm install  
npm start

Open another terminal to launch websocket server

cd Online-Spaceship-Battle-and-Hunting-Game/src/websocket/  
node server.js

And enjoy!

Contributors

Zi Li    Tianyi Xie

Reference

http://codepen.io/bungu/pen/rawvJe
https://github.com/chriz001/Reacteroids
https://www.udemy.com/react-front-to-back
https://truongtx.me/2014/06/07/simple-chat-application-using-sockjs