Open iancoleman opened 4 years ago
Think about how to enable a replay of multi round games, would be good to start gathering some data.
Probably a good way forward is to default to automatically generate 1 new NB every 2s, a slider to control speed, with the far end of the slider being paused. Allow manual stepping forward by pressing Enter or Spacebar. This adds some live action to the simulation which is kind of exciting. From the moment the page is loaded meaningful things will be happening.
This automatically generates new ticks on a schedule set by the slider between 0.1s and 1h.
It also exposes app.doTick()
and network.doNeigbourBid()
, although app.doTick()
is preferred and should be included in the docs at the bottom of the page (ie network.doNeighbourBid()
should not be included in the docs, even though it will remain available).
Next up is to add cumulative rewards to the table, then think about a recording / replay feature.
See https://github.com/iancoleman/perpetual_auction_currency_game/commit/c10ec3f3d99660cbcdd026bf6be66ec4c1181556 - Show total rewards for each node in leaderboard
Next is to think about a record / replay feature.
https://github.com/iancoleman/perpetual_auction_currency_game/commit/68689a9ad7a5332f580eed6a0d2149a4d8356eac - Add eventsource for managing new neighbour bids
This also allows subscribing to events. Nodes can easily know when to update their bids.
Could possibly be extended to allow node bid updates to be actionable events.
Thinking also about how eventsource can be extended to allow events from websocket / other players / webrtc.
Pressing Enter repeatedly will run a multiple-round game. This is unintended behaviour (it was originally designed to be a single round simulation) but it's useful to have multiple rounds so let's design the multi-round-game features with intent rather than by accident.