Import entites in sequence of creation
For my racing game I set the track checkpoints as entites such that they form the logical ideal line through the track. Naturally, when importing these, the sequence becomes important. Since my track is a world consisting of several levels, I cannot rely on the sequence in the file. I need to order by "creationdate".
What is the best practice to import entities in the sequence they were created in LDtk?
I was also thinking about a custom INT value for my entity, but then I would need an AUTOINCREMENT flag, which currently is not supported. Has this ever been discussed before?
I discovered that sorting by IID works, but is it guaranteed? (does IID creation consider time?)
You can add a "next checkpoint" field in your entity that is a reference the next checkpoint entity..... so in the editor you explicitly link them (you can do that visually!), and when importing you treat that as a linked-list. It’s better then increment because you can easily add points in the middle