diff --git a/_custom/node.html b/_custom/node.html new file mode 100644 index 0000000..d540d41 --- /dev/null +++ b/_custom/node.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} + +{% block content %} + + + + + + + + + + + + + + + + + + + +
{{ page.title }}
Type {{ page.meta.type }}
Category {{page.meta.category }}
+ {{ page.content }} +{% endblock %} diff --git a/docs/assets/css/custom.css b/docs/assets/css/custom.css index 263c967..977d81d 100644 --- a/docs/assets/css/custom.css +++ b/docs/assets/css/custom.css @@ -72,6 +72,7 @@ --hr-color: #e1e4e5; --table-row-odd-background-color: #f3f6f6; + --table-background-color: #d4d4d4; --code-background-color: #e9eae5; --code-border-color: #e1e4e5; --code-literal-color: #c03e41; @@ -203,6 +204,7 @@ --hr-color: #555; --table-row-odd-background-color: #3b3e41; + --table-background-color: #23272b; --code-background-color: #22252d; --code-border-color: #505356; --code-literal-color: #d68f8f; @@ -799,12 +801,6 @@ html.writer-html5 .rst-content table.docutils th { vertical-align: middle; } -.wy-table-odd td, -.wy-table-striped tr:nth-child(2n-1) td, -.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td { - background-color: var(--table-row-odd-background-color); -} - /* Override table no-wrap */ /* The first column cells are not verbose, no need to wrap them */ .wy-table-responsive table td:not(:nth-child(1)), @@ -1857,3 +1853,46 @@ p + .classref-constant { border: 0px solid #7fbbe3; background: var(--role-button-background-color); } + + +.wy-table-responsive:has(> .infobox) { + width: 22em; + margin-left: 1em; + padding: 0.2em; + float: right; + clear: right; + margin-left: auto; +} + +.infobox { + width: 100%; + display: table; + border: 1px solid; +} + +.rst-content .section .docutils { + display: table; +} + +.rst-content table.docutils td, .rst-content table.field-list td, .wy-table td { + background-color: var(--table-row-odd-background-color); +} + +.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td, .wy-table-backed, .wy-table-odd td, .wy-table-striped tr:nth-child(2n-1) td { + background-color: var(--table-row-odd-background-color); +} + +table { + border: 1px solid var(--code-background-color) !important; + border-radius: 6px; + border-collapse: separate; +} + +td, th { + border: 1px solid var(--code-background-color) !important; +} + + +th { + background-color: var(--table-background-color); +} diff --git a/docs/nodes/floor_walker.md b/docs/nodes/floor_walker.md new file mode 100644 index 0000000..6950875 --- /dev/null +++ b/docs/nodes/floor_walker.md @@ -0,0 +1,17 @@ +--- +template: node.html +type: Sample +category: Sampling > Generation +--- + +# FloorWalker + +## Description + +Generates a floor by using **walkers**, which move around and set cells where they walk to `1.0`, while changing direction and/or spawning new walkers. + +The algorithm starts from the `starting_point`. It spawns a `GaeaNodeWalker` with that position, and that walker starts moving randomly. Depending on the chances configured, every 'turn' it has a chance to spawn a new walker, to change its direction, to be destroyed, to place cells in a bigger area, etc. All cells where it walks will be set to a value of `1.0`.
+When a size of `max_cells` is reached, the generation will stop. + +This is how [Nuclear Throne](https://nuclearthrone.com) does its generation, for example, as seen [here](https://web.archive.org/web/20151009004931/https://www.vlambeer.com/2013/04/02/random-level-generation-in-wasteland-kings/). + diff --git a/docs/nodes/index.md b/docs/nodes/index.md new file mode 100644 index 0000000..4bfc251 --- /dev/null +++ b/docs/nodes/index.md @@ -0,0 +1,4 @@ +--- +weight: 90 +empty: true +--- diff --git a/mkdocs.yml b/mkdocs.yml index f78c5b5..52674be 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,6 +3,7 @@ theme: name: readthedocs highlightjs: true logo: assets/banner.svg + custom_dir: _custom/ site_favicon: assets/logo.svg plugins: - search