Skip to content

wordpad25/creature-chess

 
 

Repository files navigation

Creature Chess

An open-source auto chess game written in TypeScript using React and Node.

Playing

To try the game, head to creaturechess.jamesmonger.com, register an account and click "Find Game".

This is just on a tiny server for demo purposes so it might not work all the time - please get in touch if you have a better server that we can use ❤️

Development

Prerequisites

  • Node.js
  • Docker w/ docker-compose
  • A Fauna database with an access key in environment variable CREATURE_CHESS_FAUNA_KEY
  • An Auth0 app for the server
    • Set up a machine to machine app
    • Store the client secret in environment variable AUTH0_MANAGEMENT_CLIENT_SECRET
  • An Auth0 app for the frontend
  • (optional) A Docker bot with a token in environment variable DISCORD_BOT_TOKEN
  • (optional) A Sentry.io DSN in SENTRY_DSN

Running

# install and link dependencies
$ npm install && npm run bootstrap

# run the frontend in dev mode
$ npm run dev:app

# run the server (do this in a separate console)
$ docker-compose build && docker-compose up

The game is then accessible at https://creaturechess.local-dev.com:8090. You might need to add creaturechess.local-dev.com to your host file (or remove host from webpack.config.js)

Publishing

  • Use npm run release to create a new release - create a tag and commit, and push to Git
    • This publishes GitHub pages (app) and Docker Hub (server-game)
  • Push to Heroku with git push -f heroku v0.2.2^{}:master
    • Replace v0.2.2 with tag from last step
    • This publishes Heroku (server-info)
    • You may have to run this in Bash

Packages

If the package has a README, you can click on its name here for a link.

Clients

  • app - React app
  • server-game - websocket gameserver
  • server-info - express API server

Server/Client bindings

  • models - type library for all shared/domain-centered models
  • networking - packet definitions etc shared between app and server

Gamemode

  • board - Redux reducer and commands for the board
  • gamemode - the gamemode
  • battle - battle logic

Utilities

  • auth-server - shared code for auth0 on the server
  • data - database access

License

Creature Chess is licensed under the AGPL v3 License.

All creature sprites are from Tuxemon and are licensed under the CC BY-SA 3.0 license.

About

Open source Auto Chess game in TypeScript, React and Node

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 87.4%
  • SCSS 9.3%
  • JavaScript 1.6%
  • HTML 1.3%
  • Other 0.4%