GithubHelp home page GithubHelp logo

jameskmonger / creature-chess Goto Github PK

View Code? Open in Web Editor NEW
78.0 7.0 9.0 175.55 MB

Open source Auto Chess game in TypeScript, React and Node

Home Page: https://creaturechess.com

License: GNU Affero General Public License v3.0

TypeScript 95.59% HTML 0.94% JavaScript 2.14% EJS 0.10% CSS 0.20% Dockerfile 0.75% Makefile 0.27%

creature-chess's Introduction

Creature Chess

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

Playing

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

Development

Prerequisites

  • Node.js 18
  • Docker w/ docker-compose
  • Yarn (npm i -g yarn && yarn set version 4.0.2)

Environment variables

Copy .env.example to .env in the root of the repo.

These will be automatically picked up and used by the game.

Generate Prisma client

If you are aiming to work on the code locally, you must generate the Prisma client so that TypeScript understands the available types.

make prisma-generate

Running it in Docker

To build and run the project, you can use make:

make

If you change the server, you can run make rebuild to rebuild and restart the server.

Documentation

Creature images

When you run make server, the creature images will be hosted at http://localhost/images.

You can set the CREATURE_CHESS_IMAGE_URL environment variable to change this, for instance to use a CDN.

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.

creature-chess's People

Contributors

baronbeans avatar calumgreen avatar dependabot[bot] avatar hisuwh avatar jameshallam93 avatar jameskmonger avatar ollymonger avatar thyde1 avatar

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  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

creature-chess's Issues

Refactor to feature folders

Its painful having to jump between 6 different folders to implement a feature.

So rather than:

  • /actions
    • /pieceActions.ts
  • /actiontypes
    • /pieceActionTypes.ts
  • /components
    • /piece.tsx
  • /reducers
    • /pieceReducer.ts
  • /selectors
    • /pieceSelectors.ts

Have:

  • /piece
    • /pieceActions.ts
    • /pieceActionTypes.ts
    • /piece.tsx
    • /pieceReducer.ts
    • /pieceSelectors.ts

Pokemon stats UI

Display UI in the top right (next to the chess board) showing pokemon name, pictures and stats

Display "combine" button if there are 3 of the same pokemon ID

Set up server for prep and play

Lifecycle maybe:

  • server tells client starting prep phase (30 seconds)
  • server tells client starting ready phase (5 seconds)
  • server tells client to play with seed ______________

Dissappearing piece

Couldn't move a piece
chrome_9PtxP6u25R

Then when the game started this pokemon appeared where I was trying to drop
chrome_5vJZ0dDcaR

Add correct pokemon to deck

  • Caterpie
  • Weedle
  • Scyther
  • Dratini
  • Pikachu
  • Magnemite
  • Voltorb
  • Electabuzz
  • Machop
  • Hitmonlee
  • Hitmonchan
  • Charmander
  • Vulpix
  • Ponyta
  • Bulbasaur
  • Oddish
  • Bellsprout
  • Sandshrew
  • Diglett
  • Pidgey
  • Spearow
  • Jigglypuff
  • Zubat
  • Grimer
  • Koffing
  • Abra
  • Drowzee
  • Geodude
  • Aerodactyl
  • Squirtle
  • Poliwag
  • Magikarp

Implement leveling system

Players should get XP at the end of every match and level up with that XP

Each level allows for 1 more board piece

Players should be able to buy XP

Sync piece movement to server

When player moves a piece, this move should be sent to the server so that it's kept in sync

Update the player's board property on the server

This should maybe be done as a patch style update to save data (e.g. piece 123 moved to x,y)

Server battle doesn't stop after 20 simulated seconds

A battle executes much faster on the server than on the client, so a fight that runs to a "tie" on the client may be a win to some player on the server

The client turn timer is 50ms so maybe the server could stop simulating after 400 times

Buy units from card list

  • Click on card
  • Send PURCHASE_CARD opcode to server
  • Take money from user
  • Add card to first empty slot in player's bench (on server and client)

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.