Coder Social home page Coder Social logo

ziliharvey / online-spaceship-battle-and-hunting-game Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 23.93 MB

A fun multiplayer browser-based online spaceship-themed game using React, Node.js, Firebase and Websocket.

License: MIT License

HTML 1.71% CSS 3.02% JavaScript 95.27%
react firebase websocket spaceship asteroids-game webapp social-network react-redux-firebase

online-spaceship-battle-and-hunting-game's Introduction

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

online-spaceship-battle-and-hunting-game's People

Contributors

dependabot[bot] avatar ziliharvey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.