Z Buffer

The Z-buffer assorts all pixels in a 3D scene so that only the ones which are nearest to the camera are visible; hence not blocked by another pixel. This avoids the problem of an object behind another object accidentally overlapping the other object. For example, if you see some distant mountains in the background, and a tree in-front, the tree should obviously overlap the mountain. But without a z-buffer, the software does not "know how" that concept works; remembering that all computer operations are instructed by a programmer.

The Game Maker manual details the Z-buffer as:

"'Starting 3D mode will result in the following changes ... hidden surface removal is switched on (using a 16-bit z-buffer). This means that for each pixel on the screen only the drawing with the smallest z-value (= depth value) is drawn. If instances have the same depth it is unclear what will happen and you can get ugly effects. Make sure instances that might overlap do not have the same depth value!'"

The Game Maker Language > 3D Graphics > Going to 3D mode