Skip to content

Create modifiable asset functionality as the user plays #7

@flyinlikebrian

Description

@flyinlikebrian

Objectives

Main objective is to allow the image of a user’s NFT to change as they move through a Loot game.

Tableland is currently only supported on Rinkeby testnet everything in this Grant will be built on top of Rinkeby.

To start, see the NFT Metadata example in the Tableland docs. You can configure your game to change those responses based on how the user is playing the game.

For an idea how the game could function consider both the Loot Extension example app and the Loot Character associative NFTs.

Details:

The Loot Extension example app For some background on Loot: A Loot Bag is an NFT that has 8 properties (Weapon, Chest Armor, Head Armor, Waist Armor, Foot Armor, Hand Armor, Necklace, Ring). Each bag has a unique set of these properties.
The Loot Extension example app lets the player choose loot bags to play with (Note: you don’t need to own the bags). For each of the 8 property types within a Loot Bag the player can choose which bag to select from. The game defines 4 rankings (Strength, Speed, Stealth, Charm) and the associated numeric values for all of the possible Loot Bag property values. Note: the values of these 4 rankings were invented by the extension developer. Once the player has selected a specific bag for each property type, there is a total value given for each of the 4 rankings. This grant will involve building a more complex game that has “challenges” that requires certain values for certain rankings in order to complete the challenge.

The Loot Character NFTs are an image that is a combination of 8 png “layers” that each correspond to one of the 8 items in a Loot Bag. The actual png images making up the layers are available here and here. To see them in action you can look at LootCharacter.com.

This Grant: When a user wants to play game you will be building they will first mint a token (NFT) in a Smart contract you have deployed and connected to a tableland table as explained in the Docs linked above. This NFT is a “Player”, for lack of a better term. The metadata of the Player NFT is stored in tableland and as the player plays the game the metadata will change. Specifically a mashup of png layers will be created based on the way they use items from the 3 Loot Bags they are playing with.

This may all seem complicated, so lets talk through a specific example of how playing the game would work:

  1. The user is either prompted to mint a Player NFT, or choose a Player that they already own. (NOTE: they can have more than one).
  2. The user chooses three bags of loot to play with.
  3. The Player selects a challenge. You should give the challenge a cool name and description that fits with the Loot’s adventures based theme. You can determine how much you want to tell the Player about whats required of the Challenge at the outset and during play.
  4. The Player is somehow shown that in order to complete the challenge they need some (or all) of their rankings be in a given range. For example: To complete the “Mountain Crossing Challenge” they might need Speed above 4 and Strength above 1. Keep in mind that these values can be negative and a challenge could involve have a value below a given threshold.
  5. The Player selects which bag to use for each of the 8 properties of a Loot Bag (Weapon, Chest Armor, Head Armor, Waist Armor, Foot Armor, Hand Armor, Necklace, Ring) with the goal of getting all of their ranking totals to be within the range for the challenge.
    This part is key: As the player changes their loot bag selections, a Loot Character is shown with the png layers that map to the selected bag’s chosen property. I.e. if bag Integration Guide: Lit Protocol #1 is chosen for Weapon, Chest Armor, Head Armor, and Waist Armor, and bag Integration Guide: The Graph #2 is chosen for Foot Armor, Hand Armor, Necklace, and Ring. The Loot Character image you see will be made of 4 png layers from bag Integration Guide: Lit Protocol #1 and 4 png layers from bag Integration Guide: The Graph #2.
  6. Once the Player has specified properties of bags that meet the challenge, they see text and a button appear that indicate that they can complete the challenge and update their Player NFT image with the Loot Character layer mashup image.
  7. Clicking the button will trigger the updates needed to the Tableland table that is storing their Player NFT metadata. This means that when they look at their player NFT they will see the mashup image.

Timeframe

From awarding of this Grant to the all milestones being delivered will be no more than 40 days.

Milestones

Milestone 1

Overview

Generate and deploy the NFT smart Contract to Rinkeby, and deploy a version of your application that allows minting of a Player NFT.

Docs and critical links

Acceptance criteria

  • Able to interact with your application and Mint a Player NFT by either deploying the code locally or navigating to a public URL.
  • Must verify the Smart Contract and minted NFT exists via rinkeby.etherscan.io/.

Milestone 2

Overview

A user is able to play the game and see the changes to their Player NFT on etherscan.

Docs and critical links

Acceptance criteria

  • A user can select which Player they want to use.
  • A user can select a challenge and see what rankings are required.
  • A user can select 3 loot bags to play with and as they select different bags they see the loot character mashup change.
  • When the criteria are met they can update they Player NFT’s metadata.

Milestone 3

Overview

The game is deployed to Textile Hub or via IPFS somehow.

Acceptance criteria

  • The game can be played by anyone with a web browser that has a Wallet setup. Note: Should support Chrome with Metamask and Brave, anything else is optional.
  • Instructions for deploy locally and to IPFS are written in a readme.

Award amount

TBD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions