Questions tagged [sorting]
The sorting tag has no summary.
42 questions
0
votes
2
answers
256
views
How to set ordering between Sprites and Images?
Assume that you have an Empty Object, which holds a Canvas. This canvas has 2 Image component, Background and ScoreUI. Background is just an image for background, a nice picture. ScoreUI is aimed to ...
2
votes
2
answers
447
views
Topological sorting optimization
I'm creating a 2d isometric game that uses topological sorting to correctly depth sort all of the oddly-shaped isometric objects. I spent a lot of time writing this from scratch, and it works great. ...
0
votes
1
answer
118
views
Vertex sorting to match triangle list definition of an hexagon
I’m working on a project to display molecules with DirectX that I’m updating regularly to add visual effects. The one I’m working on is simple: display a flat transparent hexagon that match a ...
0
votes
0
answers
347
views
Render Queue Sorting - Best method for generating sorting IDs
I'm trying to implement a method for sorting my renderable items before drawing them into screen. To do so, I have been tinkering with the idea of using an 64 bit key to store the state of each ...
0
votes
1
answer
293
views
How to sort leaderboards, given wins and total games played?
The game is card game. The only results I get is wins and TGP (total games played). Losses = TGP - wins. I want to rank the players in the most fair way without making it too complex. What I have ...
0
votes
0
answers
23
views
Sprite sorting is working fine but tilemap sorting is working the opposite way I want it to [duplicate]
I provided some screenshots to display what I'm talking about. The blue tile is a sprite, and the bushes are made from tilemap, each being 4 16x16 tiles. My transparency sort axis is set to 0,1,0. I'...
0
votes
1
answer
784
views
How should I store the objects to render?
From what I understand, in order to show all elements of a 2D game in the proper way, I need to render them in order, from the further away from the camera to the closest. So I should sort them by ...
0
votes
1
answer
190
views
how to order entities by their distance from 0 on the x axis
I'm creating an infinite runner game in which you control several characters at once. Right now when you press the spacebar, they all jump at once but, I want them to jump at separately, one after ...
1
vote
1
answer
868
views
How to sort polygons without a depth buffer
Please help me getting understanding how did they sort polygons in old games from the eighties.
They did not use z-buffer or anything like this, thats for sure.
Please look at the screenshot. How ...
2
votes
1
answer
2k
views
Issue with Sorting Layers with an NPC and Tilemap
I have a weird thing happening, that I can't quite explain. I have two scenes, my starting town, and an Arcanist's shop. When I go into the Arcanist's Shop, the Arcanist NPC stays on the same ...
0
votes
1
answer
513
views
How can I sort a list of integer pairs in sequence?
I have a list of paired integers, every nth integer paired with every nth+1 integer. I'm trying to sort the list such that the pairs form a chain. For example:
Input:
{12,72, 38,2, 72,38, 2,12}
...
1
vote
0
answers
770
views
How to sort cards' on-screen positions by their suit?
I have a 13 cards and sort button.
When I click that button, I want all the cards of each suit to be grouped-together on screen. So if I have 4 diamond cards in my 13-card hand, all 4 diamonds must ...
0
votes
0
answers
53
views
walking up/down slowed by z coordinate layering
I am making a 2D topdown sprite game. I got myself a controller script that handles input and makes the character move/attack etc. I eventually added objects you could walk in front of or behind, like ...
0
votes
1
answer
239
views
Array with multiple linked objects in Unity
This might be too primitive, but for my use case, I need to maintain an array in which two attributes are linked to each other... For example - If I want to do Score gathering... Then I need an array ...
2
votes
1
answer
1k
views
In Unity, why do I get a "does not implement right interface" error when trying to sort my list of objects?
I am trying to create a crafting panel that sorts the list of items you can make alphabetically, yet I cannot figure out why .Sort() is not working.
What I have ...
0
votes
0
answers
281
views
Using Sorting Layers with 3-d meshes
I have 3 layers of objects in a game that I am working on. The layers are the "map" layer (Background), "UI" layer (Labels, etc), and the "Object" layer (Movable objects). I am working on a 2-D game, ...
0
votes
2
answers
12k
views
Why is my TextMesh always on top?
I have a 2-d game that I am making, using 3-d assets, including TextMeshes for text. I have decided that in some instances, I would like to have the TextMesh appear behind objects in the foreground. ...
4
votes
1
answer
1k
views
Reorder a set of points in order to draw a triangle fan (example)
I'm doing a light engine (c++, using sfml), and to connect the light vertices, I thought about drawing a triangle fan.
Here is a representation of a triangle fan (sfml documentation):
The points HAVE ...
1
vote
1
answer
590
views
Drawing order of 2D tiles with 3D bounding volume
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 ...
6
votes
2
answers
10k
views
How do I determine the draw order of isometric 2D objects occupying multiple tiles?
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 ...
2
votes
1
answer
177
views
Why do the order of uniforms gets changed by the compiler?
I have the following shader, everything works fine when setting the value of one of the matrices but I've discovered that getting a value back is incorrect for View ...