GlobeGrafter aims to help game developers develop Roguelike games in web3 environment. This competition has completed (RNG, map generation) and rogueLike games made with this module
We utilize the GlobeGrafter module to generate game maps and have developed an example roguelike game. In this game, the map data generated by GlobeGrafter determines the information of elements such as walls, floors, and doors. Monsters are randomly spawned on the map, and the damage dealt during attacks is also randomly determined. This is a fully on-chain play-to-die game.
https://rogue.cenozoic.xyz/
To enhance the gameplay experience, we have implemented zero-knowledge proofs so that players do not need to interact with the blockchain after every single action. Instead, players can interact with the blockchain and validate their proofs when they eventually die in the game. Upon game completion, a random hero NFT is minted. If the player's experience (exp) exceeds 5000, a rare goddess NFT is minted. These NFTs contain the final records of the game, including dungeon level, level, exp, damage, attack, and gold information. These NFTs are independent and can be utilized in other applications as well, making rare NFTs highly sought after.
In the game, players can move using directional keys and press the '>' key when on a 🌟 position to enter the next dungeon level. Each map is randomly generated, ensuring unique gameplay experiences for each session.
Game Features
For this game, we carefully selected cutting-edge technologies and tools to ensure a robust, scalable, and efficient solution.
Front-end: We use HTML, JavaScript, and CSS to build games and interact with the blockchain using web3.js.
Back-end: We use Solidity to write zero-knowledge proof verification contracts and game settlement contracts for randomly minting NFTs. We utilize the zkSNARK scheme to implement zero-knowledge proofs.
Deployment: Our smart contracts are deployed on Goerli-Optimism and Mode Sepolia (all the validation and processing logic is on-chain, with only one frontend deployed, interacting with the Goerli-Optimism chain). We leverage the advantages of Layer 2 (L2) to improve the speed of our contracts and reduce gas fees. We also utilize PINATA (IPFS) to store our basic NFT metadata information. Our frontend project is deployed on AWS cloud servers.
Data statistics:We utilize The Graph to monitor our contract data and track in-game statistics. This allows us to easily view the overall numerical situation of the game, providing us with a data benchmark for future updates and improvements.
GPT-4 Assistance: To facilitate our development process, we occasionally seek help from OpenAI's advanced language model, GPT-4. GPT-4 provides valuable insights, suggestions, and ideas to improve our project throughout the entire development process.GPT-4
Midjourney: The NFT metadata hero images are generated by Midjourney AI.