How Skybreach leverages SQD data access in its games
Quick Facts
Description of Skybreach: Skybreach is a web3 gaming ecosystem connecting various games through lore and universe facilitated by smart contracts. The first game to launch is the Dungeon Crawler mini-game called Skybreach Dungeons. Resources gained in it will be available in a future launch to upgrade one’s gear to prepare for higher-difficulty dungeons, creating game loops.
Chains served: Base
Make or break feature: Instant game result and leaderboard indexing
Using SQD for: indexing game-related events, dungeon quests, in-game characters, sessions
Only possible with SQD: Access to underlying ORM to facilitate recursive data structure, wide selection of chain archives for all EVM chains, fast re-indexing using squid archives
How Skybreach came to use SQD
The Skybreach and SQD team go back a few years. Initially, both were building on Substrate in the Polkadot ecosystem. Eventually, RMRK team realized that while they admire Polkadot for its vision and tech, there was no denying that the developer count was significantly higher on EVM chains. This led to their move to EVM, allowing them to tap into the latest innovations for consumer app builders, such as account abstraction.
When in the Polkadot ecosystem, building on Kusama, the RMRK team was indexing everything manually, listening to the latest block using polkadot.js, and parsing/filtering the content. In 2022, ahead of the move to EVM, the team explored multiple options, including the graph, subquery, and SQD.
“We found that the SQD indexing SDK is the most flexible of them all, allowing us to organize our indexer how we want to instead of being forced into a specific pattern.”
Adding on to that, Skybreach CTO Yuri also shared that it’s possible to have patterns recommended for those looking for a simple setup. “It’s very modular and exposes its lower lever apis, so you can organize the code how you want.”
On top of flexibility, Skybreach also had some very specific requirements that they couldn’t find anywhere else. One of them being access to the underlying ORM.
“In this case, because we had to have a tree-like data structure that is recursive, no other indexer SDK but SQD allowed us to do so. Some other features that made us go with SQD were a wide selection of chain archives for all the EVM chains we planned to index, and amazing tech support.”
SQD in Skybreach’s data back-end
As long-time users of SQD, the team was self-hosting indexers indexing NFTs from 7 different chains before. However, for their current project, they wanted to move as quickly as possible with little overhead and, therefore, decided to go with SQD cloud.
SQD is used to index all the dungeon quests that they configure on smart contracts. On top of this, Skybreach captures players’ game sessions, their game results, in-game characters, and all Skybreach lands and settlements.
“Players can claim additional rewards once a week if they are in the top position of the leaderboard for each Dungeon, and while we can read all of this data from the contract directly and parse it on the client side, having it indexed makes everything much easier, plus since SQD comes with the graphql server out of the box, we can do more complex queries that would be difficult to do directly with RPC API.”
Another insight the team shared is that using SQD cloud didn’t limit them to a specific pre-defined tech stack either. Instead, since the indexer is just a docker container, adding additional services is very easy.
“We also emit all the events that we index into our external Redis, which then feeds our bullmq queue, which is ingested by our separate Search API that we self-host on digitalocean. This allows us to index all in-game characters in a separate existing database that is more suitable for search than Graphql is and do some advanced and very performant filtering like ‘Show me all my characters that are currently traveling between these two settlements.’”
All of this led them to conclude that “SQD is one of the best indexing SDKs currently available on EVM. Anyone reading this is still on the fence, so do yourself a favor and try it.”
On working with the SQD team
This has been another highlight for Skybreach, thanks to the tech support they received and the open communication between the teams.
“We have a separate Dev chat with SQD developers. Not only are they super helpful when we have some difficulties, but they also listen to feedback on the SDK design. A few times, we had critical bugs on the weekends and received immediate support. But please don’t start poking guys on the weekend because I said this😂️️️️️️”
The answers for this case study were kindly provided by Yuri, CTO and co-founder of RMRK and Skybreach.