4 ms·
I think rather than having to upload and describe each tile independently, it would be better to come up with a system which allows related sets of related tile
by uglycoyote 6y ago
I think rather than having to upload and describe each tile independently, it would be better to come up with a system which allows related sets of related tiles to be uploaded as a group
Something like 9-slicing comest to mind (https://en.wikipedia.org/wiki/9-slice_scaling https://en.wikipedia.org/wiki/9-slice_scaling). If your road was represented by basically a single texture that has 9 equal size quadrants, then you could pull out the 4 corners and two straight sections out of this easily.
That would also lend itself well to the railing sections, where you could pull out the 8 railing pieces from the perimeter, and the one non-railing piece from the centre.
By specifying it as one texture in a coherent and standardized way, you would both avoid both needing to painstakingly declare all the texture metadata, and have a clear system where the similar directional sets can be defined and used in the same way to either flood fill or to make road-like things. (e.g. fences, railroads)
- atum47 6y agoI do use this in other projects, like in my tower defense game (https://github.com/victorqribeiro/towerDefense https://github.com/victorqribeiro/towerDefense), but I was only working with one texture. this project is not a city builder, it's a tile map editor, and should be generic enough to acomodate any type of tiles (I talk about that a lot on my videos). this is something I would really like to do, I think I just need a better way for the user to specify these corners tile. or, define a standard the texture must follow so it could be imported.