Create a System
Systems contain the logic that processes and manipulates entities based on their components. A system will typically operate on all entities that have a specific set of components. For example, a “Movement” system might update the position of a “Position” component
Create a movement system with with
which will add a new component to your workspace:
In this simple example we have created an entity Player that holds a Position component with x,y,z coordinates. We can execute the movement system to change its state.
For a more sophisticated movement dynamic, let’s define a Velocity component:
Someone might want to introduce a new power-up for faster movement. They could do this simply by adding a new system that acts on the Position component using Velocity
This new system takes as inputs the Position and Velocity components, and defines the logic of the power-up. There is no notion of Solana accounts or CPI - the proxy World program is taking care of everything.
Was this page helpful?