I want to use a randomly assigned tile map as a piece in a larger tile map. How do I go about doing this?
like so
where i and j are the cordinates of the larger array, and r and u are the cordinates of the smaller array
i, j i+roomx, j+roomy
r+i, u+j r+i, u+j
r+i, u+j+tiley
hope that helps.
attached is the working Random tile map generator, but with tiles. All I want is to replace the tiles with tilemaps and draw them.
wasd controls movement, n generates a new map.
Tilemap as a tile in a tilemap
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Tilemap as a tile in a tilemap
- Attachments
-
- Not working dont know why.love
- (33.25 KiB) Downloaded 153 times
-
- Working proof of random generation.love
- (33.23 KiB) Downloaded 146 times
Re: Tilemap as a tile in a tilemap
Hmm. Have you looked at Simple Tiled Implementation? You can load tilemaps made in Tiled Map Editor with offsets. You could just load them in a series using the width*col/height*row of the previous loaded maps as the current map's offset.
Alternatively, if you want to do it yourself, STI's source code and Tiled Map Editor's .lua tilemap output are great resources to learn from.
Alternatively, if you want to do it yourself, STI's source code and Tiled Map Editor's .lua tilemap output are great resources to learn from.
Re: Tilemap as a tile in a tilemap
hmm. Ill have to give that a try. Thanks!
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 6 guests