L
lord_berto
Guest
So i've been taking a c++ class for about a month now.
I've learned a whole lot and am trying to program more efficiently in GM now.
currently i am coding an enemy AI and i have to ask what is faster?
Using built in functions to calculate distance or angles, or doing it myself with math?
For example instead of using point_distance() should I use distance formula?
SQRT(x2-x1^2 + y2-y1^2) etc?
would it be slower or faster? thank you...
EDIT: (this is for gms1.4) Also, is calling a script slow? is it better to do code inside an object step instead of having multiple scripts?
I've learned a whole lot and am trying to program more efficiently in GM now.
currently i am coding an enemy AI and i have to ask what is faster?
Using built in functions to calculate distance or angles, or doing it myself with math?
For example instead of using point_distance() should I use distance formula?
SQRT(x2-x1^2 + y2-y1^2) etc?
would it be slower or faster? thank you...
EDIT: (this is for gms1.4) Also, is calling a script slow? is it better to do code inside an object step instead of having multiple scripts?
Last edited by a moderator: