For some references to the above. Here are some of the forum posts that relate to this. Some quite old, but this is kinda a known limitation for runtime resource usage:
Hi,
I’ve just started using Defold, and it is a very nice engine, indeed :).
I have a (million, but let’s start with this one) question: I want to create an arbitrary hierarchy of objects at runtime, and what I’ve done so far is creating a factory that spawns empty GameObjects that I then move around with “set_parent”.
Is there any way of creating those empty GameObjects without having to create a factory with an empty .go file attached? It seems like a hack
Thanks in advance!
As commented here , it will be useful to be able to create (empty) GameObjects on the fly to take advantage of the scene graph at runtime. Maybe something like factory.create_game_object([parent]) or similar (I don’t know the API well enough yet to know about naming or structure, but hopefully you get the idea :D)
I’m new to Defold, and try to create a brick game for learning purpose.
I plan to bounce the ball if it hits the edges of window (left, right, top, bottom).
So I placed four boxes at the edges, and bounce the ball if a hit message is posted.
That works great, but now I want to adapt the window size, so the collision object cannot be placed at fixed positions, so I figure I could create those boxes inside collision object at runtime.
But after a wide search on both Defold document, forum and …
I’ve been trying to make a gameobject, that generates a vertex buffer on init. That works fine. The problem is, whenever I create another another instance of the go (either through factory or just plonking more in in the collection editor), the previous ones get the same vertices. I’m guessing it’s because all the meshes have the same .buffer file, and it’s that that is getting updated. Is it possible to create instances of a go with different vertex buffers at runtime somehow?
And there are other related ones.