Pretty Chitty is a pretty & chitty board game platform. It's a typescript framework that makes it quick and easy to build high quality async or realtime 3d strategy games.
Pretty Chitty provides a comprehensive game engine that combines:
Check out these example games built with Pretty Chitty:
Source code for demos:
Full API documentation is available at: https://pretty-chitty.github.io/pretty-chitty/
Or view locally after building:
yarn docs
open docs/index.html
Chits are the fundamental game pieces in Pretty Chitty. Everything is a chit - cards, dice, tokens, players, even the game board itself. A Chit is a normal typescript class and can have any basic serializable properties on it (including references to other chits). The game state is effectively a tree, where every Chit (except the "root" chit) has a parent, a parentOutlet (i.e. how is this chit related to its parent), and possibly a parentOutletIndex (i.e. this is the third token in a stack on a card).
Key chit types:
Chit: Base class for all game piecesRootChit: The game board/table that contains all other chitsPlayerChit: Represents individual players with their own stateGameDeckChit: Deck of cards with shuffle, draw, and stagingGameBagChit: Bag of pieces for random drawingDiceChit: Animated dice with customizable facesSparkChit: Interactive UI elements in panelsChits can have named outlets (using the @ChildOutlet decorator) where other chits can be placed. The OrderedOutlet class manages ordered collections of chits with support for splaying, stacking, and positioning.
Games are structured around the Turn class, which provides:
3D Rendering via ChitRenderSpec:
CameraSpecLightSpec2D Rendering via ReactCanvas:
While this is an npm package, it is highly recommended that you use the @pretty-chitty/cli package to install and run Pretty Chitty games. This cli utility will:
yarn build
yarn dev
yarn test
yarn compile:check
This project is licensed under the Pretty Chitty Source-Available License v1.0.
Allowed Uses:
Not Allowed Without Permission:
For commercial licensing: legal@prettychitty.com
See LICENSE.md for full details.
This is a source-available project. Public redistribution and derivative works are not permitted under the license. For contribution opportunities or commercial partnerships, please contact legal@prettychitty.com.
Notes to add:
dropshadow color is bad for light color backgrounds x font scaling parameter?
offset with children click handler is maybe weird/wrong?
10x gallery has extra line return?
need to show 10x counter on inline gallery x outline color isn't perfect? why does it make it ligher? purple on purple should be invisible x inline gallery context always renders? eats up CPU x is there a settimeout somewhere that fails if server is slow? x droppick should take single array
inline gallery scrolls all the way left after selecting X inline gallery doesn't get staged out correctly on disconnect X ordered outlets need a way to insert! or keep them sorted X zip needs a reset point (and persist logs)
gallery popup from chits should sort by parentoutlet and then parentoutletindex
sprite selection is still off
chits don't move to other panesl to non-rendered chits correctly