Skip to content

Latest commit

 

History

History
57 lines (46 loc) · 3.09 KB

README.md

File metadata and controls

57 lines (46 loc) · 3.09 KB

Surakarta Online

Realtime game hosting of Surakarta using Node.js. This project is still in beta stage.

Features in a glance

Gameplay between Registered User and Guest

  • Any user can play Surakarta without registering an account.
  • However, a guest will automatically surrender the game if he/she leaves the game.
  • Users can know where to move and which chess piece to attack when he/she drags a chess piece.
  • The opponent's latest move is clearly shown on the game board.

Gameplay between Registered User and Guest

Inherit Game Records from Guest & Gameplay between Registered Users

  • If a guest previously has played a Surakarta game, he/she can register or log into an account to inherit his/her game records.
  • Registered users can easily return to game if he/she accidentally left the game.

Inherit Game Records from Guest & Gameplay between Registered Users

User Settings

User Settings

Player Map

  • Users can choose not to disclose his/her location on the map in User Settings.

Player Map

Tech stack

  • WebSocket is used to implement the real-time update of game status between the server and the clients;
  • The back-end part of this web-based game is implemented using Node.js. The back-end program is designed to host multiple in-progress games simultaneously. Error prevention is well implemented as well to detect and intercept any cheating request;
  • The game board in the front-end part is rendered by paper.js;
  • Data models of games and users are implemented by Mongoose.

Game instruction

Please refer to Surakarta (game).

Tips of installation

  • Node.js and MongoDB should be installed in advance.
  • HTTP server runs on port 2100 by default. You may change it in bin/www(here).
  • Google reCAPTCHA is integrated in this software. Please create a new file as static_data/recaptcha.json with following content:
    {"PublicKey": "[YOUR PUBLIC KEY]", "Secret": "[YOUR SECRET KEY]"}
  • Please replace the API key of Google Maps with your own key in views/stat/map.pug.
  • Please replace the value of global.DOMAIN_ROOT with your own hostname in app.js (here). This global constant is to prevent the abuse of the private APIs.

Roadmap of future development

Please refer to Roadmap #1.

License

Surakarta Online is licensed under the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. For details, please refer to COPYING.