Skip to content

Possible Technical Direction

Robert Konigsberg edited this page May 12, 2022 · 2 revisions

Much of the app is pretty stable, but I still think there are two major features worth considering. Frankly, I am endeavoring to start #2.

Complete client-server separation

Right now they're separated, which you can tell from faster client compilation and even at faster startup. Completing this probably requires moving all server code to src/server and adding rules that keep different subdirectories from referencing each other (eg. don't import server from client, don't import client from server, and don't import client or server from common.)

A better UI

A better UI is pretty well covered in #2121, but a vision and execution are missing.

A better Request/Response format

  1. Replace the double-array input response with JSON. Besides being more readable, it's more flexible. Right now, it's not possible to have AndOptions nested inside OrOptions.

  2. Add a tag to every waitingFor input, represented by a random string, and expect it in the response. This is pretty minor, but right now we're just expecting that a response is just legitimate without considering that it's the right response for the current state. This could be a problem during server restart where 0 could mean something very different. Or 'MicroMills' could mean "play this card" or it could mean "sell this card".

A better undo

  1. Create a new table, which here I'll call MicroSaves which represents a player's request-response interactions. So every micro-action is saved. After a player's turn concludes, the microsaves get deleted. This could wind up being CPU-intensive, and database operation-intensive, but not costly for storage.

  2. MicroSaves also contains a field repeatable a boolean that is almost always true except when the behavior includes revealing cards from the deck. (This can also be kept in memory.)

  3. Allow a player to undo as many steps back as they like as long as the action is repeatable.

This might have the side-effect of making the app less severe on restart.

It will also have the side-effect of improving the situation where you play a card that turns out doesn't do what you want it to do.

Integrate more Community Features

CEOs looks really nice. So does Random Turmoil, New Ops, Archaeology.

OAuth integration

This is something I've been wanting to do for some time. OAuth integration enables useful features like secure games, being able to save more state and history for the player (all the games you've ever played) creating sets of game configurations instead of relying purely on JSON files.