depth

  1. 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...
  2. 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...
  3. 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...
  4. 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.
  5. 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...
  6. 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...
  7. 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...
  8. 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 =...
  9. 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?
  10. 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)...
  11. 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...
  12. 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 =...
  13. 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...
  14. J

    GMS 2 Particles issue [SOLVED]

    So, I am pretty new with Game Maker, and I have been struggling with particle system recently. I did some bunch of code, and it seems to be working, but, for some reason, there are some issues with particles - first, they are not drawn on any light colors and second, they are being overlapped by...
  15. Gigicom

    GMS 2 [SOLVED] Set depth for individual tiles

    Hello Last few days I was searching all over Google for a way of setting the depth (basically like with depth = -y for objects) for an individual tile. I saw lots of threads, but most of them just ended with links to other tutorials that only used the layer depth or the tile_set_depth function...
  16. Erayd

    GMS 2 Binary List Depth Ordering Issue

    I've been working on following this concept on binary lists as depth ordering: https://forum.yoyogames.com/index.php?threads/depth-ordering-in-gms2-priority-list-nested-list-grid-binary-list.13425/ I dived in to bitwise operators and read through several demo scripts by yoyo along with reading...
  17. Sozidar

    GMS 2 How to draw particles not affected by the surfaces above them?

    I know its possible to just draw particle system above the lighting surfaces, but I really need to preserve depth order. Here's a screenshot of current situation: Particles on hand and sword are too dim, but the depth is ok. And here's how they look when being drawn above everything: Bright and...
  18. Sozidar

    GMS 2 Fake 3D Depth Sorting Riddle

    Since fake 3D is harsh on fps I've made so every world chunk generates one huge surface with all of the objects inside it, instead of drawing every object separately. It reduced draw calls by a lot, but now I am out of ideas on how to draw moving objects under or above some of the static fake 3d...
  19. MIchael PS

    Legacy GM Surface depth

    So hello, I want to draw a surface under certain objects. I tried changing the depth of the object that draws the surface, but it doesn't work... Any suggestions? Thanks a lot!
  20. Fixer90

    GMS 2 Auto-Depth System

    To start off, I have an object called settings which is a persistent object that is there at the very start of the game. Is there a way I could set it up to automatically and constantly update every object's depth, such that objects that are lower in a room have a slightly lower depth, making...
Top