Flatsprites have pixel stretching applied to them

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Axensus

Flatsprites have pixel stretching applied to them

Post by Axensus »

Tested on g4.13pre-144-g326480cb3. According to the code, flatsprites or actors with +SQUAREPIXELS should have square pixels. They don't in both cases.

Steps to reproduce:
1. Get https://gitlab.com/accensi/deathstrider ... bug-report
2. Start on whatever map as Solomon (because you need magic for this).
3. netevent DS_Debug_Bridge
4. Stand inside the sigil to spawn a bridge whose sprites overlap with each other. That is not the case in 4.12.2. The segments should be evenly spread apart, like with Barrier (do step 3 but don't be touching the sigil when it triggers).
User avatar
Rachael
Posts: 13836
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Flatsprites have pixel stretching applied to them

Post by Rachael »

+FlatSprite is fixed, but how is +SquarePixels broken? Note that the game tries to resize the sprite slightly so it will not match its map units in either direction since it tries to find a compromise between 1:1 and 1:1.2
Axensus

Re: Flatsprites have pixel stretching applied to them

Post by Axensus »

I don't know if it actually is broken. Only mentioned it because I tried adding it to the actor with the hopes that it'd fix things. Honestly not sure what its use case even is. On graphics that are designed for 1.0 pixel ratio (e.g. the vertical barrier's wallsprite), adding it to the actor squishes it so it doesn't look good on 1.2, and vice versa. Do you have an example on when it's a good idea to use the flag? I'm genuinely confused in that regard.
User avatar
Rachael
Posts: 13836
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Flatsprites have pixel stretching applied to them

Post by Rachael »

One of the contributors requested that flag because with the rolling sprite changes he was no longer able to apply the same math to match his rolling sprites so he wanted a flag that would squish the pixels down exactly the same way rolling sprites do without the extra math overhead that rolling sprites have. So that flag was added.

Rolling sprites have to be square pixels because they were changed to not be stretched by the level's pixel scaling anymore. GZDoom tries to approximate the original size by finding a compromise between 1.0 and 1.2 (specifically it takes the square root of 1.2 and multiplies/divides that in either direction)
Axensus

Re: Flatsprites have pixel stretching applied to them

Post by Axensus »

Ah, okay, I understand now. Thank you for the info and the quick fix. I'd say case closed then since +SQUAREPIXELS works as expected on non-rollsprite actors from what I tested.
User avatar
Rachael
Posts: 13836
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Flatsprites have pixel stretching applied to them

Post by Rachael »

Sounds good, thank you.

Return to “Closed Bugs [GZDoom]”