Is there a stash of Defold designed patterns somewhere?
While there are bunch of examples (thanks to the many authors) extracting the pattern from the implementation/problem can be a bit time consuming. Add to this whether or not that design is considered ‘good’, leaves thing a little murky.
Standard patterns can of course be co-opted but wont take into account how Defold itself, specifically, functions.
As an example; I have a collection of objects that is character: body, sword, shoes, etc. However, this collection doesn’t exist at run-time so if I want to delete the character I can’t just call ‘delete collection’.
This is fairly easy problem to solve: Have all of the game objects register themselves with the ‘main’ game object and then have that component delete all them, before deleting itself.
My problem is that I don’t know if this approach is going to cause issues down the line (memory leaks, asynchronous delete commands leaving a characters limbs behind).
You could instead have a ‘deleteStuff’ game object that you pass tables of urls to be delete and thus avoid the limb problem above. But is this actually a better approach, or is it just solving a problem that was never going to occur anyway.
Knowing the recommended approach before I write the implementation would save me some time reworking things.
To be clear, this isn’t a request for a solution to the above issue, merely a request for the location of design patterns if I wandered past them without noticing.
Thanks.