Auto Terrain Generator for Tiled
Just let me download it already! https://github.com/Zielak/AutoTerrainGen/releases
During development of GrayScale I found myself lacking the tools or skill to create terrain in Tiled editor. Using terrains I could create pretty maps much faster than placing individual tiles for details. Now with Auto Terrain Generator I can actually focus on doing some level design.
— Darek Greenly (@Zielakpl) September 21, 2015
— Darek Greenly (@Zielakpl) September 22, 2015
Get the source code and play with it: https://github.com/Zielak/AutoTerrainGen
I’m open for PRs and fixing issues. I’m working only on Linux and Windows so It would be cool to see someone build this tool without problem on a Mac
How to use
Use this tool to combine your layers into one terrain and paint quicker landscape in Tiled editor.
Each tileset should contain every possible tile combination. Use below template to create your own. Only 15 tiles are used, the last one is ignored.
I’ve tested this tool for generating terrain of 2, 3 and 4 tilesets. Adding more would probably cause longer generation time, and also I’m not sure how would Tiled react to that.
Open the generator and set your tile size. Default is 16px x 16px. Change it in “Configurate” window if you’re using different tile size. Width and height must be equal, eg. 32px x 32px.
Put all your tilesets into
input folder (next to the program executable), type your filename in generator (with an extension!) and hit
LOAD. Your tileset should appear in the list below.
Now you can:
- change name of the layer – this will appear in Tiled Terrains window (hover your mouse over text input to start typing, don’t move cursor away from text input!)
- change order – bottom layers will be rendered on top of all the other tilesets. Reverse-photoshop style
- remove tileset with “remove” button
- preview tileset by clicking an image to see how the generator split each tile in “Tileset Preview” window
The terrain will be available to preview in the right part of window.
At the bottom you’ll find:
- “Export Bitmap” – save terrain PNG file in
- “Export TSX” – save .tsx file for Tiled in the same folder
Now you can move both files from Auto Terrain Generator folder to your own game. To use your new terrain you have to open new map in Tiled, go to menu and hit “Map” -> “Add external tileset”. Navigate to generator’s
output/ folder and choose
This tool was created using:
- luxe engine – luxe is a free, open source cross platform rapid development haxe based game engine for deploying games on Mac, Windows, Linux, Android, iOS and WebGL.
- mint – mint is minimal, renderer agnostic ui library for Haxe.
- format – The format library contains support for different file-formats for the Haxe programming language.
- 23 Oct 2015 web: load button 100% width when the window is resized
- 23 Oct 2015 web: canvas always centered in browser
- 23 Oct 2015 Merge pull request #6 from FuzzyWuzzie/master Web Support ( Zielak/AutoTerrainGen#5 )
- 22 Oct 2015 Added file opening in web! :rocket:
- 22 Oct 2015 Added js file downloading for export