Page 1 of 1
pictures and priority ?
Posted: Sat Apr 30, 2016 6:34 am
by binbinhfr
Hi,
I wonder what the "priority" variable in a "picture+filename" of a prototype is used for (with value like "medium", "high", "extra-high").
I thought it was for top-down-layers display priorities, but it does not seem to have that effect.
For example, if I want to create 2 "decoratives" at the same place, but with the first of them always on top of the second one ?
The render_layer seems to have an influence, but it's rapidly limited if you want to deal with the layer-priority of other entities.
So any hint about this display-priority management ?
Re: pictures and priority ?
Posted: Thu May 05, 2016 8:16 pm
by binbinhfr
up.
no idea ?
I still have no explanation about this priority variable...

Re: pictures and priority ?
Posted: Fri May 06, 2016 6:11 am
by Arch666Angel
I had some experiments with layered sprites and what it came down to was: Ignore the priority settings, what really matters is how the sprites are named. So 1name.png is rendered before 2name.png is. Don't know why it behaves like that, but it worked for having multiple layers of sprites on the same entity. My guess is that something like that works for entities that are hardcoded on the same layer level.
Re: pictures and priority ?
Posted: Fri May 06, 2016 7:22 am
by binbinhfr
well i have several type = "decorative" objects, with the same render_layer = "decorative"
in their picture, i have the same priority = "low"
and if i change the filename to test alphabetical order, it does not change the display order.
Infact, when I have numerous objects like this on the map, I can see that display is random : sometimes 1 is on the top of 2, or the inverse...
I tried adding an order = "..." but it does not change anything.
The name of the entity does not change either...
The only trick I found is to place the two objects on the ground with a very small y change of 0.005 (too small to be seen, but enough for the engine to think that one is in front of the other)
I still wonder what are these "priority" variable with low/high/etc...
Re: pictures and priority ?
Posted: Sun Dec 24, 2017 12:56 am
by Cheata
sorry about reviving an old thread but i'm working on a mod with some relation to this question.
My first thought would be that it relates to the render priority, how likely the game is to render the picture compared to other pictures
during periods of poor fps/ups it would determine which objects get rendered first... eg you want things like projectiles and mobs to be high priority but decorations aren't as important so would be low priority
Re: pictures and priority ?
Posted: Sun Dec 24, 2017 6:29 am
by Rseding91
Priority is used when you select sprite quality, anything below normal will start down-scaling sprites at lower priority to save on video memory size and render time.
Re: pictures and priority ?
Posted: Mon Dec 25, 2017 8:53 am
by Cheata
thanks, i knew it had to have something to do with the rendering

Re: pictures and priority ?
Posted: Mon Dec 25, 2017 9:08 am
by posila
It also determines which sprites will be put to sprite atlas on different levels of Video memory usage setting. For example decoratives, which are sprites of small size and are rendered very often should have extra-high priority, so they are included in atlases on any Video memory usage setting.