[GZDoom]Flat, Wall, and Roll Sprites v2
Moderator: GZDoom Developers
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
And the other 2 questions?..
Also, any chance of slope-aligned FLATSPRITES?
Also, any chance of slope-aligned FLATSPRITES?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
I'll be blunt here: The flat sprites are inherently limited by how they are created and how they need to interact with the level geometry. I fear what's there right now is the best you can get.
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
Because flipping XY coordinates of the scaling matrix and adding a slight z-offset when FLATSPRITE thing height matches floor height is ABSORUTERY IMPOSSIBURU to do with the current implementation?.. What a shitty implementation you've got there, oh my!
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
Don't ask me why it was flipped. That's a question for Major Cooke. And the offset should already be in, but it won't help you with overlapping flat sprites. I can't endlessly stack those offsets to accomodate every scenario.
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
Graf Zahl wrote:the offset should already be in

- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
That's unintentional. This will fix it.Graf Zahl wrote:Don't ask me why it was flipped.
As for plastering to a slope, there's absolutely nothing I can do there. Sorry.
Confirmed, the z-fighting with floor still happens.
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
Here, have a detailed guide of what you can't do:Major Cooke wrote:As for plastering to a slope, there's absolutely nothing I can do there. Sorry.
1. You can't add a private secplane_t variable to the GLSprite class.
2. You can't store either rendersector->floorplane or rendersector->ceilingplane in said variable after rendersector is determined in GLSprite::Process() (you can't do it only when the sprite is aligned with either floor or ceiling and has no custom roll applied).
3. You can't use secplane_t.ZatPoint(x, y) in GLSprite::CalculateVertices to align the sprite to the slope.
4. Here's how you can't do it:
Code: Select all
v[0] = mat * FVector3(x2, alignplane.ZatPoint(x2, y2), y2);
v[1] = mat * FVector3(x1, alignplane.ZatPoint(x1, y2), y2);
v[2] = mat * FVector3(x2, alignplane.ZatPoint(x2, y1), y1);
v[3] = mat * FVector3(x1, alignplane.ZatPoint(x1, y1), y1);
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
Because I coded a 15-minutes barebone implementation without any safety checks? Because I have no C++ experience? Because I already have GZDB to worry about and nobody willing to contribute any code to it? (except boris. Boris is cool. But rare. And focused solely on new plugins).Major Cooke wrote:Then why didn't you make a pull request yourself and do it instead of trying to thrust it upon Graf or I? Or send me the code files directly?
I don't know how to do a LOT of this crap, okay? I'm NOT a very good programmer when it comes to the engine. This has been evident from the complete fuck-ups that have happened with flatsprites.
That's why I said "there's nothing I (as in ME) can do".
Major Cooke wrote:I don't know how to do a LOT of this crap, okay?
Well, this makes 3 of us...Graf Zahl wrote:I'll be blunt here: The flat sprites are inherently limited by how they are created and how they need to interact with the level geometry. I fear what's there right now is the best you can get.
- Tormentor667
- Posts: 13554
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
Don't argue guys 

- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
You do know I only maintained Nash's original submission which was a combination of fgsfds's and marrub's works, right? It was all completely broken implementation from the very getgo (except for wall sprites), and that in turn lead me to make adjustments from the basis of broken code itself. Even Nash was weary of his original submission.MaxED wrote:Well, this makes 3 of us...
It took me a week to fix the flat sprites because I don't know what the hell I'm doing in there for the most part. If you want something done RIGHT, you may have to do it yourself sometimes. Graf already had to do a lot of work on it.MaxED wrote:Because I coded a 15-minutes barebone implementation without any safety checks? Because I have no C++ experience? Because I already have GZDB to worry about and nobody willing to contribute any code to it? (except boris. Boris is cool. But rare. And focused solely on new plugins).
At any rate, a flag to toggle this behavior would be best suited. However there is also the problem of the sprite overlapping onto other plains like the floor there.
It's not the arguing that's the problem.Tormentor667 wrote:Don't argue guys
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
I already got that you can't do it. I even provided you with an easy 4-steps guide on how exactly you can't do it. You can stop whining now.
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
I was trying to get you to drop the sarcasm. Yet here you are, still being rude. And if you be rude to the people who give you good things, you should know obviously well you might get nothing in return.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [GZDoom]Flat, Wall, and Roll Sprites v2
Enough of this shit!
@MaxEd: The difference between you two is that Major Cooke actually made some contributions even though he admitted that it was hard for him. I haven't seen you contributing much to ZDoom itself so please drop that attitude. Just because you happen to develop a good editor doesn't give you the right to talk down to other programmers here.
@MaxEd: The difference between you two is that Major Cooke actually made some contributions even though he admitted that it was hard for him. I haven't seen you contributing much to ZDoom itself so please drop that attitude. Just because you happen to develop a good editor doesn't give you the right to talk down to other programmers here.