Inspiration
Mazoku Legends is a Massively Multiplayer Online Roleplaying Game inspired by Japanese mythology. The in-game economy is powered by XRP on the XRPL EVM sidechain.
I have always been a fan of RPGs and retro games. I used "New Horizon" as a good excuse to lock myself away for a week to build this game.
What it does
In this demo, you can chat with other players, send XRP, mint a Sword NFT, and battle the Dark Lord! Connect to MetaMask first, reload the page, and then use the arrow keys or your mouse to move your character. Use the Space bar to talk to the characters you encounter.
It demonstrates the following actions on the XRPL EVM sidechain:
1) Minting NFTs 2) Calling Smart Contract methods 3) Using XRP in transactions
In the chat window, if you type "send xrp", you will be able to send XRP to other players in the game. Be sure to "forge" a sword (mint the NFT) before attacking the Dark Lord, or else you will lose XRP!
How we built it
The game was built using RPG.JS, a JavaScript framework for game development, which has no native Web3 functionality (at least currently), so I added the Web3.js library as well as a special library that allows MetaMask to work with Vue applications.
I used Remix to deploy a Solidity smart contract to the network. The RPGSword contract issues ERC721 tokens on the network. You can see transactions here: https://evm-sidechain.xrpl.org/address/0x8FA30Ac6e52D48829B9Bd19A65a27da81C3B3666
Challenges we ran into
Using the RPG.JS, we have to split our workflow into client and server functions. Developing this game was much like solving a grand puzzle, in that I had to constantly think about ways I could pass data between the client and the server. MetaMask runs on the client side, so I had to devise ways to pass information that could only be gotten client side, such as the user's wallet address, to the server when necessary.
Accomplishments that we're proud of
This was a massive undertaking, but based on my previous hackathon efforts this year, I realized I needed to do something even more outside of the box. Games can be very complex to program, so I'm proud that I was able to assemble something that I believe in and think could become a big thing in the community with more development.
What we learned
I learned a lot more about game development while working in this project. The server was initially difficult to deploy - I tried Vercel and Railway, but ended up using Render which seemed to work much better with the configuration.
What's next for Mazoku Legends - An XRP RPG
My plan is to expand the game entirely, creating and adding new maps, NPCs, and fleshing out a more elaborate battle system. I would like to add P2P battles that would utilize smart contracts to issue rewards. I'm also developing the game backstory and mythos and hope to launch this on the sidechain when it migrates beyond testnet!
Built With
- javascript
- vue
- web3js




Log in or sign up for Devpost to join the conversation.