Procedurally generated treasure island & Treasure Chests (for Loot & all Adventurers with an account)

Hello everyone! I am new here and new to crypto dev in general coming from Web2 SWE, so please bear with me :smiley: I found out about Loot recently and built a little fun project (more like a toy) on top of it. I called this “Treasure Chests” — basically the idea was to make something that anyone with an Ethereum account can mint, but Loot holders get unique perks.

It’s kind of different from the other “derivatives” that I’ve seen floating around and I had a ton of fun building this, so here goes nothing. I wrote up some of it on the front-end I whipped up for the project, but the summary is:

  1. We have a 1024 x 1024 treasure island (procedurally generated in browser & can be viewed on the front end)
  2. Every Ethereum address maps to a treasure location, i.e. the x, y coordinates of a treasure are randomly determined from the address of the person trying to claim it using the same random() function that @dom uses in Loot — this means max 1 treasure per address but ofc can use multiple addresses
  3. Can “claim”, i.e. mint with Loot by providing a Loot bag ID that you own, in which case there’s additional data and imagery rendered on the treasure
  4. If claiming without Loot, contract uses your Synthetic loot
  5. Treasures are by default closed (since want to be accurate here, I bet no one ever has hid their treasure opened), but can choose to send a small fee to open at mint or later.
  6. Treasures have weight, a record of a Loot item that the Adventurer was wearing when claiming + info about the treasure contents if it was opened, otherwise the treasure remains closed. Contents are metals + some rare items. All this is also generated randomly and some contents are rarer than others…etc. The idea here is also to preserve some history of ownership / connection directly to Loot and to the adventurer who claimed the treasure
  7. Everything is stored on-chain, SVG is also generated on-chain conditionally, i.e. treasures are rendered looking closed if they’re closed, then you can open & the SVG will update, etc…

There’s a front end I whipped up here for it which is interactive but ofc can mint from contract as well, though with the mechanics of x, y coordinates having to match the ones determined by the msg.sender address, this might be harder. Here’s one example of what a Treasure Chest may look like on OpenSea:

If you read the contract code there’s a function that can return a bunch of data about any given Treasure, so I was thinking perhaps there could be continuations / more interactive stuff following this. Happy to join the community and hope to contribute more. Have a good day / evening / morning everyone