1. tedd

    SOLVED Layer/Depth of objects messes up when a room is re-entered.

    Hi! I've been having a problem in GMS2. In my game I have a trigger which the player touches in order to leave to the next room. This room also has a trigger which allows the player to travel back to the previous room. There is currently no problems when walking through room to room, it looks...
  2. P

    GML Depth in Isometric View

    Hello everybody. I have trouble updating depth of my object in isometric game: when the object takes the neccesary tile the depth works right but while moving the depth is always changing and the cube is dissapearing every step, "hiding" behind the house object. Here is the code of my step...
  3. flyinian

    SOLVED What causes an object to change it's depth?

    I have two objects that are in a room together. These objects are persistent and the room is an initialization room. in the initialization room: object1 is depth of 0; object2 is depth of 100; on room change, object1 changes it's depth. in room 1: object1 has a depth of 200 object2 has a...
  4. B

    Problem with depth

    I'm creating a solitaire game that has a deck of cards that when clicked deals out the top three cards from the deck. I want it so that the cards pile on top of each other so that the first card dealt is at the bottom of the pile and so on. I have managed to get this to work however when the...
  5. S

    GML How to depth sort tiles that are bigger than one tile as one object?

    I've come across a huge problem, basically, I can either create loads and loads of individual sprites and corresponding objects to then place in my room which is really not a good way, or I could use tiles. I have a tileset of grass and trees where the trees are 3x2 and made using the brush...
  6. Mig_PG

    Windows Isometric engine featuring : Depth Sorting - Z-heights - Ramps - Bitwise Grid/Collisions

    Isometric Engine Cool features so far : - Any number of floors / fevels - Ramps / Z-height - Pre-calculated depth sorting that handle any block dimensions. (Used a method described here : Isometric depth sorting) I did try a bunch of methods. I will talk about them in details when I next...
  7. Alexir

    GMS 2 How to walk behind and in front of objects with MULTIPLAYER

    I have an isometric/top-down game with objects that I want the player to walk in front of and behind. When they walk in front of it, the player is visible and obscures the object behind it partially. When they walk behind it, then the object in front of it obscures the player from the camera...
  8. B

    How do I get the "depth = -y" effect in a rotatable view?

    This is probably basic trigonometry but I have tried and failed. I would like to know "how far up" a point is in the view, even though "up" is no longer -y, since the view may be rotated. Thank you for any help or resources, unfortunately the ones I found did not help me since I did not...
  9. S

    full black screen at depth 99

    While I was trying to implement a way of showing object in order of their y-position, I realized that nothing with a depth greater than 99 was showing. It was as if some object had a depth of exactly 99 and was drawing a big black rectangle over the whole room. I used debug message to make...
  10. angelwire

    GMS 2 [Solved] HLSL 11 Shaders - Problems generating and using depth map

    I'm writing an outline shader in GMS2 using HLSL 11 and I'm having issues drawing and using a depth map. I have two shaders, a main shader and an outline shader. The main shader encodes the pixel depth into the Green and Blue channels and draws that to the depth surface (the red channel is being...
  11. DarthTenebris

    GMS 2 Asset Layer Equivalent of depth=-y

    Hello everybody, Title says it all, is there an equivalent to an object's depth=-y for asset layers? I'm making a 2.5d-ish game, and sometimes I'd like to let the player walk behind objects, however the asset layers are screwing this up. Thank you for your time.
  12. Binsk

    GMS 2 Instance Deactivation and Depth

    Howdy, Alright, so I've always avoided instance deactivation and generally handled the 'deactivation' bit myself. However I am designing an extension that requires I "pause" objects regardless of how the user of the extension has programmed them. Because of this I am trying to use deactivation...
  13. Gizmo199

    3D How do vertex buffers handle the 'z' in vertex_position_3d? [GMS2]

    I posted this on the sub-reddit but I figured id try here as well: So I have a vertex buffer drawing a bunch of sprites that are stacked one on top of the other in a vertex buffer. Each sprite has a "height" that I put into the vertex_position_3d 'z' function. Now everything within the vertex...
  14. N

    Windows [SOLVED] Objects hidden by new empty layer

    Hello, This afternoon, I've been encountering a very weird issue, and I'm not sure if I did something wrong or if it's a bug. Basically, I added in my room a new layer "Blood" which is empty (and filled when killing an enemy) and it made my walls (from another layer) disappear. Walls were still...
  15. Divinik

    GMS 2 [SOLVED] New Update Broke Depth System

    I have a depth system based off of FriendlyCosmonaut's tutorial, and my implementation of it was working perfectly until the newest GMS2 update. So every object affected by the system is a child of the object par_depthObject. Here is the code for the depth handler object var dgrid =...
  16. Daniel Mallett

    GMS 2 Depth

    When you draw somthing then draw something else, the last 'draw' code will cause that to be on top. Is there any way to tell the draw functions which layer I intend for it to be drawn regardless of its chronological position as it were?
  17. N

    Sprite Draw Order - Depth

    So, I have an object A (depth = -2) and it draws itself in the draw event: draw_sprite_ext(sprite_index,image_index,x,y+yoffset,image_xscale,image_yscale,image_angle,c_white,1); Then I have another object, object B (depth = -4) drawing this in the draw event: draw_set_color(c_black)...
  18. matharoo

    GMS 2 Ways to achieve z-depth in 3/4 perspective, with tiles

    Our game is a 3/4 perspective one, with z-axis support. So you can jump around, get on elevated platforms, and all that. It's working, except for the depth system. For the platforms, we have tiles, and each tile layer has its own z position. Here's an example of what we need: The hill and...
  19. Divinik

    GMS 2 [SOLVED] Keep Sprite in Same Position Relative to Obj Scale?

    So I have a simple scale calculator used for scaling active actors relative to their horizontal position on the screen during the battle sequences of the game. The code for that is: battleScale = (distance_to_point(x, camera_get_view_y(camera)))*0.0025; image_xscale =...
  20. A

    GMS 2 Depth in GM:S2

    So I am trying to learn how to make an RPG, using Game Maker 2 on my Macbook. I'm following HeartBeasts tutorials, and so far everything is working out great. Except with depth of the player object, relative to an enemy object. For some reason I just can not get it to work correctly. The effect...