This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

Creating a tileset for procedural maze

SolidOptionSolidOption Posts: 1Member

I was watching a kidscancode(but apparently I can't) tutorial on procedural maze generation.

My question is what do I have to do in order to use my own 16 map tiles for it to work. I slice up a sprite sheet and chose the 16 tiles I would need: turns, intersection, dead ends ect. But when I run it random tiles are laid out instead of creating actual paths.

I am guessing I need to set an ID to the tiles, and not just name them 0-15? Or is to do with the collision polygons that are included in the .tres resource download for the tutorial?

Answers

  • bitshift-rbitshift-r Posts: 54Member

    Yes, you have to set the id/index. I don't think you can change the id from the editor, so you would have to define your regions in the correct order, or hack the tileset's tres file.

    To see the order you can click the "i" button or hold the "alt" key. The first number on the tile is the id/index, the second is the name.

    For example in the tutorial's tileset the "+" tile is index 0, the "T" is 1, etc. So you would have to define your "+" tile first, then your "T". It doesn't matter where on you sprite sheet it is, or how it's named... it's the order of creation that matters.

    You may just be able to move your regions around to put the correct id on the correct tile.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.