Coder Social home page Coder Social logo

serpents's Introduction

Serpents

Multi-Player Game on top of HDP protocol or REST+SSE

Introduction

Serpents is the classic snakes game where each player controls a serpent that moves around a board. When the serpent eats a fruit it grows according to how much food the fruit provides. If the serpent hits anything but a fruit (being that a wall, another serpent or even its own body) the serpent dies.

The Server

This repo provides the game server. Players should write their clients on their own (and that is part of the game). To do that they can use one of two protocols:

  • HTTP: A RESTful API with an additional SSE endpoint for updates
  • HDP: An UDP based protocol

To start the server, run

$ rebar3 compile && rebar3 shell

Or you can generate a release with rebar3 release and then start it

$ ./_build/default/rel/serpents/bin/serpents start

The Website

Once the server is started you can open http://localhost:8585 and start creating and watching games.

Player Examples

If you don't know where to start in order to write your serpents client, you can check the sample clients provided in the src/clients folder. There are 2 clients there:

  • ai: An collection of automatic clients that connect to a game and automatically move the serpents according to their algorithms
  • wx: An interactive client built on top of wx

Contact Us

For questions or general comments regarding the use of this project, please use our public hipchat room.

If you find any bugs or have a problem while using this project, please open an issue in this repo (or a pull request :)).

And you can check all of our open-source projects at inaka.github.io

serpents's People

Contributors

elbrujohalcon avatar hernanrivasacosta avatar sildur avatar euen avatar jfacorro avatar

Watchers

James Cloos 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.