Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bonsaiden/cobalt
A minimal client / server framework for creating multiplayer games.
https://github.com/bonsaiden/cobalt
Last synced: about 1 month ago
JSON representation
A minimal client / server framework for creating multiplayer games.
- Host: GitHub
- URL: https://github.com/bonsaiden/cobalt
- Owner: BonsaiDen
- Created: 2015-01-17T00:01:01.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-24T18:11:05.000Z (almost 10 years ago)
- Last Synced: 2024-04-14T19:35:51.803Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 297 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Cobalt - Minimal Lockstep Game Server
-------------------------------------Cobalt is JavaScript based, minimal client / server framework for creating games based on the
[lockstep protocol](http://en.wikipedia.org/wiki/Lockstep_protocol).It serves as a game independent messaging server between clients.
## Features
- Player login
- Room creation (with optional password support)
- Room ownership management
- Game specific room settings (TickRate, Min / Max Players)
- Ability to let players define custom room parameters (e.g. choose map, select their colors)
- Automatic synchronisation of room and player lists
- Room countdowns
- Client side loading and tick callbacks
- Event distribution between players / clients in-game## Upcoming Features
__General__
- Add support for "authenticated" player login
- Via OAuth2
- Specify allowed providers during room creation- Add support for room owners to alter min / max player count after room creation
- Kick superflous players from the room
- Add support for kicking / banning players from the room
- Add support for banning from rooms via IP- Add support for players requesting a game pause (only X allowed, configured during room creation)
- Add support for players needing to mark themselves as ready before countdown can be started
- Make this an option at room creation
__Client__
- Add game abstraction base class that implements rendering and tick callback methods
__Server__
- Add support to white/blacklist certain game idents and versions
- Limit number of messages / connections from hosts / IP ranges## Usage / Installation / Dependencies
### Server
You'll need either [io.js](https://iojs.org/) or [Node.js](https://nodejs.org) installed.
Creating a server is straigtforward:
var server = new Cobalt.Server();
server.listen(port);### Client
Building the client requires having [grunt](http://gruntjs.com/) installed (`npm install grunt-cli -g`).
The bundled client JavaScript can be generated by running `grunt build` which will create `dist/cobalt.js`.
> Note: There is a depdency on the [bluebird](https://github.com/petkaantonov/bluebird/) promise library.
Creating a client for a game named `mygame` at version `0.01`:
var client = getClient('mygame', '0.01');
client.connect(port, 'localhost').then(function() {
});
## Documentation
Work in Progress. For now, please refer to the unit tests to get an idea how things work.
## Licensed under MIT
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.