AutotileLib

by Ter13
Fast, simple, abstract 47-state autojoining library [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Ter13.AutotileLib##version=11

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Ter13.AutotileLib##version=11

321 downloads
Version 2.0c
Date added: Jan 2 2017
Last updated: Aug 27
9 fans
AutotileLib makes mapping gorgeous maps with tile edges a complete breeze.

Map editor:



Runtime:



AutotileLib doesn't expect you to draw every single join state on your own either.

Simply import a DMI file in this format:



Run the command GenAutotile() from the command line, select the DMI file, and then save the machine-converted 47-state autotile for use in your project!.



The autotile generator will take icons of any size. even animated DMI files!

The input must be in the form of a 3x4 autotile sheet. The system will automatically spit out icons 1/3rd the width of the sheet, and 1/4th the height of the sheet, using each subsegment of the supplied icon.

The engine also allows you to specify multiple different tile ids that each autotile rule merges with, allowing you to make bridge tiles not interrupt water autojoining, or for cobblestone paths to tile with dirt paths seamlessly. These join rules are assigned to tiles via a JSON array on the turf itself, so there is no need to maintain a messy global list.

In addition, autotiles can be given an icon_state in the map editor at compile-time. The autotile will use that icon_state as its default, allowing you to create one-time tiling rules without overriding the autotile group rules!

The autotiling algorithm is fast and flexible, tiling 1000x1000 maps in around ten seconds after world initialization and updating thousands of autotiles at runtime per second. Initialization no longer blocks world startup, and entire chunks of the map can now be re-joined on the fly.

Documentation is here.

Comments

Mitchy: (Mar 5 2017, 7:48 pm)
awesome!!!
Escapen321: (Jan 31 2017, 9:03 pm)
Go Ter! Congratulations