trifle-labs / anybody-problem

Anybody Problem simulates the 3-body problem in two dimensions using zk proofs written in circom.
https://okwme.github.io/anybody-problem/
12 stars 2 forks source link

Play without Save #150

Open okwme opened 2 weeks ago

okwme commented 2 weeks ago

There should be a play through that's possible without a wallet.

On the site version

You start a problem by querying the new getProblemDataByDay(uint256 day, uint256 bodyCount) method on Problems contract. This will return the bodies and their positions. After each level is beaten, the user is given the option to save results or skip. Skipping will query the next problemData with one more bodyCount and proceed. Care needs to be taken so that the moves played are saved in local storage and available for save even after refresh. Might even be good to wait to run the prover until the user requests it directly. This would free up processing power which would make it easier to play on mobile and also not send unnecessary proving requests to the server.

Could imagine a speed / price relationship as follows:

This all kind of follows mobile games that allow you to spend to speed things up. Could be a potential token sink if we incorporate a token into rewards.

The sidebar could make the most sense to store this kind of information, list of buttons to prove, list of buttons to submit. Might be possible to combine the submit transactions but could also get messy if there's a limit and you're submitting a tx for levels 1—4 then another one for 3—7.

In the iFrame version

This would be the version as it shows up on OpenSea. Should keep your own score. Actually could pull data from contract about top score. Currently not sorting top score on chain but could be.

After each level cleared you proceed to next, Score Screen shows your own scores and possibly contract data for top score but then just a button to proceed to next screen. Take opportunity to point out that they are missing the chance to save the NFT.

Maybe the Problem NFT should just be one per day, the first person who saves a score has to pay gas costs to mint the NFT. Maybe can reduce gas costs since it's not a real real NFT but just a vessel for accessing the daily NFT?

[I can imagine NFT interface getting scrapped in terms of priorities to launch but would make it much more relevant to onchain summer]

okwme commented 4 days ago

182

181

174