Best practice to create a 'wall of blocks' for a platformer

Hi,

I would like to know what is the best practice to create a “wall of blocks”. I mean something like this, the red circle is the player:

Should I create each ‘game object > sprite’ for each block ?

Thanks :smile:

1 Like

If the blocks are evenly sized you should probably use tilemaps

1 Like

I only have 1 image for my blue block :confused: sized to 128x128

Then create a tilesource of that image and create a tilemap using that tilesource. Don’t forget to add collision to the tilemap.

3 Likes

I’ll try it, I will keep you informed

Sorry to say that…but I LOVE YOU :heart_eyes:
Thanks a lot it works fine !

4 Likes

Well now I have an error avoiding me to build and launch my app

Conflicting output resource 'build/default/main/ground/ground.texturesetc‘ generated by the following input files: [main/ground/ground.tilesource, main/ground/images/ground_blue.png, main/ground/images/ground_blue.png] <-> [main/ground/ground.atlas, main/ground/images/ground_blue.png]

:frowning:

[EDIT]

My bad it was because I had an atlas with the same image. I just deleted it and it’s all good now :smile:

2 Likes