GithubHelp home page GithubHelp logo

nangs / unity-zombie-defense-fps-multiplayer-score-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onionlee/unity-zombie-defense-fps-multiplayer-score-server

0.0 1.0 0.0 7 KB

Score server for Zombie Defence FPS Multiplayer Example

JavaScript 100.00%

unity-zombie-defense-fps-multiplayer-score-server's Introduction

Unity Simple Zombie FPS Co-op Scoring Server

Scoring Server for Unity Simple Zombie FPS Co-op Example.

Features

  • User Authentication (Login/Register)
  • Saving user's play data to the server permanently.

How to run?

Requirements

Database Setups

  1. Create DB named ZombieScore
  2. Create new user named "zombieadmin" with password "freshmeat".
  3. Grant read/write roles of ZombieScore DB to zombieadmin

Redis Setups

Nothing XD

Run the server

  1. You have to install Node.js dependencies first. Install via NPM:
$ npm install
  1. Run the server.
$ node server
  1. Highly recommend to run server with PM2 or Forever module. The server must be run while you gameplaying.
$ sudo npm install -g pm2
$ pm2 start server.js --name "ZombieScoreServer"

Ok, just show me how

Ok, well.. Here's the video how to:

IMAGE ALT TEXT HERE

Click the above image to redirect to youtube.

About authentication

Authentication system is just really simple, because it's focused on implementation, not for product ready state. When user logged in, server returns string token, and it saves into the server's local memory(Redis). After then user can access other APIs that requires authentication with that token. When user logged out, server will destroy that token.

Oh, I forgot to remove tokens when user just shutting down the client. If you make something product inspired by these examples, don't forget to remove token after some specific times that user didn't anything.

Also in this demonstration, I didn't checked that user try to access while it's already logged in. You have to check this too.

Please don't tell me why you made this something this blabla, it's just demonstration XD I just focused on Logic itself, not perfection!

Thanks!

See Also

unity-zombie-defense-fps-multiplayer-score-server's People

Contributors

rico345100 avatar

Watchers

anangs 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.