examples

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 0 Imported by: 0

README

Arche examples

This folder contains examples for the Arche Entity Component System.

Running the examples

  1. Clone the repository
git clone https://github.com/mlange-42/arche
cd arche
  1. Run examples from the project's root directory like this:
go run ./examples/<example>

Documentation

Overview

Package examples contains examples for Arche.

See the top level module github.com/mlange-42/arche for an overview.

Directories

Path Synopsis
Demonstrates the core API that uses component IDs for access.
Demonstrates the core API that uses component IDs for access.
Demonstrates batch-creation, manipulation and removal of entities.
Demonstrates batch-creation, manipulation and removal of entities.
Demonstrates the use of a EntityEvent listener, notifying on changes to the component composition of entities.
Demonstrates the use of a EntityEvent listener, notifying on changes to the component composition of entities.
Demonstrates the logic filter API, which provides additional query flexibility on top of the core API.
Demonstrates the logic filter API, which provides additional query flexibility on top of the core API.
Demonstrates the generic API, which provides type-safety and convenience over the ID-based core API.
Demonstrates the generic API, which provides type-safety and convenience over the ID-based core API.
Demonstrates how to create, remove or alter entities, despite the World is locked during query iteration.
Demonstrates how to create, remove or alter entities, despite the World is locked during query iteration.
Demonstrates outer parallelism by running multiple simulations concurrently.
Demonstrates outer parallelism by running multiple simulations concurrently.
Demonstrates generic access to arbitrary/random entities.
Demonstrates generic access to arbitrary/random entities.
Demonstrates random sampling of a fixed number of entities from a query using Query.Step().
Demonstrates random sampling of a fixed number of entities from a query using Query.Step().
The minimal example from the README using generic access.
The minimal example from the README using generic access.
Demonstrates entity relations
Demonstrates entity relations
Demonstrates the use of "Resources".
Demonstrates the use of "Resources".
Demonstrates how to implement systems.
Demonstrates how to implement systems.
Demonstrates using world and archetype statistics.
Demonstrates using world and archetype statistics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL