#png #map #teeworlds #path #file #create #builds

app png-to-twmap

Creates a teeworlds map from a png

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

#131 in Images

Custom license and AGPL-3.0-only

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 brown
Unhookable #FF7F27 orange
Air #000000 black
Freeze #C3C3C3 light grey
Spawn #3F48CC indigo
Start #FFC90E gold/yellow
Finish #22B14C green

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

~21–34MB
~355K SLoC