Giter VIP home page Giter VIP logo

superstellar's Introduction

superstellar

Superstellar

Massive multiplayer galactic game written in Golang. It has been inspired by the old arcade space shooter called Asteroids.

Live demo

http://superstellar.u2i.is

Rules

Destroy moving objects and don’t get killed by other players and asteroids. You’ve got two resources – health points and energy points. You lose your health with every hit you get and every contact with the asteroid. Energy points are consumed when shooting and using a boost drive. The more objects you kill, the bigger your health bar grows. Good luck

Story behind the game

https://medium.com/u2i-blogs/we-made-a-multiplayer-browser-game-in-go-for-fun-242a5990ce29/

Installation & running

  1. Clone this repository to your $GOPATH/src directory
  2. cd to that directory
  3. Run go get
  4. Run go build && go install
  5. Run $GOPATH/bin/superstellar to run a server instance
  6. Open new console and go to the game source directory.
  7. cd webroot
  8. npm install
  9. npm run dev
  10. Go to http://localhost:8090

Running stress test util

You can run a stress test util that spawns any number of clients which connect to the server and send ramdomly correct user input messages.

  1. cd superstellar_utils
  2. go build && go install
  3. Run $GOPATH/bin/superstellar_utils 127.0.0.1 100 50ms for spawning 100 clients, with 50 ms interval.

Live profiling

It's possible to dump various information from the running server, e.g. stacktraces of all goroutines which might be useful in case of a deadlock.

  1. Run server
  2. Go to http://localhost:8080/debug/pprof/

Using JS __DEBUG__ flag

If you run DEBUG=true npm run dev you will see additional debugging informations. You can add your own debugging info in code. Just detect that we're in the debug mode:

if (__DEBUG__) {
   console.log("I'm in debug mode!");
}

Compiling protobufs

Run ./generateProto.sh

superstellar's People

Contributors

madejejej avatar mknapik avatar syktus avatar mmateja avatar jtkpiotr avatar matkowal avatar mjkonarski avatar nownick 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.