The Way to Building Gaming on ZK-Rollup with Starknet Journey

Table of Contents
In the zk-rollups world, whn StarkWare's game-changing release, Starknet Alpha, has captivated developers and enthusiasts alike. This article dives into the evolution of onchain gaming on Starknet, exploring the innovative technologies that have propelled it into the forefront of decentralized gaming.

I. Onchain Gaming on Starknet

Overview of Starknet's Alpha Release
In November 2021, StarkWare unveiled a groundbreaking achievement in the blockchain space—Starknet Alpha. This release introduced a Validity Rollup, delivering Ethereum-grade security, alongside a revolutionary non-EVM compatible language known as Cairo. The fusion of these elements presented developers with a unique puzzle, enticing them to explore the uncharted territory of decentralized applications and onchain gaming.
Starknet Alpha was more than just an upgrade; it was an open invitation for developers to push the boundaries of what was deemed possible within the Ethereum ecosystem. This release sparked a wave of excitement and creativity as early adopters, including notable developers like Perama and Guiltygyoza, immersed themselves in the complexities of the Cairo language. These pioneers not only embraced the challenge but also embarked on a journey that would redefine the landscape of onchain gaming.
Early Developers and Innovations in the Ethereum Ecosystem
The Ethereum ecosystem, already known for its vibrant and innovative community, witnessed a surge in creativity as developers delved into the possibilities offered by Starknet Alpha. Early adopters, armed with a vision to overcome the limitations of traditional Solidity-based development, started crafting guides and experimenting with cutting-edge technologies such as physics simulations and neural networks.
In this era of exploration, the Ethereum ecosystem saw the emergence of innovators like Perama and Guiltygyoza, who became torchbearers for the integration of Cairo into the onchain gaming narrative. Their experiments not only showcased the adaptability of the new language but also laid the foundation for what would soon become a thriving community of Starknet game developers.
As the Starknet community burgeoned with diverse talents and visions, it became evident that Starknet was not merely a platform; it was a catalyst for a revolution in onchain gaming—an evolution that continues to shape the future of how games are played, assets are owned, and communities are built. The journey had just begun, and Starknet was at the forefront, beckoning developers to join the expedition into the uncharted territories of onchain gaming and decentralized autonomy.

II. Key Technologies for Onchain Games

Dojo Gaming Engine: Transparency, Provability, and Scalability
The heartbeat of Starknet's success in onchain gaming resonates with the revolutionary Dojo Gaming Engine. Positioned as the world's first provable onchain game engine, Dojo serves as a robust software framework that empowers Starknet game developers to create games with unparalleled transparency, provability, and scalability.
Imagine a gaming engine that not only provides developers with the essential building blocks—physics, graphics, and game mechanics—but also ensures that every move and interaction within the game is transparent and provable on the blockchain. This is the essence of the Dojo Gaming Engine.
Born out of a collaborative effort between the Cartridge and Realms teams, Dojo is the result of a year-long journey that began in early 2021. It embodies the collective insights gained during this exploration, where these early innovators sought the most efficient ways to construct games on Starknet.
At its core, Dojo incorporates the Entity Component System (ECS) framework—an architectural marvel for blockchain-based game development. This framework promotes modularity, efficiency, and flexibility, allowing developers to craft intricate gaming experiences without compromising on performance. But Dojo goes beyond the ECS framework, offering additional tools such as Sozo, Torii, and Katana to further empower game developers.
Sozo: Migration Planner for Autonomous Worlds
Sozo, a critical component of the Dojo Gaming Engine, functions as a migration planner, streamlining the complex task of deploying autonomous worlds onchain. With a simple sozo migrate command, developers can breathe life into their game worlds on the blockchain. Beyond its deployment functionality, Sozo introduces a key philosophy of autonomous games—open collaboration. Any participant in the ecosystem can propose new components to the onchain gaming universe using a simple CLI tool, fostering an environment where worlds can outlive their creators, evolving with the contributions of a diverse community.
Katana: Local Game Development Sequencer
Katana, another blade in the arsenal of Dojo, is a sequencer designed for local game development. Running this sequencer on Starknet catalyzes a significant leap in productivity. Katana enables developers to harness the RPC methods offered by Starknet on the mainnet, providing a sandbox environment where they can test various parameters such as block time, base fee per transaction, and more. The simplicity of running the node, once configured, is encapsulated in a straightforward katana command on the CLI, putting the power of testing and development directly in the hands of the creators.
source: Starkware.co
Torii: Indexing Layer for Game Development Clients
Completing the trifecta of Dojo's additional tools is Torii—an indexing layer designed to seamlessly connect the onchain infrastructure with popular game development clients like Unity or Unreal Engine. Based on the source code of the developed game, Torii simplifies the process of indexing game-specific events, exposing a GraphQL API for effortless queries. With a mere torii command, developers unlock a GraphQL API running on http://localhost:8080, ready to be queried and integrated into the game development workflow.
Madara Sequencer and Appchains: Customizable Starknet Instances
While the Dojo Gaming Engine takes center stage, the Madara Sequencer and Appchains step into the spotlight to provide game developers with unparalleled customization and efficiency. The Madara Sequencer, a high-performance Starknet sequencer, is constructed using the proven Substrate framework embraced by the Polkadot ecosystem.
Appchains: Tailoring Starknet Instances
Appchains, the brainchild of the Madara Sequencer, represent private instances of Starknet that offer developers meticulous control over virtually every parameter within a network. This control extends to sequencing, data availability, settlement layers, governance, and more. The significance of this customization becomes apparent when considering different game dynamics and user experiences.
For instance, developers can opt for a First-Come-First-Served sequencing mechanism to prioritize the speed of player transactions. Conversely, a Priority Gas Auction (PGA) sequencing approach could be implemented, encouraging users to bid higher for quicker block inclusion, aligning with a profit-driven perspective. The flexibility extends to various parameters such as block times, settlement frequency on L2, and utilization of non-native data availability solutions. The launch of games on a Starknet appchain thus becomes a strategic choice, offering developers the power to mold and fine-tune their games to perfection.
The synergy of the Dojo Gaming Engine and the Madara Sequencer with Appchains lays the foundation for Starknet as the premier platform for onchain gaming. It's not just a platform; it's a dynamic ecosystem that empowers developers to shape the future of decentralized gaming. The narrative of Starknet unfolds as a canvas for innovation, where the brushstrokes of Dojo and the precision of Madara weave a tapestry of possibilities for game developers worldwide.

III. Exploring Dojo Gaming Engine Features

Sozo: Migration Planner for Autonomous Worlds
At the heart of the Dojo Gaming Engine, Sozo emerges as a pivotal tool, revolutionizing the process of deploying autonomous worlds on the blockchain. Think of Sozo as the cartographer guiding game developers through the uncharted realms of onchain gaming. With a simple sozo migrate command, developers seamlessly transition their game worlds to the blockchain, where they can flourish autonomously.
Yet, Sozo is not merely a migration facilitator; it embodies a democratic approach to game development. The tool empowers any participant within the ecosystem to propose new components to the onchain gaming universe. Through a user-friendly CLI tool, contributors can extend the gaming ecosystem with their own assets, levels, characters, and more. Sozo thus embodies the philosophy of autonomous games—where worlds transcend the visions of their creators and evolve organically with the diverse contributions of a collaborative community.
Katana: Local Game Development Sequencer
In the realm of local game development, Katana emerges as the virtuoso's blade, a sequencer designed to elevate the craft of Starknet game developers. Running Katana on Starknet heralds a paradigm shift in productivity, offering developers an immersive environment to refine their creations. Through Katana, developers gain access to Starknet's RPC methods on the mainnet, allowing them to test and iterate with various parameters.
Configuring and running the node is as straightforward as executing the katana command on the command line interface (CLI). This simplicity belies the immense power it places in the hands of developers, enabling them to fine-tune block times, transaction fees, and other critical parameters. Katana, like its namesake, becomes the weapon of choice for developers, facilitating the exploration and honing of their creative vision within the Starknet ecosystem.
Torii: Indexing Layer for Game Development Clients
Completing the triad of Dojo's additional tools is Torii, an indexing layer that serves as the bridge between onchain infrastructure and popular game development clients such as Unity or Unreal Engine. Torii, like a skilled archer hitting the mark, simplifies the indexing of game-specific events, providing developers with a GraphQL API for seamless integration into their development workflow.
With just a simple torii command, developers unlock a GraphQL API running on http://localhost:8080, ready to be queried and harnessed. Torii transforms the complex task of connecting onchain gaming data with external game development clients into a streamlined process. Game developers can focus on their creative endeavors, knowing that Torii acts as a reliable guide, ensuring that the onchain and offchain elements of their games seamlessly converge.
The trio of Sozo, Katana, and Torii encapsulates the essence of the Dojo Gaming Engine—a comprehensive toolkit that empowers developers to navigate the complexities of onchain gaming effortlessly. Whether migrating worlds, refining game mechanics, or integrating external game development clients, Dojo stands as a testament to the collaborative spirit of the Starknet community, where innovation thrives, and the boundaries of onchain gaming are continually pushed.

IV. Future of Onchain Gaming: Shaping Autonomous Worlds

As onchain gaming on Starknet continues to evolve, it brings forth a vision that extends beyond the present, shaping the trajectory of autonomous worlds within the blockchain space. Starknet, with its innovative technologies, opens doors to a future where the delicate balance between privacy and transparency is a paramount consideration.
Offchain Provable Games: Balancing Privacy and Transparency
In envisioning the future, Starknet propels the concept of offchain provable games, introducing a delicate equilibrium between user privacy and the necessity for transparent gameplay. The realization dawns that not every action a player takes must be broadcasted on the blockchain in real-time. Instead, the offchain provable games paradigm allows for the generation of proofs on the client side, with only the proof—a succinct confirmation that an action took place—submitted onchain.
This approach is particularly significant for games where user actions should remain private until the state of the game undergoes a significant change. Consider multiplayer games or scenarios involving auctions and voting systems; here, the infrastructure of offchain provable games becomes a crucial tool. By obscuring the user's input data until pivotal moments—such as completing a level or discovering a rare asset—players can engage in a hybrid gaming experience. It's a narrative where the proof is published sparingly, making each revelation within the game a momentous event.
Client-side proving also opens avenues for unique gaming models, allowing developers to experiment with hybrid approaches that blend the thrill of transparency with the allure of strategic secrecy. This innovation extends beyond the realm of traditional gaming, offering potential applications in auctions and voting systems, where protecting user input data is of paramount importance.
Case Study: Shoshin - Autonomous World in Action
To bring the concept of autonomous worlds to life, a compelling case study is Shoshin—a testament to the possibilities Starknet unlocks in onchain gaming. In the world of Shoshin, users take the reins of their gaming experience, programming their characters and dictating the actions they will take. Once this programmed logic is in place, players can pit their characters against others in a battle of wits and strategy.
What makes Shoshin truly remarkable is its execution of in-game mechanics within the Cairo virtual machine. This approach not only ensures the provability and transparency of every action but also places the creative control firmly in the hands of the players. Shoshin transcends traditional gaming narratives by allowing users to shape the destiny of their characters within the confines of the onchain world.
Shoshin's recent in-person tournament in Palo Alto for pioneer gamers underscores the real-world implications of Starknet's influence on the gaming landscape. To experience Shoshin is to delve into an autonomous world where the boundaries between creator and player blur, and the outcome is determined by the intricacies of programmed logic and strategic thinking.
Conclusion
In conclusion, Starknet is not merely refining the current state of gaming; it is scripting a narrative that will shape the future. The synergy of technologies like the Dojo Gaming Engine, Madara Sequencer, and the exploration of offchain provable games catapults Starknet into a realm where autonomy and innovation coalesce.
The likes of eth_worm, Guiltygyoza, and other pioneers are trailblazing the field of onchain gaming and technical innovation. Teams such as Realms, Topology, Influence, Briq, Cartridge, and Madara are not just building on Starknet—they are shaping autonomous worlds.

About Orochi Network

Orochi Network is a cutting-edge zkOS (An operating system based on zero-knowledge proof) designed to tackle the challenges of computation limitation, data correctness, and data availability in the Web3 industry. With the well-rounded solutions for Web3 Applications, Orochi Network omits the current performance-related barriers and makes ways for more comprehensive dApps hence, becoming the backbone of Web3's infrastructure landscape.
Categories
Event Recap
3
Misc
56
Monthly Report
1
Oracles
4
Orand
3
Orosign
19
Partnership
20
Verifiable Random Function
9
Web3
86
Zero-Knowledge Proofs
35
Top Posts
Tag
Orand
NFT
Misc
Web3
Partnership Announcement
Layer 2
Event Recap
Immutable Ledger
Oracles
Verifiable Random Function
Zero-Knowledge Proofs
Multisignature Wallet

Orosign Wallet

Manage all digital assets safely and securely from your mobile devices

zkDatabaseDownload Orosign Wallet
Coming soon
Orochi

zkOS for Web3

© 2021 Orochi