• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion [SOLVED] Handling Top-Down Depth?

Bulletech

Member
Thinking of a top-down game like Pokemon, where the closer the player is to the bottom of the screen, the lower their depth, AKA they appear in front of objects higher on the screen.

In GM:S 1.x you can simply code this by putting depth = -y; in the step event for example.

But for GMS 2, with the introduction of layers, what would be the best way to implement this effect?
 

gnysek

Member
1. You have an example of this game as demo on tutorials/demos from YYG (you can access it from start page) - in this case however, there's no need to use depth = -y as there's no trees/grass, only walls.

2. You can put everything in priority map, disable automatic draw and then draw from one object :) (this may also make texture swaps as small as possible) It was also mentioned in several places here on forum by Mike and others, use search and you probably find it.
 
Top