Lancer-X, on 05 January 2015 - 10:36 PM, said:
the counters are set when sprite_colliding is checked. this can happen any number of times. the robot that does the checking does not matter. it is only important that the checking code happen atomically if you have robots on the board doing sprite collision checks, so the robot that is busy checking the counters is not pre-empted by another robot that then does if sprite_colliding causing the counters to change. increase the "commands" counter as necessary to ensure this atomicity.
Thank you for the prompt reply Lancer. So each robot on board get it's turn executing code (or each robot is scanned and it's code executed), starting with the global and then one nearest to 0 0, continuing across the boards X coordinates, then increasing the y coordinate and checking across the X coordinate again, until the highest X Y coordinate on board has been reached, right? and each robot that executes code will continue to do so until a cycle ending command is reached, or the robot executes a number of commands equal to the "commands" counter. Am I understanding that correctly?
Currently working on Servo for MegaZeux, I hope to complete it by the
middle of 2015? Who knows...
"Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you’re a mile away and you have their shoes."
-Jack Handey