Inspiration
The inspiration for hypernom-soroban came from the need for a decentralized and transparent system for maintaining leaderboards in gaming applications. I wanted to leverage the power of blockchain technology to create a system that is not only secure and reliable but also easy to integrate with existing gaming platforms.
What it does
hypernom-soroban is a Smart Contract written in Rust for use with the Solana SDK on the Stellar blockchain. It implements a leaderboard system where each player's scores are stored on the blockchain. This ensures transparency and reliability as the scores cannot be tampered with once they are recorded.
The game itself, Hypernom, is a game featuring non-euclidean spaces projected down onto 3D.
I chose this game, as it's written as a simple static site and mostly in JavaScript using three.js. It was easy to modify to send scores to the blockchain.
How we built it
I built hypernom-soroban using Rust, a language known for its safety and performance. I used the Solana SDK to interact with the Stellar blockchain. The most challenging part was writing in a minimal dialect of Rust without the standard library (#![no_std]), which required me to think carefully about memory management and data structures.
Challenges we ran into
One of the main challenges I faced was dealing with the limitations of #![no_std] Rust. Without the standard library, I had to reimplement some common data structures and algorithms. Additionally, I had to ensure that the code was efficient and didn't use unnecessary memory, as this is a critical factor in blockchain development. The smart contract is written in Rust and compiled down to WebAssembly, which is run on the Stellar blockchain within the Solana Virtual Machine (SVM). As such, the constraints on the programming language and runtime environment are similar to an embedded system, and must be kept minimal for smooth operation.
Accomplishments that we're proud of
I'm proud of creating a robust and secure leaderboard system that can be adapteed to be used in any gaming application. I'm also proud of the fact that I managed to write this complex system in #![no_std] Rust, which was a significant learning experience. In fact, most of the time was spent iterating on Rust code and writing tests.
What we learned
I learned a lot about blockchain development, particularly how to write Smart Contracts in Rust. I also learned about the challenges of writing code without the standard library and how to overcome them.
What's next for hypernom-soroban
The next step for hypernom-soroban is to integrate it fully with the gaming platform and test it in more real-world scenarios. I also plan to add more features, such as support for multiple leaderboards and more complex scoring systems. The current game is limited to 6 levels total, and scoring is time-based. As such, the data structures chosen had to be the right fit for this particular game. The Rust code in the smart contract will need to be adapted to support other games.
Log in or sign up for Devpost to join the conversation.