-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add mdbook with outline and introduction (#261)
Currently, we only have documentation in the form of code examples and `docs.rs`. While the docs.rs api reference is pretty comprehensive, it is not a great platform for providing higher-level explanation documentation, or tutorials, or guides. Some of this does exist in the docs.rs docs, but it doesn't really belong there and is difficult to discover. This PR initializes an mdbook in this repository where these other types of documentation can reside. I've provided an introduction and an outline. I explain the goals of the book in its introduction. CI supporting this book will be added in follow-up PRs.
- Loading branch information
Showing
6 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
book | ||
doctest_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[book] | ||
authors = ["Trevor Lovell"] | ||
language = "en" | ||
multilingual = false | ||
src = "src" | ||
title = "bevy_ecs_ldtk Book" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Introduction | ||
|
||
## `bevy_ecs_ldtk` | ||
|
||
[`bevy_ecs_ldtk`](https://crates.io/crates/bevy_ecs_ldtk) is an ECS-friendly [LDtk](https://ldtk.io/) plugin for [Bevy](https://bevyengine.org/). | ||
It allows you to use LDtk projects as an asset, spawn levels, and insert bevy components/bundles on LDtk entities/tiles. | ||
This plugin is ECS-friendly, partly for its internal usage of ECS that provides extra functionality to users, and partly for its usage of [`bevy_ecs_tilemap`](https://crates.io/crates/bevy_ecs_tilemap) for rendering tilemaps. | ||
This is all behind an ergonomic API, providing low-boilerplate solutions to common use cases. | ||
For less common use cases, strategies that leverage this plugin's ECS constructs are also available. | ||
|
||
## This book | ||
This book is a work in progress, but aims to provide the following pieces of documentation: | ||
- tutorials: lessons detailing the creation of simple games from start to finish | ||
- explanation: clarification of concepts and strategies employed by `bevy_ecs_ldtk`, including details about how it works and why | ||
- how-to guides: recommended solutions to common problems, as well as migration guides | ||
|
||
This book is not an API reference. | ||
For that, please refer to `bevy_ecs_ldtk`'s documentation on [docs.rs](https://docs.rs/bevy_ecs_ldtk/). | ||
|
||
While this book aims to be comprehensive, it should also be easy to maintain and up-to-date. | ||
This is why, in consort with the API reference, documentation for `bevy_ecs_ldtk` aims to satisfy [The Grand Unified Theory of Documentation](https://documentation.divio.com/). | ||
Furthermore, code snippets in this book are automatically tested by `bevy_ecs_ldtk`'s CI wherever possible with the help of [mdBook-Keeper](https://github.com/tfpk/mdbook-keeper/). | ||
This should help inform maintainers when changes to the plugin have made documentation out-of-date. | ||
Deployment of this book to github pages is also performed by `bevy_ecs_ldtk`'s CI automatically on new releases. | ||
|
||
Splitting the documentation up this way means that this book is not necessarily meant to be read in order. | ||
Some chapters are intended to be read while working on your own project, while others are meant to be more like studying material. | ||
The following chapters are good jumping-off points for beginners: | ||
- [*Getting Started* tutorial](getting-started.md) | ||
- [*Game Logic Integration* explanation]() | ||
|
||
## Other resources | ||
This book is not suitable documentation for bevy or LDtk. | ||
Some resources for learning Bevy include those listed on the [Bevy website](https://bevyengine.org/learn), as well as the unofficial [Bevy Cheat Book](https://bevy-cheatbook.github.io/). | ||
LDtk also provides documentation on [its website](https://ldtk.io/docs/). | ||
|
||
`bevy_ecs_ldtk`'s [source code](https://github.com/Trouv/bevy_ecs_ldtk) is available on github. | ||
This repository also contains [cargo examples](https://github.com/Trouv/bevy_ecs_ldtk/tree/v0.8.0/examples), which can be run after cloning the repository using `$ cargo run --example example-name`. <!-- x-release-please-version --> | ||
These examples may be difficult to follow on their own, and many of their strategies are described in this book. | ||
When viewing these examples, be careful to checkout the correct git tag for the version of the plugin you are using. | ||
Some changes may have been made to the plugin or to the examples on the `main` branch that are not released yet, and trying to apply these to the version of the plugin you are using can lead to errors. | ||
|
||
## License | ||
The pages of this book fall under the same license as the rest of the `bevy_ecs_ldtk` repository. | ||
I.e., this book is dual-licensed under [MIT](http://opensource.org/licenses/MIT) and [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0) at your option. | ||
The plain text of this license is available in the `bevy_ecs_ldtk` repository's [LICENSE file](https://github.com/Trouv/bevy_ecs_ldtk/blob/main/LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Summary | ||
|
||
[Introduction](README.md) | ||
# Tutorials | ||
- [Getting Started]() | ||
- [Sokoban]() | ||
- [Platformer]() | ||
# Explanation | ||
- [Game Logic Integration]() | ||
- [Hierarchy of the World]() | ||
- [Level Selection]() | ||
- [Plugin Schedule]() | ||
- [Asset Model]() | ||
# How-To Guides | ||
- [Register Bundles for Intgrid Tiles and LDtk Entities]() | ||
- [Process Entities Further with Blueprints]() | ||
- [Combine Tiles into Larger Entities]() | ||
- [Create Bevy Relations from LDtk Entity References]() | ||
- [Respawn Levels and Worlds]() | ||
- [Animate Tiles]() | ||
- [Camera Logic]() | ||
- [Implement Fit-Inside Camera]() | ||
- [Implement Fit-Around Camera]() | ||
- [Implement Parallax]() | ||
- [Retrieve Field Instance Data]() | ||
- [Retrieve Loaded Level Data]() | ||
- [Compile to WASM]() | ||
- [Compile Headless]() | ||
- [Migration Guides]() | ||
- [Migrate from 0.8 to 0.9]() | ||
--- | ||
[API Reference](api-reference.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<meta http-equiv="Refresh" content="0; url='https://docs.rs/bevy_ecs_ldtk/'" /> |