tilezen/zaloa

Name: zaloa

Owner: Tilezen

Description: Merges terrain tiles together from 256 to 512 and buffered sizes

Created: 2017-04-18 20:37:03.0

Updated: 2018-05-11 12:08:35.0

Pushed: 2018-03-20 22:56:14.0

Homepage:

Size: 51

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Zaloa

Zaloa takes input terrain tiles, and merges them together.

It is designed to be run as middleware to dynamically generate alternate tile sizes from 256px sources.

Sizes and tilesets

Zaloa uses two tilesets as its source:

  1. terrarium
  2. normal

Supports 512, and buffered variants of 256, namely 260 and 516. The variants have a 2 pixel buffer on each edge.

Tile Generation

The larger tiles are generated by sourcing the relevant neighbors from the 256px sources.

In the diagrams below, o is the source tile, and the xs represent the neighbors used.

512


260
x
x
x
516
x x
o x
o x
x x
Edge Cases

When on the “edge”, there isn't a neighboring tile to source. Zaloa's behavior is:

eg: The left neighbor of 2/0/2 will be 2/3/2

eg: The top neighbor of 2/2/0 is 2/2/0 itself, ie the top 2 rows of pixels are re-used as the buffer.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.