10 years ago by henonchesser
Javascript is single threaded right?
So if I have Entity A, Entity B, and Entity C. And they each have a function to move one space to the left but only if the entity preceding them alphabetically has moved as well. And lets just say Entity A can move on it's own. Will Entity B and C not move because A is moving in the same update cycle?
Or does Impact loop through all entities in order so that Entity B's update would come after Entity A's update and know whether or not to move?
So if I have Entity A, Entity B, and Entity C. And they each have a function to move one space to the left but only if the entity preceding them alphabetically has moved as well. And lets just say Entity A can move on it's own. Will Entity B and C not move because A is moving in the same update cycle?
Or does Impact loop through all entities in order so that Entity B's update would come after Entity A's update and know whether or not to move?