Defold message passing discussion

@h3annawill You find nothing to agree with (or add to) in @NSCharles contribution above?

Disclaimer: I have not read all the posts, since there were a lot of them :slight_smile:

My main problem area with the messages is the url part. We’re using a lot of proxies and factories and sometimes it seems like I can’t get the address right.

1 Like

I think you’re presenting your perspective as that of the average user approaching the engine. However, the quote above makes it clear that you’re bothered by message passing in Defold because you have a fundamental misunderstanding of the programming terminology.

Message passing, in modern colloquial OOP meaning, is absolutely not defined as calling a function on an object other than itself. Calling a function on another object is called method invocation.

Objective-c might be clouding the issue here, because all of its method invocations are implemented under the covers as message passing. This is a side effect of the language’s roots, but this is not the norm. None of C++, Java, C#, JavaScript, or Lua do this.

I would bet money that anyone coming from C++, Java, C#, JavaScript or Lua would not interpret the phrase “message passing” to mean “method invocation”. They would likely interpret it as something akin to the post office analogy mentioned above, which is exactly what it is.

Don’t believe me? Read the first two sentences of the wikipedia article on Message Passing

(PS: Oops, didn’t realize how old this thread was, I probably shouldn’t have posted)

4 Likes

It’s good that this discussion is brought to the top of the pile again! Defold is different and message passing might be hard to grasp, but once you get the hang of it and understand how it is supposed to be used it’s actually very nice.

2 Likes

I have a comment about this. I’m sure there are a lot of tutorials about messaging, but one feature that would speed things up is an autocomplete object tree browser thingy to find the appropriate target for a message, generating and autofilling the url

1 Like

This is an interesting idea. It could work for absolute URLs where you specify socket, path and fragment. It would be more difficult for relative URLs since scripts can be attached to multistrong textple game objects.

Wow! I want some of those! :slight_smile:

7 Likes

Oh, yeah, almost as good as “multiple game objects”!

1 Like