This maps looks a bit weird but if we remove all the images it will be like: So we give the monkey a small mask about the size of his shadow and we also give all the walls a mask. Yet in your game you want to have that the unit can walk around through the map. If you look at the example you see that the monkey is not capable of passing to the small parts between the walls.
If you want to make an isometric game masks are also very important. So when using animated sprites together with complex collision checking it is always a good id�e to have a mask. It doesn’t matter which sub image is being displayed the mask always stays the same. Luckily when using masks this will not happen since masks do not change for your object. This makes that you suddenly stand still and are stuck in a wall. So it could be that during an animation in one frame you are walking past a wall while the next moment you are inside the wall.
Since the image changes every step the area the sprite takes in also changes every step. Masks are also very useful when using animated sprites. You then will have excellent collision checking for your ship. If you add both the first image to your game and the black image to your game and set them as mentioned below: Luckely Game Maker has a built in system for this. Now you could add this as an invisible object to the game and make it follow the ship and make all collision checking with this new object. Only this doesn’t look very nice in your game. You simply make a shape in the same size as the object you make the mask for. So with your game you don’t want that shooting at your flag counts as destroying the ship. It only shot of the flag of the ship and then went past the ship. So shooting a missile at the flag will count as hitting the ship.Įven though the shot didn’t actually destroyed the ship. With collision checking the flag will be counted as a part of the ship. This is useful for instance if you have a sprite with a lot of tentacles. A mask is a sprite that is used by Game Maker for collision checking instead of the original sprite.