Skip to content
Draft
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
25 changes: 25 additions & 0 deletions _custom/node.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends "base.html" %}

{% block content %}
<table class="infobox">
<theader>
<tr>
<th colspan=2> {{ page.title }} </th>
</tr>
</theader>
<tbody>
<tr>
<td colspan=2> <img src="../../assets/nodes/{{ page.meta.image if page.meta.image else page.title }}.png"> </td>
</tr>
<tr>
<th> Type </th>
<td> <img src="../../assets/slots/{{ page.meta.type }}.svg"> {{ page.meta.type }} </td>
</tr>
<tr>
<th> Category </th>
<td> {{page.meta.category }} </td>
</tr>
</tbody>
</table>
{{ page.content }}
{% endblock %}
51 changes: 45 additions & 6 deletions docs/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)),
Expand Down Expand Up @@ -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);
}
17 changes: 17 additions & 0 deletions docs/nodes/floor_walker.md
Original file line number Diff line number Diff line change
@@ -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`.<br>
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/).

4 changes: 4 additions & 0 deletions docs/nodes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
weight: 90
empty: true
---
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ theme:
name: readthedocs
highlightjs: true
logo: assets/banner.svg
custom_dir: _custom/
site_favicon: assets/logo.svg
plugins:
- search
Expand Down