7 unstable releases (3 breaking)
0.4.2 | Apr 26, 2024 |
---|---|
0.4.1 | Apr 26, 2024 |
0.3.0 | Apr 22, 2024 |
0.2.0 | Apr 21, 2024 |
0.1.1 | Apr 20, 2024 |
#59 in Games
242 downloads per month
17KB
172 lines
png-to-twmap
Takes a png and builds a teeworlds map out of it.
Usage
Create a png and call the converter, passing the path as an argument. It should also work to drag & drop the file onto the exe, if you're on windows.
Default Colors
Name | HTML-Color | preview |
---|---|---|
Hookable | #B97A57 | ![]() |
Unhookable | #FF7F27 | ![]() |
Air | #000000 | ![]() |
Freeze | #C3C3C3 | ![]() |
Spawn | #3F48CC | ![]() |
Start | #FFC90E | ![]() |
Finish | #22B14C | ![]() |
Configuration
To configure which color gets mapped to which entity id, first export the default config:
png-to-twmap --print-default-mappings > config.rsn
Then you edit the config file and add a mapping from an RGBA color to an entity id.
There are a few pre-defined entity types that are named:
- Empty
- Unookable
- Hookable
- Freeze
- Spawn
- Start
- Finish
If you need some other entity, you can use Custom
with the appropriate id.
For instance:
Custom(123)
Dependencies
~15–28MB
~377K SLoC