Documentation Index
Fetch the complete documentation index at: https://world.dev/llms.txt
Use this file to discover all available pages before exploring further.
Components (the “C” in ECS) are the data attributes attached to entities. By convention, components in
Cardinal are defined in the component directory.
package component
type PlayerTag struct {
Nickname string `json:"nickname"`
}
func (PlayerTag) Name() string {
return "playertag"
}
There’s no need to register components manually. As long as your component is accessed by one or more systems,
it will be registered automatically.
Next Steps
Now that you’ve defined your components, you can start writing systems. Click next below to learn more.