Owlbear Rodeo for hex crawls.
- Start dealing with API
- using json-server for local dev
- could be posgre later
- now need a loading phase as data returns from the server
- Add procedural features
- Roll for randos when a hex is entered
- Replace observable with proxy
- compass rose
- Lock: perhaps it could issue a lock after each move so the owner can execute their process
For map data.
name | type | key |
---|---|---|
ID | Int | primary, unique |
TYPE | String | secondary: map | instance |
NAME | String | |
MAP_HEIGHT | SmallInt | |
VIEW_RADIUS | SmallInt | |
START_HEX | SmallInt | |
MAP_DATA | JSON |
For re-using maps.
name | type |
---|---|
ID | Int |
NAME | String |
MAP_ID | Int |
MAP_DATA | JSON |
Are there any real differences between maps and instances in terms of data? I don't think so. Map is a template for instance and should therefore not be updated where an instance is updated.
So the process becomes
- user selects hex
- icon is moved
- The entered hexes and viewed hexes are calculated and updated ()
- A diff of ids is produced
meanwhile the game loop looks for the diff list and re-renders just those hexes when it's full the diff would therefore need to be a queue that the game loop could access and deplete.
the reason I'm thinking queue right now is becuase game state and rendering could operate independently ... both update the queue but the loop doesn't care when the queue is updated it just takes a piece when available
Now the diff ids is a good idea locally but if I had to send this over a server then just the ids would be meaningless on another computer. so the diff must naturally be changes hexes that can be merged into local state. but also if I'm sending to a server then I don't think I'd want to merge diff and data so maybe the updated mao passed so the server with the diff id list that way a consunder can replace the board for refreshed and use the diff to get those cells for updating the dome So the process becomes
- user selects hex
- But it has to be a sibling hex
- icon is moved
- The entered hexes and viewed hexes are calculated and updated ()
- A diff of ids is produced
- local ui updates
- Diff and map update are sent to the server
- The server saves data and also relays updated data to other users 8.