|
|
|
luiscubal
|
|
Reply #3 Posted on: January 27, 2011, 12:31:51 pm |
|
|
Joined: Jun 2009
Posts: 452
|
Let me put it this way. Say 2 instances access each other x and y.
var tmp = other_inst.x; other_inst.x = self.x; self.x = tmp;
In GM, this means the two x are swapped. Since the code is executed twice(2 instances), this code effectively does nothing in GM. Now, consider a perfect parallel synchronized execution. inst1.x = 5; inst2.x = 10; Now, each instance reads the x of the other to its own local tmp variable. Now, each instance changes the position of the other. Right now, we have inst1.x = 10; inst2.x = 5; Now, they are going to set their own x from the tmp variable. So we now have inst1.x = 10; inst2.x = 5; again.
So the end results are different. Therefore, compatibility with GM is broken.
|
|
|
Logged
|
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #6 Posted on: January 28, 2011, 12:48:07 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
What I was thinking about doing is adding threading by the same mechanism that I can add instance deactivation. Basically, I would keep a new tree and shit for each thread (deactivated instances get placed in thread -1, which is never processed).
Threading an object would be as simple as saying instance_thread(inst,thread). Users would be allowed to figure out for themselves that sometimes life isn't as easy as putting everything in its own thread and hoping depth and shit stay in order.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|