- By default in GM all objects have depth 0.
- In case of equal depth, "tie", the newest object will prevail and will be above the oldest one.
- Positive depth numbers mean distant instances, far away from player (in other words, "into" the screen).
- Negative depth numbers mean near instances, close to the player (in other words, "de profundidad indican instancia cercana al jugador (es decir, más cerca, towards "outside" the screen).
- Then virtual controls (phones,tablets), must be great negative numbers (i.e. -9999).
We use to match depth with the negative "y" value, as in physical screen, y=0 means upper part, when going down "y" increases. That way, if an object it's moving up and down, depth is going also up and down:
In that case put in STEP event: depth = -y;
Example: Depth table, 1st round "Blood Bros" game
OBJECT | DEPTH |
-200 | |
Buildings | -225 |
Common enemy | -250 |
Horse enemy, Bonus | -300 |
Rolling barrel | -325 |
Enemy bullets | -350 |
Explosion | -375 |
Player bullets | -400 |
Player sight | -450 |
Barrel (defense player) | -475 |
Player | -500 |
-9999 |
In this table, I choose depth values to show you how it works. That means values could start i.e. in 0 and going up to higher negative values. Also could start in 0 for interface and then going up in positive values, higher when further away. Doesn't matter your system.
To understand this, let's see this "Blood Bros" screen:
Players (indian and cowboy) are closest to us, closest to physical screen, that means, its depth values are higher "negative " values than the other objects. In my table -9999.
After them, we found defense barrels and players sights. Its depth value are lower then the player one, but "lower" then the others. In my table -500.
After them, enemies and Rolling barrel.
After them.... etc
Above all (including players) is the
I choose a similar table for "Sons of Camelot".
Biggest diference: on screen controls. Depth = -9999.
Same for score, life, etc.
Comentarios
Publicar un comentario