The aim of this project is to create a decentralized crosschain tabletop experience!
This project lets players get together, connect their wallets and play a dungeons & dragons campaign. The game mechanics are stored in the Campaign contract, of which the game master is the owner. Here the game master can perform certain actions involving the player characters, think ability checks, leveling up characters, creating and handing out items, messages etc. Most of this is done through cids of in-game objects, stored on ipfs/filecoin. Players can create a character, link an NFT they own as an avatar, decrypt cids given to them by the game master, and chat with the other players. An event log (subgraph) keeps track of in-game events like leveling up, ability checks etc.
The game mechanics are stored in the Campaign contract which is owned by the GameMaster. Standard tabletop mechanics are included in the contract like ability checks through dicerolls, leveling up, finding items and treasure etcetera. This is all done by the GameMaster through storing objects and files on FileCoin/IPFS through the Lighthouse.storage SDK. The cids of these objects (items, messages, equipment etc.) are stored in the item library on the contract. When creating an item, the GameMaster can choose to keep it open for all players, or encrypt it and only give some players access (secret information/messages for instance).
In the web-app the players can create a character with a linked NFT (fetched with the Alchemy API), chat in a chatbox provided by PUSH Protocol and decrypt cids provided by the game master. The game master can use the web-app to create and items, perform ability checks for players, and share messages and cids through the chat. A subgraph of the contract fills the Event Log with information of ingame events like whenever an ability check happens, a character is created etc.
Sponsor technologies used: -Filecoin/Lighthouse SDK for file storage, encryption/decryption -The Graph subgraph for querying in-game events, -Push Protocol for the group chat between players, -Campaign contract deployed and verified on ScrollScan (address: 0x2A605748090e5aD7B7222CE8A5a3440f9241C4c9)