can flatsprites stick to slopes?

Sun Oct 17, 2021 2:26 am

decalground.jpg

I have an exploding object spawn a dark ashish burst mark on the ground, and surprisingly got it to work on more or less the first try, but wondered about slopes, and indeed it still acts as if it is on level ground, floating above the floor in one direction and clipping into the floor in the other direction.
I found a forum discussion from 2016 about this that appeared to turn sour despite one of the people seemingly having found a way to do it, but I don't understand those instructions a bit. Do you know if anything new has occurred with regard to that since then? Or a wad with this implemented that I could attempt to rip off the method of?
You do not have the required permissions to view the files attached to this post.

Re: can flatsprites stick to slopes?

Sun Oct 17, 2021 2:37 am

Those weren't instructions for how to do it in a mod, they were about how to implement it in the engine.

Re: can flatsprites stick to slopes?

Sun Oct 17, 2021 3:14 am

This is typically done with models.

Re: can flatsprites stick to slopes?

Sun Oct 17, 2021 12:37 pm

if this is this done typically, could you link to an example of that? if I have this object drop a flat-looking model that will indeed adhere to a slope?

Gez wrote:Those weren't instructions for how to do it in a mod, they were about how to implement it in the engine.

that certainly explains why it doesn't make sense to me! A nice change from having no idea why something doesn't make sense to me.

Re: can flatsprites stick to slopes?

Wed Oct 27, 2021 3:42 am

I recommend switching to models from flat sprites. But otherwise, yes, it's possible to do this in zscript. Slope detection has to be done manually, though.

This is how I do it in Beautiful Doom: https://github.com/jekyllgrim/Beautiful ... in.zc#L105

The function AlignToPlane takes an actor pointer as the first argument, a secplane as second (you can use cursector.floorplane), and the third argument should be true if it's applied to the ceiling.

Re: can flatsprites stick to slopes?

Wed Oct 27, 2021 5:58 pm

thank you for replying! I had temporarily given up on the idea and was content to just keep these particular objects away from inclines. I will see about trying to make sense of that.
is there a way to convert a sprite into a model without buying some additional software for it? I have definitely noticed a tendency for flat ones to appear in front of things that are supposed to be on top of them.

Re: can flatsprites stick to slopes?

Thu Oct 28, 2021 3:08 am

In all honesty, don't use flat sprites!
The feature is broken beyond repair.
There will eventually be a rework to get it right.

Re: can flatsprites stick to slopes?

Thu Oct 28, 2021 6:28 am

bimshwel wrote:is there a way to convert a sprite into a model without buying some additional software for it? I have definitely noticed a tendency for flat ones to appear in front of things that are supposed to be on top of them.


You can use an existing flat plane model and just attach a texture to it via MODELDEF. Again, you can look into Beautiful Doom, I have a flat plane model there, and a MODELDEF definition for the blood pools.

Re: can flatsprites stick to slopes?

Thu Oct 28, 2021 5:48 pm

I have been worried about feeling overwhelmed or inadequate or simply not having time to get very far in relatively recent gzdoom productions, but indeed it is better to learn from examples than to keep asking questions about old features.
I haven't personally found the flat sprites all THAT disruptive, and I don't expect to FINISH this any time soon, considering that I have been making it off and on for almost twenty years, and any improved flat sprite implementation that is coming will probably come first, but swapping a new texture onto an existing flat model sounds like something I can manage and doing so may have other benefits.