If you're bullet is moving fast, it's entirely possible that it will move over any given collision mask in a single step.
Let's use an example: The bullet is at an x position of 100, moving to the right. There's a wall that is 10 pixels thick at an x position of 140 (both the bullet and the wall are at the same y coordinate). The bullet is moving at 30 pixels a frame. In the next frame, the bullet moves 30 pixels to the right and is at an x position of 130. It performs a collision check, the wall is not there (the wall is at x position 140, remember). The next frame, the bullet moves 30 pixels and is at an x position of 160. The wall is at x=140 with a width of 10, so it stretches between 140 and 150 x. The bullet has performed a collision check at 130 and 160 x, so clearly it's not going to register a collision with the wall...The question is how do we get it to actually understand that it has skipped the wall? The usual answer is to check all the points between where the bullet is and where it's going to be in the next frame using a loop:
Code:
var next_x = round(x+xspd); // Find where the bullet will be in the next frame
var current_x = round(x); // And where it currently is
while (current_x-next_x != 0) { // Loop until there is no gap remaining between current_x and next_x
if (position_meeting(current_x,y,obj_wall)) { // Check to see if there is a wall object at the current_x and y coordinates
break; // If there is, break out of the loop
}
current_x += sign(xspd); // If there is no collision, increment current_x by either 1 or -1 depending on whether xspd is positive or negative
}
x = current_x; // Once the loop has finished, set x to the current_x variable, which will either set it at to the side of obj_wall if there is a collision or wherever the bullet should be if there is no collision
Of course, there's a million little variations on the above that you could do. There's also other methods, for instance, using collision_line instead of manually calling a loop yourself, but this is the general gist: Instead of just moving at a certain speed and checking where that speed would put you each frame, check each position along the path you are going to take and adjust what happens based on those collision checks.