Building your game logic onchain
Set up your system and install the BOLT CLI.
Explore the ECS pattern for your onchain game.
To build a game or an application onchain, you’ll need to familiarize with Solana programs (smart contracts). You might be already familiar with Anchor, one of the most used toolkit for writing smart contract on Solana.
BOLT is a framework that extends Anchor functionalities to include a standardized way to model your game’s logic using an Entity Components Systems (ECS) pattern.
The ECS is a modular pattern that decouples logic from state and facilitates code reusability, extensibility and performance improvement for large-scale projects. The Solana Virtual Machine (SVM) also makes use of a paradigm similar to an ECS given that state (accounts) and the logic (programs) are natively separated.
In the Entity Component System:
While BOLT supports all the functionalities of Anchor, adopting the ECS pattern is helpful if you want to reuse existing components/system or enable simpler mods and extension for your game.