I’m making a top-down infinite map like in vampire survivors.
I made 2 external layouts, 1 with only a map tile,
and the other with “checkers”.
The idea is that at the beginning of the scene, both layouts are added once;
tile in the middle and checkers around the tile. (Player character is in the middle)
If the player character is close enough to a checker, a tile is added where the checker was and a new bunch of checkers around it. The checker that added them gets deleted and the process should repeat the further the player moves to make the map bigger and bigger.
There’s also an event that checks if there are any checkers colliding with a generated tile and if yes, then the checker gets deleted.
This seems pretty easy, like 2+2=4, but for some reason, some checkers don’t listen to the events or some tiles get added in a wrong place.
The current conditions are comparing y to y and x to y. Did you mean to use y to y and x to x?
Yes, thank you! I’ve been struggling with this problem for so long that I sort of gave up on checking any errors. It’s super frustrating…
I’m assuming you’re one of the GDevelop devs? Look:
One of the checkers isn’t responding and the game is getting very laggy.
Could you help me, please?
You might be adding too many objects. How many are showing in the debugger?
Just in case:
Game Debugger and Profiler - GDevelop documentation
Edit: As far as not responding. We would need to see more of the code. I don’t have a grasp of your complete concept but it seems a bit too aggressive as in it’s not focused just on the player viewing area.
IDK how many objects are in the external layouts but like a virus the objects can grow exponentially very quickly. I’m just guessing. At this point I could be wrong.