Skip to main content

Questions tagged [draw-order]

For questions pertaining to the order in which sprites, tiles or other graphics are rendered.

Filter by
Sorted by
Tagged with
0 votes
0 answers
297 views

I am using OpenGL to render sprites, using an orthographic projection. Each sprite has a position: (x, y, ...
Eilan Laken's user avatar
0 votes
0 answers
69 views

Recently, I have been working on a small "pet-project" of mine in C using the SDL library. I have noticed that without my render-calls, my project takes up 2% of the CPU and with the render-...
Renadil's user avatar
0 votes
1 answer
152 views

I would like to change the layer depth of objects, so that the player can go behind them. Right now it looks like this when the player is behind the object: The problem is that the layer depth doesn'...
Kuvaitt's user avatar
0 votes
1 answer
407 views

I'm encountering a design challenge while developing my 2D C++ OpenGL engine. I'm using a batching technique for rendering my drawable objects, and I want to ensure they are drawn in the same order ...
DDD's user avatar
  • 11
0 votes
1 answer
970 views

I'm writing my own 2D engine using MonoGame and I want to be able to draw 2D primitives (using DrawPrimitives) along with sprites using SpriteBatch. But when I draw them, the primitives are always ...
DragonSpecter's user avatar
0 votes
1 answer
2k views

I'm trying to create an isometric tilemap world in Godot 4 beta 4. The world is made of blocks on top of each other where for every Y level (thinking the world like if its in 3D coords) there is a ...
Crih.exe's user avatar
  • 111
0 votes
1 answer
48 views

What will happen if I intend to display the hidden surface after clearing the window, draw the game objects, and then display the window again? Am I watching the drawing process of the objects? Is ...
Đạt Phạm's user avatar
0 votes
0 answers
26 views

I have a top down Tiled map, and I would like to extract every single tile from the map and set z order layer according to the Y position they have, I have already found the way to have every single ...
Amedeo Braggio's user avatar
1 vote
0 answers
697 views

I am working on a 2D shmup that requires rendering thousands of animated bullets and animated medals on screen at the same time. I use a standard pooling method to activate and deactivate these ...
DyingIsFun's user avatar
  • 1,337
1 vote
1 answer
421 views

Say you're rendering a 2D top-down tile map and there are some objects in the tile map that the player should be "in front" of when below them, and "behind" when on top of them. ...
Ryan Peschel's user avatar
2 votes
1 answer
4k views

I am using Unity 2019 with the Universal Render Pipeline. I have a canvas that is using Screen Space - Overlay render mode. I cannot change my render mode to Screen Space - Camera, because it is not ...
Evorlor's user avatar
  • 5,881
0 votes
1 answer
131 views

How do I make the non-sprite (BasicSpellProjectile) render in front of the sprite (Tower 2)? Note: The camera is located at z=-10. The z positioning apparently ...
Sebastian Nielsen's user avatar
1 vote
1 answer
244 views

I'm developing a game to learn more about Java, and I've run into a problem: My character (the guy) moves, but I can not figure out how to automatically change the order of how the sprites are drawn. ...
Aubrey Champagne's user avatar
2 votes
2 answers
598 views

Hi recently i am trying to implement z ordering system into my directx framework. So every object will have z order property(int), and this value will have higher priority than depth checking for ...
KIM CHANGJUN's user avatar
1 vote
2 answers
3k views

I'm using LWRP in Unity 2019.1.12f1. The UI is in Screen Space - Camera. The shader used for the particles is Lightweight Render Pipeline/Particles/Unlit (Transparent, Premultiply). Any ideas?
mr-matt's user avatar
  • 2,779
1 vote
0 answers
777 views

I have a Player game object with a sprite renderer and a line renderer. The sprite for its body and the line for a rope. The problem is that the rope isn't visible (I can see it's drawn in the scene ...
Daniel Marques's user avatar
0 votes
1 answer
547 views

I've been working on a custom tile-based map editor for a while now, and everything works as expected, or so I thought until I've tried rendering the actual map including the dynamic objects as well. ...
TheDBeetle's user avatar
1 vote
1 answer
3k views

This is the code I am using but it's not working. It drags other object on collision: ...
King Kong's user avatar
9 votes
3 answers
11k views

I'm wondering how drawing simple geometry with textures can eat up so much performance (below 60fps)? Even my good graphics card (GTX 960) can "only" draw up to 1000 sprites smoothly. The textures I'm ...
kalidali's user avatar
  • 333
0 votes
1 answer
195 views

When you are looking at this image: the player is standing behind the tree. I know that can be accomplished by drawing the background first the player second and the upper tree part after that. The ...
Nimmi's user avatar
  • 21
1 vote
0 answers
72 views

I'm trying to draw a 'axis' model named 'XYZ'. The problem is that it is rendered wrong (screenshot below). You can see that the blue face can be seen through the red face. The black, green and red ...
NicusorN5's user avatar
1 vote
1 answer
1k views

I am not sure but I think it's a problem with Windows 10 borderless windows The problem is when I draw the circle its always drawn with a little offset from where it should be. In the top of the ...
shuji's user avatar
  • 113
0 votes
1 answer
1k views

how is it possible to draw the player behind and in front of some building in an isometric map : should I slice them, replace the number in the map (one number for a tile usually) by an array of ...
Reign Ravel's user avatar
0 votes
1 answer
2k views

I'm using a line renderer as a laser aim for my character. If the aim hits an object it ends at that object. If the aim doesn't hit an object it continues a predefined distance. If I aim at an object ...
Unresolved External's user avatar
1 vote
1 answer
15k views

I have 3 cameras and 3 canvases. Back Camera: depth = -5, Back Canvas: Sorting layer - BackLayer, Camera: depth = 0, Middle Canvas: Sorting layer - MiddleLayer, Camera: depth = 10, Front Canvas: ...
Jacob's user avatar
  • 2,552
1 vote
1 answer
881 views

When creating ECS based game engine, do you (or can I) create multiple rendering systems? Let's say I have an Entity class which is the basic unit in my engine, all it can do is add, remove and get ...
dovicz's user avatar
  • 191
0 votes
1 answer
1k views

I'm making a simple top down (like this) tile based game (using JavaScript, for reference) I use Tiled for making maps. I have sprites that are more than one tile high, and so whenever they are in ...
Oliver's user avatar
  • 151
0 votes
1 answer
3k views

I have a particle system, and my character, which is a sprite. I want to create a particle for smoke/dust raising from the ground, and I want my character to be able to move over it. The problem is ...
Leo's user avatar
  • 1,585
2 votes
1 answer
610 views

Note: I dont use tiles, I use 3D Polygons :) I'm currently working on a real-time renderer for scanned real life objects. My main goal is to have an isometric viewer with the simple ability to rotate ...
KoalaGangsta's user avatar
1 vote
0 answers
797 views

I'm currently working on making a simple SDL2 game (written in C++) where the maps are comprised of sprite voxels (essentially just a png of an isometric cube). Game entities move in 3D space. The ...
Xoanon's user avatar
  • 33
1 vote
0 answers
117 views

I have a rendering system that extends SortedIteratingSystem and created a comparator to sort the sprite draw order. But the problem is when I update the z index, it takes some time before it changes ...
ronscript's user avatar
  • 501
1 vote
2 answers
2k views

The below 1st image is the example how I render tiled map with player, I can properly change the player z index, If I want to make the player below the box i just set the z index to 0. But the problem ...
ronscript's user avatar
  • 501
0 votes
0 answers
375 views

I've been looking through several different Order Independent Transparency algorithms. But very few of them seem to answer a few things. I understand that the idea of OIT is to not worry so much ...
moonshineTheleocat's user avatar
1 vote
0 answers
159 views

I am making an isometric game where I have moving Entities's not bound to tiles, and a 3d ArrayList map which is populated by <...
Colourfit's user avatar
  • 141
1 vote
2 answers
5k views

What I am in need to achieve is to have a Sprite always facing the camera identically to what happens with any simple game UI object, but instead of always displayed above everything else, it should ...
Kim Shutter's user avatar
5 votes
2 answers
903 views

So, here is what I am trying to do in Unity 5 (using C#). I want to draw a a 2D circle at the background of a 3D scene and apply a texture/image to fill it. Just like it would be if the circle was in ...
Louis15's user avatar
  • 569
2 votes
0 answers
304 views

I'm interested to know how others would do / have done this. Part 1. Constraints. My current renderer is being built to support OpenGL ES 2.0 primarily and so aims for performant mobile as well as ...
Engineer's user avatar
  • 30.4k
1 vote
1 answer
590 views

I'm wondering which algorithm was used to draw the sprites of the video game Commandos in the correct order. Each sprite has a 3D bounding volume (either a polygon or a cylinder), this is how the ...
h3k's user avatar
  • 11
6 votes
2 answers
10k views

My current sorting method works only for objects that occupy 1 tile and fails for multi-tile objects. For examle, the bed in the above picture occupies 1×2 tiles, and the sorting fails. Also that bed ...
Matthew's user avatar
  • 399
1 vote
2 answers
2k views

I am trying to figure out the most efficient way to draw sprites in a way that they layer properly based on their Y position. Lets say I have four objects of the same class named A, B, C, and D, and ...
anonymous_asker's user avatar
5 votes
1 answer
765 views

The problem: I can't fit all my 2d animation sprites for all units and environment in 1 spritesheet. Everything batches fine until I use two spritesheets... I noticed the following : all units from ...
Ruben O's user avatar
  • 81
2 votes
0 answers
1k views

I am new to unity3d and want to develop a simple game like crazy cabie. I have to implement a z-index parallax for moving sprites towards the player and generating new sprite at the farthest z-index. ...
Nasir Mahmood's user avatar
5 votes
2 answers
7k views

From other frameworks I know methods for easy ordering sprites within a spritebatch (to determine if a sprite has to be drawn in front or behind another sprite). For example in MonoGame/XNA this is ...
Sebastian's user avatar
  • 197
1 vote
1 answer
2k views

I'm trying to write a 2D isometric scene. Rendering order is complex, since both tilemaps and sprites are different concepts. Rendering one of the 2 before the other will draw the scene incorrectly. ...
Sidar's user avatar
  • 3,587
3 votes
1 answer
2k views

I'm in the process of constructing a custom 3D triangle mesh. I found the vertices of the triangle in the 3D space and it's face normal. How do I find the acyclic order of vertices? If I draw the ...
cegprakash's user avatar
0 votes
2 answers
3k views

How can I draw many different objects on screen at once, with multiple vertex buffers, using DrawIndexed()? (Drawing the same object is simple, and I'm not looking ...
Rashid Ellis's user avatar
2 votes
2 answers
567 views

I'm playing a video in Andengine on @Override protected void onSetContentView() {} However, when I place a sprite on the screen at some point in time, it is ...
KOTIOS's user avatar
  • 131
1 vote
3 answers
3k views

In this thread Rendering a model with transparent or translucent uv map applied doesn't work , I asked about what was wrong with my model that the transparency wasn't working. I've got an answer ...
Kipras's user avatar
  • 301
0 votes
1 answer
684 views

Here is the setup. I have a orthogonal tile map made with Tiled. There are 5 layers. The bottom 4 comprise the background, while the top layer is the foreground that I will refer to as the “tree” ...
Pluvius's user avatar
  • 311
9 votes
2 answers
2k views

I want to be able to do what you see in the image, but with a single wall. The player should be able to walk on either side of the same object. That is, the same wall is below the hero when I go down ...
Xkynar's user avatar
  • 601