Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arche user manual, 5/x #385

Merged
merged 9 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
- name: Run benchmark tables
run: |
go run ./benchmark/table | tee docs/content/background/_benchmarks.md
- name: Copy changelog
run: |
cp ./CHANGELOG.md ./docs/content/background/_changelog.md
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
Expand Down
81 changes: 0 additions & 81 deletions ARCHITECTURE.md

This file was deleted.

78 changes: 0 additions & 78 deletions BENCHMARKS.md

This file was deleted.

4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Changelog

## [[unpublished]](https://github.com/mlange-42/arche/compare/v0.10.1...main)

### Features
Expand All @@ -10,7 +8,7 @@

### Documentation

* Adds a dedicated Arche [User Guide](https://mlange-42.github.io/arche/) web site (#380, #382, #383, #384)
* Adds a dedicated Arche [User Guide](https://mlange-42.github.io/arche/) web site (#380, #382, #383, #384, #385)
* Adds [BENCHMARKS.md](https://github.com/mlange-42/arche/blob/main/BENCHMARKS.md) for a tabular overview of the runtime cost of typical *Arche* ECS operations (#367, #372)
* Link benchmarking code in `README.md` and benchmarking tables (#375)
* Documents build tags `tiny` and `debug` in package docs of `ecs` (#377)
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
[![Arche (logo)](https://user-images.githubusercontent.com/44003176/236701164-28178d13-7e52-4449-baa4-41b764183cbd.png)](https://github.com/mlange-42/arche)
[![Test status](https://img.shields.io/github/actions/workflow/status/mlange-42/arche/tests.yml?branch=main&label=Tests&logo=github)](https://github.com/mlange-42/arche/actions/workflows/tests.yml)
[![Coverage Status](https://badge.coveralls.io/repos/github/mlange-42/arche/badge.svg?branch=main)](https://badge.coveralls.io/github/mlange-42/arche?branch=main)
[![Coverage Status](https://img.shields.io/coverallsCoverage/github/mlange-42/arche?logo=coveralls)](https://badge.coveralls.io/github/mlange-42/arche?branch=main)
[![Go Report Card](https://goreportcard.com/badge/github.com/mlange-42/arche)](https://goreportcard.com/report/github.com/mlange-42/arche)
[![Go Reference](https://pkg.go.dev/badge/github.com/mlange-42/arche.svg)](https://pkg.go.dev/github.com/mlange-42/arche)
[![User Guide](https://img.shields.io/badge/user_guide-%23007D9C?logo=go&logoColor=white&labelColor=gray)](https://mlange-42.github.io/arche/)
[![Go Reference](https://img.shields.io/badge/reference-%23007D9C?logo=go&logoColor=white&labelColor=gray)](https://pkg.go.dev/github.com/mlange-42/arche)
[![GitHub](https://img.shields.io/badge/github-repo-blue?logo=github)](https://github.com/mlange-42/arche)
[![DOI:10.5281/zenodo.7656484](https://zenodo.org/badge/DOI/10.5281/zenodo.7656484.svg)](https://doi.org/10.5281/zenodo.7656484)
[![MIT license](https://img.shields.io/github/license/mlange-42/arche)](https://github.com/mlange-42/arche/blob/main/LICENSE)
[![DOI:10.5281/zenodo.7656484](https://img.shields.io/badge/10.5281%2Fzenodo.7656484-blue?label=doi)](https://doi.org/10.5281/zenodo.7656484)
[![MIT license](https://img.shields.io/badge/MIT-brightgreen?label=license)](https://github.com/mlange-42/arche/blob/main/LICENSE)

*Arche* is an [archetype](https://github.com/mlange-42/arche/blob/main/ARCHITECTURE.md)-based [Entity Component System](https://en.wikipedia.org/wiki/Entity_component_system) for [Go](https://go.dev/).
*Arche* is an [archetype](https://mlange-42.github.io/arche/background/architecture/)-based [Entity Component System](https://en.wikipedia.org/wiki/Entity_component_system) for [Go](https://go.dev/).

*Arche* is designed for the use in simulation models of the
[Department of Ecological Modelling](https://www.ufz.de/index.php?en=34213) at the
Expand All @@ -24,7 +25,7 @@

* Simple [core API](https://pkg.go.dev/github.com/mlange-42/arche/ecs). See the [API docs](https://pkg.go.dev/github.com/mlange-42/arche).
* Optional logic [filter](https://pkg.go.dev/github.com/mlange-42/arche/filter) and type-safe [generic](https://pkg.go.dev/github.com/mlange-42/arche/generic) API.
* Entity relations as first-class feature. See [Architecture](https://github.com/mlange-42/arche/blob/main/ARCHITECTURE.md#entity-relations).
* Entity relations as first-class feature. See the [User Guide](https://mlange-42.github.io/arche/user-guide/relations/).
* World serialization and deserialization with [arche-serde](https://github.com/mlange-42/arche-serde).
* No systems. Just queries. Use your own structure (or the [Tools](#tools)).
* No dependencies. Except for unit tests ([100% coverage](https://coveralls.io/github/mlange-42/arche)).
Expand All @@ -42,9 +43,8 @@ go get github.com/mlange-42/arche

Here is the classical Position/Velocity example that every ECS shows in the docs.
It uses the type-safe [generic](https://pkg.go.dev/github.com/mlange-42/arche/generic) API.
For a full-featured wrapper with systems, scheduling and more, see [arche-model](https://github.com/mlange-42/arche-model).

See the [API docs](https://pkg.go.dev/github.com/mlange-42/arche) and
See the [User Guide](https://mlange-42.github.io/arche/), [API docs](https://pkg.go.dev/github.com/mlange-42/arche) and
[examples](https://github.com/mlange-42/arche/tree/main/_examples) for details.
For more complex examples, see [arche-demo](https://github.com/mlange-42/arche-demo).

Expand Down Expand Up @@ -156,14 +156,14 @@ This may not seem idiomatic for Go.
However, explicit error handling in performance hotspots is not an option.
Neither is silent failure, given the scientific background.

### Other limitations
### Limitations

* The number of component types per `World` is limited to 256. This is mainly a performance decision.
* The number of entities alive at any one time is limited to just under 5 billion (`uint32` ID).

## Benchmarks

A tabular overview of the runtime cost of typical *Arche* ECS operations is provided in [BENCHMARKS.md](https://github.com/mlange-42/arche/blob/main/BENCHMARKS.md).
A tabular overview of the runtime cost of typical *Arche* ECS operations is provided under [benchmarks](https://mlange-42.github.io/arche/background/benchmarks/) in the Arche's [User Guide](https://mlange-42.github.io/arche/).

See also the latest [Benchmarks CI run](https://github.com/mlange-42/arche/actions/workflows/benchmarks.yml).

Expand Down
4 changes: 4 additions & 0 deletions _examples/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// Package examples contains examples for Arche.
//
// See the top level module [github.com/mlange-42/arche] for an overview.
//
// 🕮 Also read the Arche's [User Guide]!
//
// [User Guide]: https://mlange-42.github.io/arche/
package examples
4 changes: 4 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
// - Advanced filters -- [github.com/mlange-42/arche/filter]
// - Event listeners -- [github.com/mlange-42/arche/listener]
// - Usage examples -- [github.com/mlange-42/arche/_examples]
//
// 🕮 Also read the Arche's [User Guide]!
//
// [User Guide]: https://mlange-42.github.io/arche/
package arche
17 changes: 10 additions & 7 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,29 @@ no_heading = true
<img alt="Test status" src="https://img.shields.io/github/actions/workflow/status/mlange-42/arche/tests.yml?branch=main&label=Tests&logo=github"></img></a>

<a href="https://badge.coveralls.io/github/mlange-42/arche?branch=main" style="display:inline-block">
<img alt="Coverage Status" src="https://badge.coveralls.io/repos/github/mlange-42/arche/badge.svg?branch=main"></img></a>
<img alt="Coverage Status" src="https://img.shields.io/coverallsCoverage/github/mlange-42/arche?logo=coveralls"></img></a>

<a href="https://goreportcard.com/report/github.com/mlange-42/arche" style="display:inline-block">
<img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/mlange-42/arche"></img></a>

<a href="https://mlange-42.github.io/arche/" style="display:inline-block">
<img alt="User Guide" src="https://img.shields.io/badge/user_guide-%23007D9C?logo=go&logoColor=white&labelColor=gray"></img></a>

<a href="https://pkg.go.dev/github.com/mlange-42/arche" style="display:inline-block">
<img alt="Go Reference" src="https://pkg.go.dev/badge/github.com/mlange-42/arche.svg"></img></a>
<img alt="Go Reference" src="https://img.shields.io/badge/reference-%23007D9C?logo=go&logoColor=white&labelColor=gray"></img></a>

<a href="https://github.com/mlange-42/arche" style="display:inline-block">
<img alt="GitHub" src="https://img.shields.io/badge/github-repo-blue?logo=github"></img></a>

<a href="https://doi.org/10.5281/zenodo.7656484" style="display:inline-block">
<img alt="DOI:10.5281/zenodo.7656484" src="https://zenodo.org/badge/DOI/10.5281/zenodo.7656484.svg"></img></a>
<img alt="DOI:10.5281/zenodo.7656484" src="https://img.shields.io/badge/10.5281%2Fzenodo.7656484-blue?label=doi"></img></a>

<a href="https://github.com/mlange-42/arche/blob/main/LICENSE" style="display:inline-block">
<img alt="MIT license" src="https://img.shields.io/github/license/mlange-42/arche"></img></a>
<img alt="MIT license" src="https://img.shields.io/badge/MIT-brightgreen?label=license"></img></a>
</div>
{{< /html >}}

*Arche* is an [archetype](https://github.com/mlange-42/arche/blob/main/ARCHITECTURE.md)-based [Entity Component System](https://en.wikipedia.org/wiki/Entity_component_system) for [Go](https://go.dev/).
*Arche* is an [archetype](/background/architecture)-based [Entity Component System](https://en.wikipedia.org/wiki/Entity_component_system) for [Go](https://go.dev/).

*Arche* is designed for the use in simulation models of the
[Department of Ecological Modelling](https://www.ufz.de/index.php?en=34213) at the
Expand All @@ -40,13 +43,13 @@ no_heading = true

- Simple core API. See the [API docs](https://pkg.go.dev/github.com/mlange-42/arche).
- Optional logic [filter](https://pkg.go.dev/github.com/mlange-42/arche/filter) and type-safe [generic](https://pkg.go.dev/github.com/mlange-42/arche/generic) API.
- Entity relations as first-class feature. See [Architecture](https://github.com/mlange-42/arche/blob/main/ARCHITECTURE.md).
- Entity relations as first-class feature. See the [User Guide](https://mlange-42.github.io/arche/user-guide/relations/).
- World serialization and deserialization with [arche-serde](https://github.com/mlange-42/arche-serde).
- No systems. Just queries. Use your own structure (or the [Tools](https://github.com/mlange-42/arche#tools)).
- No dependencies. Except for unit tests ([100% coverage](https://coveralls.io/github/mlange-42/arche)).
- Probably the fastest Go ECS out there. See the [Benchmarks](https://github.com/mlange-42/arche#benchmarks).

For more information, see the GitHub [repository](https://github.com/mlange-42/arche) and [API docs](https://pkg.go.dev/github.com/mlange-42/arche).
For more information, see the [GitHub repository](https://github.com/mlange-42/arche) and [API docs](https://pkg.go.dev/github.com/mlange-42/arche).

## Cite as

Expand Down
1 change: 1 addition & 0 deletions docs/content/background/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/_benchmarks.md
/_changelog.md
Loading
Loading