tversteeg / siege

:bow_and_arrow: Procedural siege engine generator

Home Page:https://tversteeg.nl/siege

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

siege

Procedurally generate siege engines.

CI Version Rust Documentation License

This library allows you to procedurally generate new siege engines using a template. This template can be defined in code or from as an ASCII string.

The ascii example can be used to showcase this:

example.ascii contains the following text:

+-------+
|.......|
|.......|
|.......|
|.......+----+
|.......|
|.......|
|.......|
o---o---o

When we run the example from the command line:

cargo run --example ascii src/example.ascii -w 7 -h 10

We might get this as an output:

+--+
|..|
|..|
|..+--+
|..|
|..|
o--o

The '*' symbol can be used to let the algorithm automatically choose what edges to use:

cargo run --example ascii src/example2.ascii -w 20 -h 10

example2.ascii:

   ****
   ****
   ****
*********
*********
*********---
*********
*********
o***o***o

Might result in:

      +--+
      |..|
+--+  |..+--+
|..|  |.....|
|..|  |.....+-------
|..+--+.....|
|...........|
|...........|
|...........|
o-----------o

About

:bow_and_arrow: Procedural siege engine generator

https://tversteeg.nl/siege

License:GNU Affero General Public License v3.0


Languages

Language:Rust 100.0%