GithubHelp home page GithubHelp logo

kordonbleu / jumpsuit Goto Github PK

View Code? Open in Web Editor NEW
47.0 7.0 12.0 15.1 MB

A sweet little webgame, which showcases and pioneers a few interesting new technologies!

License: Mozilla Public License 2.0

JavaScript 87.80% HTML 3.90% CSS 7.64% Shell 0.67%
webrtc shooter game space distributed

jumpsuit's Introduction

JumpSuit

A sweet 2D canvas game. With your awesome suit, jump from planet to planet to conquer them!

It is the first game in which clients communicate with an authoritative server through WebRTC.

JumpSuit is distributed: anyone can create a game server. After registering (automatically) to the master server, your game server will be listed on jumpsuit.space for players, who will be able to play directly on it. For security reasons however, the assets and scripts are served by the master server.

Even more exciting: it's possible to create mods!

Try it here!

screenshot

Supported environments

Currently, we only support Firefox and Chrome, because we use many recent additions to JavaScript. The server requires Node.js 6.0.0 or above.

How to build

$ npm install
$ node build/bundler.js

If you plan to host your own master server, don't forget to set the dev option.

How to run

Once the project is built, if you want to create a public game server, here is what you need to do:

$ node game_server_bundle.js

But if you are developing or running a LAN, you need to also make your own master server. Don't forget to set the dev option (see below). Yes, that means you have to set it in two different config files.

$ node master_server.js

Then you can access your master server at http://localhost in your browser.

Configuration

Game server configuration

The game server needs a configuration file. The default file is game_config.json, but it is also possible to choose which to use:

$ node game_server.js path/to/your/config.json

In any case, if it doesn't exists, it will be created.

You can modify settings without having to restart the server.

In this file you can set the following parameters:

Parameter Explanation Default Variable type
dev Enable debug messages false boolean
master The master server your server registers to. If your host your own master server it should look like "ws://localhost:8080" "wss://jumpsuit.space" string
monitor Displays a neat view of the lobbies in real-time false boolean
server_name The name the master associates your server with "JumpSuit server" string

Master server configuration

The master server's configuration works the same way as the game server's, all parameters are saved in a file. Its default filename is master_server.json, but you can also choose another one:

$ node master_server.js path/to/your/config.json

In this file you can set the following parameters:

Parameter Explanation Default Variable type
dev Enable debug messages. Enable automatic reload of modified files (if you add a new file, you'll have to restart the server) true boolean
monitor Displays a neat view of the connected game servers in real-time false boolean
port Set the game server's port 80 integer

Build configuration

Parameter Explanation Default Variable type
dev Append a source map to the bundle true boolean
mod Choose the server's gamemode "capture" string

Why the name?

Getkey: What about "jumpsuit"
Flowi: #agreed
Getkey: The story would be
Getkey: I am the hero
Getkey: Oh, a chest
Getkey: What is that
Getkey: A suit
Getkey: TADADAM
* Getkey wears suit
Flowi: :O
* Getkey jumps
Flowi: :OOO
Getkey: #OMG
Flowi: #epic

jumpsuit's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jumpsuit's Issues

dc.on is not a function

C:\Users\email\Desktop\jumpsuit-master\server\game_server.js:47
dc.on('message', function(msg) {
^
TypeError: dc.on is not a function
at ClientConnection.clientCo.on.dc (C:\Users\email\Desktop\Javascriptdevelopment\jumpsuit-master\server\game_server.js:47:7)
at emitOne (events.js:96:13)
at ClientConnection.emit (events.js:188:7)
at RTCPeerConnection.ClientConnection.clientCon.ondatachannel.ev [as ondatachannel] (C:\Users\email\Desktop\Javascriptdevelopment\jumpsuit-master\node_modules\enslavism\bundle.js:458:9)
at RTCPeerConnection. (C:\Users\email\Desktop\Javascriptdevelopment\jumpsuit-master\node_modules\wrtc\lib\eventtarget.js:29:22)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

=

False alarm

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.