Hi,
I started making a really simple roguelike game. That is, it's a tiled game, where you click 1 of 4 arrow buttons and you move the whole map in that direction, keeping the main actor in the middle. The logic was easy and fun, but the performance was pretty bad. I assume it's because I'm adding bitmaps and removing them constantly.
Anyway, I saw Gideros already has a built-in TileMap class, so why reinvent the wheel, right?
My question is, looking at the desert example, what's the simplest function that would query for what tile is being touched onMouseUp(event) or onMouseDown(event)? I'd like to be able to understand enough to say "that's a ground tile" or "that's a wall tile," but there are so many {}'s within {}'s, it's hard for me to see what level of what variable to query.
Thanks.
Comments
http://giderosmobile.com/forum/discussion/5361/level-editor-of-choice/p1
look for the attachment on my latest post: It's not exactly what you need, it is an example on how to use tile properties from Tiled in gideros, but it could give you a starting point.
When I try to add another tilemap in the code, I get a weird '}' error:
sewers_2.lua is uploading.
Uploading finished.
sewers_2.lua:27: '}' expected (to close '{' at line 11) near '{'
Any ideas on the correct file format for multiple tilesets?
However, I just imported monster_tileset.png, added some tiles on a new monster_layer and exported the map from Tiled in lua. It works perfectly for me (see attachment - map updated to sewers_3 lua and tmx).
I suppose you're doing something wrong at some point, but it's hard to tell "what" from here
Are you working with Tiled?
Do you edit things by hand after exporting maps?
Thanks for taking the time to help me out.
I am glad to be of help, I had a lot here, just returning some when I can