GameMaker: Studio

GameMaker: Studio

View Stats:
Background Depth?
Is there a way to adjust the depth of a background or a way to adjust an objects depth so that it will appear behind a given background?


For added detail, I'm working on making a 2 player turn based strategy game. On my game board I have two backgrounds. The first is the terrain and is always on and covers the full room. The second background is asingle tile / cell that is empty except for the border and is set to be tiled across the room so that when it is active the entire room has a grid of empty tiles across it.

I have objects that are individual tiles with a highlight, red or green, to indicate tiles that are selected. My problem is these show up over top of the black grid being drawn by the second background.

I could shrink down the size of the objects sprite or include a black border in it which would give the illusion that it is actually behind the grid background... but I that doesn't work for me because some units are larger than single tile and stretching the object to fit multiple tiles, especially if I drew a border in the sprite, doesn't look right.

Is there any way to make an objects depth be below a given background or would I be better off handling it a different way such as making that grid background actually just be an object or sprite drawn on the screen?
< >
Showing 1-1 of 1 comments
Haven't found any way to change the depth of backgrounds or make a object appear behind a background.

I achieved a similar result though by taking the empty tile / cell that I was using as a tiled background and instead loading it in as a sprite. I then used the draw_sprite_tiled function to draw it to the screen. Since its no longer a background I can make objects draw behind it by increasing their depth.
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: Sep 7, 2015 @ 9:11am
Posts: 1