Hello,
I have been playing around with quite a lot of game engines trying to find a nice balance between code and something visual. So far I have been very impressed and am enjoying using Defold.
However there is something which I can’t seem to find the answer to, or guidance/best practice.
Basically when to use message passing (msg.post) and when to actually call the API. Obviously message passing is great for custom messages and things that don’t have an API. So this is more in the case when both a message and an API exist for the same thing.
My tendancy is to favour the API, however I am concerned that during initialization maybe other game objects aren’t present/race conditions. Where as I believe the message handling happens after this.
For example, should I use go.set_parent or msg.post(".", “set_parent”, {parent_id = something})?
Also a related question on properties - why would I use something like go.get(".", “position”) opposed to go.get_position()?
I can only see I would use the property for things which aren’t provided by default (eg “health”) or for go.animate.
Thanks