I have started to develop the demo game X-asteroids as a project to learn more about ds game maker.
I have a couple of "enemy" objects on the screen and i want to control how the objects are moving.
In the demo game there was a control object named "Player" and in that object the code for moving the enemys was executed. I made a enemy_control object and I wanted to use the velocity [VX] to control the objects movement instead of the solution in the original demo. Unfortunately this seemed to be a very slow solution.
I then put the code directly in the enemy object and the game was executing fast and smooth.
my first attempt
if one of the instances of enemy is out of screen change the direction of all of the instances
the good solution ( I put almost the same code directly in the enemy object)
if this instance is out of screen then change the direction of all of us
why is the second solution so much faster i have preferred the first one??
/lucky
