Random Map Generation + Interactive Tiles (SKTileMapNode)

Hello, everyone.

I am trying to develop an orthogonal, survival type game. The idea is to have the map randomly generated, and all the tiles are potential resources that the player can gather/interact with/transform. While following the Entity/Component pattern, this would suggest the tiles need to be entities themselves, and they would need to have at least a static physics body to detect collisions (to start the interactions).

SKTileMapNode does not seem to be fit for purpose, however. It's just for background images, or images with edges, which is not what I need. Moreover, from reading a lot of posts on the matter, it would appear that even if what I want to do were possible with SKTileMapNode, it would not be performant.

I was very keen when I started the development with GK and SK, but the more my game ramps up the complexity the more it seems I'm using the wrong tool for the job.

Has anyone faced this or a similar situation? Is there another approach that could be taken? Even if I were to be able to generate such a random map using GKEntities, is that a doomed-to-fail approach due to performance issues?

I developped an procedural generation map with SKTilemap it's a very good tools for create such maps. You can find example here : https://twitter.com/GenetixVideos/status/1233686731200909312 (sorry the forum has troubles i can't upload new pics)

I had performances issues but only with very very big maps, one of my biggest maps was 12800 squares width and 7200 squares height and i had no performances issues at these size (and my code was not optimized)

And during map generation i was creating some GKgraph for other steps but they could be used for creating pathways for GKEntities. Mayebe you should create your sktilemap and graph and after create your entities

Show us more of your project for more help or send me a message

Random Map Generation + Interactive Tiles (SKTileMapNode)
 
 
Q