I’m trying the war-battles tutorial, but i can’t make the tile-map show in-game. https://www.defold.com/tutorials/war-battles/ What i’m doing wrong?
Main:
Tilemap:
After Launch:
I’m trying the war-battles tutorial, but i can’t make the tile-map show in-game. https://www.defold.com/tutorials/war-battles/ What i’m doing wrong?
Main:
Tilemap:
After Launch:
At what Z coordinate is the map game object and the tilemap component?
Both of them are 0.
And the layers? The default render script has a z-range of -1 to 1. The game object, the tilemap component and the layers need to sum up to something inside this range.
Weird. It must be some simple thing we’ve overlooked. Do you have any errors in the console? Would you mind zipping the project and sharing it?
Did you save before running?
I don’t have any errors and it was saved before running.
Where’s the project folder/file, so i can send it?
Right click “game.project” and select “Show in Finder/Explorer”. That will take you to the project directory.
War_Battles.zip (583.4 KB)
I believe this is it?
Wow, this one was tricky! I’m using Editor 2 and when I opened the tilemap it was blank, not painted in green tiles as in your screenshot. When I ran the game it was also blank and when I tried to draw some tiles nothing happened. The tilemap was still blank! Very strange…
BUT then I noticed that the tilemap had the wrong material (font.material!) which explained everything since editor 2 actually uses the material also when rendering in the editor (and not only when running the game in the engine):
Change this to the sprite.material and you’re all good!
Yep, it’s working now.
Thanks a lot!
Maybe the tutorial should need some more info.
You must have accidentally changed the material. In the GitHub project it’s set to the correct material.
This was incorrect. It should obviously be the tile_map.material
, but I believe in this case it’s the same thing.
Weird, well, thanks anyway!