Let's say I have this code (messy code, but not the point):
if instance_exists(obj_one)
{
if x > 500
{
if shoot = 2
{
if obj_two.speed < 5
{
....................................... (and so on)
}
}
}
}
You get the idea... lot's of "ifs".
My question is:
If obj_one does not exist... does GM still go through the rest of the code?
or if shoot is not =2 does GM still continue to check all the "ifs" past that point or does it stop there?
In my opinion it seems a waste of CPU to process all the code after the first "if" statement that is not satisfied.
2
Turning off precise collision in a sprite fills the entire sheet with a collision mask. In all situations the precise collision mask is a lot smaller than the mask that covers the entire sprite.
What is faster? turning off precise collision or using the big mask?











