I've been a fan of video games for pretty much all of my life. I'm also a fan of blockchain technology, with Lisk in particular. The thought of combining the two was in my mind for a long time. However, I was never quite sure on how to implement it.
With the advent of NFT markets, together with the new features in the release of Lisk SDK version 5.1.4, I had some ideas floating around. These eventually manifested itself in the creation of this project; Dungeons & Beddows: Battle of the 0 0 0.
What it does
D&B is a turn-based RPG game built on Lisk technology. In this game you go on an adventure to slay monsters, level up, earn gold, get better gear, run into random events, and much more. The goal was to make an addictive game that is fun to play where the blockchain part, especially the technical side, is not too obvious to the user. A leaderboard is in place to keep track of everyone's achievements.
How we built it
The backend was built with Lisk SDK 5.1.4. The CLI tool was used to create the initial boilerplate project, as well as adding additional boilerplate for each module and asset. Building a blockchain with the new SDK really is as easy as:
lisk init ./bin/run start
After the boilerplate was created, I added the required functionality to the module and assets.
Each of the actions that a player can do is basically a unique custom asset (aka custom transaction). Validation is performed in each asset to determine if a player is allowed to perform said action. When applicable, on-chain data is mutated.
Monsters are spawned by the game's module after each x number of blocks. The module keeps track of how many monsters there are of each level, and alters the spawn-rate accordingly.
The frontend is bootstrapped with Create React App. For the design I decided to use the utility framework Tailwind CSS for the first time, seeing as it was a nice middle ground between writing vanilla CSS and using heavily opinionated component libraries.
To spice the project up a bit, I looked into the world of pixel art. Quickly recognizing this is extremely difficult to pull off yourself, I ended up with the following:
- Purchased some licensed assets
- Found some cool free assets
- Created some custom assets (you will recognize them 😉)
What's next for Dungeons & Beddows: Battle of the 0 0 0
- Named weapons / armor
- Random loot drops
- NFT marketplace
- PvP combat
- Party / raid support
- Class system
- Random events
- More story events