shooter.io is a network based multiplayer space shooter game.
shooter-server is a Go program that runs a universe for space ships that
can shoot and destroy each other.
It also accepts incoming websockets connections, assigns each connection its own ship, and lets the user control her ship.
How to run the server with vagrant?
cd ~/projects git clone https://github.com/xiam/shooter-vagrant.git vagrant up # Go grab some coffee.
10.2.2.10 in your browser!
How to run the server manually?
cd ~/projects git clone https://github.com/xiam/shooter-server.git cd shooter-server make cd src go get -d make MONGO_HOST="10.0.0.123" ./shooter-server -listen 127.0.0.1:3223
Now you have a running
shooter-server that creates a virtual universe for
space ships, see shooter-html5 for a client to interact with this
Note that, in order to connect to the
shooter-server, you may change a variable
shooter-html5/src/js/main.js file. For instance, this line
var WEBSOCKET_SERVICE = 'ws://127.0.0.1:3223/w/';
will instruct the client to connect to the
shooter-server that is listening
- This a work in progress.
- Code is still messy and undocumented.
- I'd like to create a native client for mobile too.
- I'd like to experiment with UDP messages instead of TCP websockets.
- Server has been tested with go1.2 under Linux and OSX.
Copyright 2014 José Carlos Nieto
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.