Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tversteeg/siege
:bow_and_arrow: Procedural siege engine generator
https://github.com/tversteeg/siege
castle-game pixel-art rust
Last synced: 3 months ago
JSON representation
:bow_and_arrow: Procedural siege engine generator
- Host: GitHub
- URL: https://github.com/tversteeg/siege
- Owner: tversteeg
- License: agpl-3.0
- Created: 2018-03-08T13:12:07.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T20:31:07.000Z (about 1 year ago)
- Last Synced: 2024-10-29T06:41:27.067Z (3 months ago)
- Topics: castle-game, pixel-art, rust
- Language: Rust
- Homepage: https://tversteeg.nl/siege
- Size: 1.24 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
siege
Procedurally generate siege engines.
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:
```sh
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:
```sh
cargo run --example ascii src/example2.ascii -w 20 -h 10
````example2.ascii`:
> ```
> ****
> ****
> ****
> *********
> *********
> *********---
> *********
> *********
> o***o***o
> ```Might result in:
> ```
> +--+
> |..|
> +--+ |..+--+
> |..| |.....|
> |..| |.....+-------
> |..+--+.....|
> |...........|
> |...........|
> |...........|
> o-----------o
> ```