I’m implementing greedy meshing using gdevelop.
The problem is, repeat for each obj is only selecting one fixed object and not iterating for each object on scene.
These are the events (The problem is with the first repeat for each object
):
I’m implementing greedy meshing using gdevelop.
The problem is, repeat for each obj is only selecting one fixed object and not iterating for each object on scene.
These are the events (The problem is with the first repeat for each object
):
I think there is a issue with your sub order.
You need to put the detector one more to the right. Under the repeat for each block3
If I did that. The greedy optimization thing doesn’t work
Dont know what you mean but second look i would also shufe the variable object checking with decor hight to the right as well because its now trigget the same time as the actiot that actually fill the variable
what are you saying?
I’m trying to figure out what you’re trying to achieve. A better explanation would help. So, here’s my guess - when you click the optimise button, you want all 4 blocks in the square to be replaced by one that is doubled in both width and height? Is Brick3 a tiled sprite?
The problem with the first for each event is that the detector is positioned on the last Brick3 object it iterates over. You want to place Detector on the top left Brick3 object. So you’ll need to modify your event for that.
But before that can happen, you’ll need explain how you plan to use the greedy mesh algorithm. Are there just 4 Brick3 objects on the scene? If there are more, how are you determining what 4 constitute a larger square? Because what you are attempting is fine for just 4 on the screen, but when you get more it’s likely you’ll run into issues.
Yes
Yes
My implementation is very basic and limited.
It works on more than 4 objects, the problem is that they need to be ordered in a specific order.
Here is a gif of how I implemented greedy meshing: