GameMaker: Studio

GameMaker: Studio

View Stats:
Layering help
Yeah, I'm a bit of a newbie at this.

I'm currently placing tiles down in a room to practice scenery, and while that's fine and done, when I go to place down a tree over the grass tiles I have down it just places the tree under the tiles. I assume there's some sort of layering system in GameMaker? Idk. Any easy fix for this?
< >
Showing 1-15 of 15 comments
Blind Dec 9, 2016 @ 3:37pm 
Ya, on the menu to the left you just select a different layer. Layers are rendered numberically so you want stuff that goes on top to be on a higher layer.
TheFulvousFox Dec 9, 2016 @ 3:45pm 
Originally posted by BBX:
Ya, on the menu to the left you just select a different layer. Layers are rendered numberically so you want stuff that goes on top to be on a higher layer.
I'd assume you mean this? http://i.imgur.com/DXA8acV.png
Blind Dec 9, 2016 @ 3:46pm 
Yup, just add another layer and you're good to go.

+If it doesn't work with a higher layer try a lower layer - I can never remember if higher or lower is under or above.
Last edited by Blind; Dec 9, 2016 @ 3:46pm
TheFulvousFox Dec 9, 2016 @ 3:48pm 
Originally posted by BBX:
Yup, just add another layer and you're good to go.

+If it doesn't work with a higher layer try a lower layer - I can never remember if higher or lower is under or above.
Well the layers do indeed work. Only I'm not getting the result I want right now. What gives?

http://i.imgur.com/qXUnwik.png

Tree is still partially under the tile.
Blind Dec 9, 2016 @ 3:50pm 
That's a weird, is the tile to the right there on a different layer?
TheFulvousFox Dec 9, 2016 @ 3:53pm 
Originally posted by BBX:
That's a weird, is the tile to the right there on a different layer?
Nope it's all just one layer
Blind Dec 9, 2016 @ 3:56pm 
Is the tree an object? 'cuz objects and tiles render differently.
TheFulvousFox Dec 9, 2016 @ 3:57pm 
Originally posted by BBX:
Is the tree an object? 'cuz objects and tiles render differently.
Both tiles and trees are objects, yes. But it won't let me use the tree unless I set it as an object. Unless there's another way to do this?
The Winter Bud Dec 9, 2016 @ 4:00pm 
the more negative teh value of the layer the more on top it will be
500 - bottom layer and covered by other layers
0 - middle layer, covers 500 layer but is covered by -500 layer
-500 - top layer, no other layer can cover this layer

This scheme shows you how depth works with game maker. Tiles are affected by depth as well. Those with a lower depth (negative is lower than positive) will draw on top of those with a higher depth. When placing tiles, it's good to place tiles in groupings such as
bottom layer - grass, dirt, other terrains that can be covered by other tiles
middle layer - terrain and other material that is in between the bottom layer and the player
player layer - layer that holds most of game objects
top layer - all things GUI and other visuals that cover the player and game objects

NOTE: the values I give are arbitrary and the amount of layers you have is arbitrary. Have as many as you need to organize it. Be sure to write down your layer names and their corresponding depths in case you walk away from the project for a little.

other layers
bottom layer
grass layer
tree layer
boundary layer
wall layer 1
wall layer 2
paralax layer 1
paralax layer 2
obstacle layer
interactive layer
NPC layer
sky layer
etc..
Once you have your layers, just give them a depth order that is unique and that should clear up any problems as long as you lay the correct tile in the correct layer. putting a grass tile in the wall layer is just silly :P
Blind Dec 9, 2016 @ 4:00pm 
Ok, tiles are a specific thing which are NOT objects. In this case you want their object's DEPTH. That's how objects are rendered.
The Winter Bud Dec 9, 2016 @ 4:05pm 
Tiles[docs.yoyogames.com] are not objects. Tiles are a form of a background.
MinorThreat Dec 10, 2016 @ 2:11pm 
Also if you want an object to update it's depth on the fly in relation to other objects I suggest putting depth = -y; in the step event of those objects.
An Easy Target Mar 19, 2021 @ 4:25pm 
Originally posted by The Winter Bud:
the more negative teh value of the layer the more on top it will be
500 - bottom layer and covered by other layers
0 - middle layer, covers 500 layer but is covered by -500 layer
-500 - top layer, no other layer can cover this layer

This leaves me with a question. Are there only three possible layers in the game, just marked with those numbers as names;

or,

is 500 through -500 a range which can accommodate 1,000 possible different layers?
Last edited by An Easy Target; Mar 19, 2021 @ 4:26pm
An Easy Target Mar 21, 2021 @ 6:17pm 
Originally posted by Fulvous:
Originally posted by BBX:
Yup, just add another layer and you're good to go.

+If it doesn't work with a higher layer try a lower layer - I can never remember if higher or lower is under or above.
Well the layers do indeed work. Only I'm not getting the result I want right now. What gives?

http://i.imgur.com/qXUnwik.png

Tree is still partially under the tile.

I have lost track of which tab these layer options are located in. Would you mind sparing a fool some directions?
An Easy Target Mar 23, 2021 @ 3:40pm 
Answer to my question: That option is underneath the "tiles" tab in the Room Properties window.
< >
Showing 1-15 of 15 comments
Per page: 1530 50