About two years ago, I decided it would be fun to create a real working Codex game, with full rules engine. The idea was to use the forum to create the community, so I wouldn’t have to handle user management and all that sort of thing - only game state and rules. So, it’d work like this -
- Go to game site
- Make your first turn. The game handles all rules for you, all triggers, all state tracking (counters etc), and so on.
- Game engine saves state and gives you a link to the next player’s turn, which you give to the next player
In practice, the game would actually post the game state (minus secret information) to the forum, along with the link for the next player to take their turn and continue the cycle.
I actually built the engine and it works, supporting most game features. I designed it to be flexible enough to support almost all cards, and implemented some of the tricky ones as tests to make sure that they function.
I began building a very simple client as well, mostly for testing the game, but didn’t get very far. Only a handful of cards are implemented.
Anyway, mid-project I became distracted by work and life, and put it on hold. I’m posting now because having it so near to completion feels like a waste, so I decided to open source it in case anyone else wants to chip away at it. The current state of the game is:
Engine: Mostly complete. Overpower is still on the TODO list and it might take an hour or two to finish implementing. Forecast/Fade still need to be implemented, along with a small list of other minor features. I designed a system flexible enough to support all cards I could think of, and implemented a system to make adding cards very simple - mostly copy/paste, even for more complex interactions.
Cards: Mostly not implemented, aside from a bunch used for testing. Basic cards can be added to the game in seconds (copy, paste, change values). More complicated cards might take a few minutes, and the most complicated cards upwards of 10 minutes.
Client: Has the most work to do; very basic, only for testing. Even start game functionality is not implemented.
Code: I wrote everything in TypeScript and the client in React TypeScript, because at the time I was interested in learning these technologies.
Code is here:
I’d welcome anyone who’s interested in contributing and would be able to give some guidance on how to get started.