[SOLVED] Map tiles all black

Continuing the discussion from Creating open world (with chunks):

So after one year, I again have some time to work on this project and unfortunately when i run the Code from last year (available on GitHub) i get just a black background (in v1.6.2 from steam) instead of the generated map. I managed to get the version 1.4.3 I worked with last year and everything is working fine.

It seems, the map is generating and the character moves around but I can’t get it to show the actual tiles instead of black. Furthermore no errors are thrown.

Any Ideas on why this happens? Has it to do with the camera or with the tilemaps/tileset? Thanks :slight_smile:

Oh, and i remembered I used this example of britzl to create the camera and movement of the map. This is still wroking fine in the 1.6.2 version, so I guess i messed something else up.
https://britzl.github.io/publicexamples/infinite_map/index.html

Update 1: seems like trees get rendered just fine after I enabled them. I guess something went wrong with the IDs of the different tiles from the tilesource. Still wondering what caused those issues. Going to update soon if I find any solution

In camera.script there are three:

msg.post("@render:", "use_fixed_projection", { near = -1, far = 1, zoom = self.zoom })

Zoom scales coordinates, which puts the map outside of the frustum.
If, for example, far=10 is set, then the map will appear when the game is run.

2 Likes

Thank you very much. This indeed solved the problem.
I guess I need to learn more about the render pipeline of defold (^^’)