I'm making a game and using Tiled to create a .lua file. I get rid of the irrelevant data and leave myself with just the table containing the map tiles and another table containing information about the tiles (walkable/solid/etc). I also have information tiles that are towards the edge of the map that I want to use to start loading the next area.
This is all going fine, but I don't know how to display the transition between the current tile map and the next tile map efficiently. I don't want to expect different tile maps to be the same height and width (in tiles, not pixels).
I know that offsetting the current map will probably be part of the solution, but I don't really know how to make the next map line up with the current one.
I've included the .love file - I'm trying to make a general tiled RPG engine and a Pokemon Emerald clone along side it. When I finish the clone, I assume that once I strip all the Pokemon related stuff from the engine, it should be suitable for any type of tile RPG.
My Github repository is https://github.com/Djent-/Pokemon-Lua. I'd make a thread in Projects/Demos, but I don't think this project is worthy yet.
Displaying multiple tile maps
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Displaying multiple tile maps
- Attachments
-
Pokemon Remake21 -f.love
- (125.21 KiB) Downloaded 210 times
Re: Displaying multiple tile maps
interesting what you are trying to do.
the way u can do it is little bit like this, have a your maps(red and yellow) inside a overall map(green)
and every small part of the map needs a header of its x and y position and its length and height
so when you're outside the map then read from the overall map what comes next
idk if this will help, i haven't tried it in practice
the way u can do it is little bit like this, have a your maps(red and yellow) inside a overall map(green)
and every small part of the map needs a header of its x and y position and its length and height
so when you're outside the map then read from the overall map what comes next
idk if this will help, i haven't tried it in practice
Re: Displaying multiple tile maps
This is a really great idea, thank you. I still have a nagging feeling that there is a more efficient way of orienting the maps, but this sort of grand scale table will probably be the most portable.adekto wrote:interesting what you are trying to do.
the way u can do it is little bit like this, have a your maps(red and yellow) inside a overall map(green)
and every small part of the map needs a header of its x and y position and its length and height
so when you're outside the map then read from the overall map what comes next
Re: Displaying multiple tile maps
You can check an article I made about Layering tile maps (http://www.love2d.org/wiki/Layering_Tiles). Then you can make the tiles you don't want to see see-through.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Displaying multiple tile maps

since u are using tiled, u can also just copy past all your maps into 1, my understanding love will perform exactly the same, maybe better since it wont need to calculate one map in relation to another
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 6 guests