I've been playing through the descent games recently and one thing I've noticed is that the engine has automatic collision handling for textures with transparent parts. For example, a bar texture has opaque parts representing metal bars that block both projectile and hitscan attacks but it also has transparent areas between the bars which allow hitscans to pass thru as well as projectiles small enough to fit thru the gaps.
I can't think of any simple way of replicating the effect in GZDoom right now. It would be incredibly useful if there was a way to flag two side lines to treat fully transparent parts of a texture as non-blocking to both actors and hitscans, while at the same time, opaque parts do block actors and hitscans.
Descent Like Collision Detection For Textures With Transparency
Moderator: GZDoom Developers
-
- Posts: 303
- Joined: Fri Feb 21, 2014 5:04 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Montana, USA
-
- Lead GZDoom+Raze Developer
- Posts: 48989
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Descent Like Collision Detection For Textures With Transparency
For hitscans such a thing is doable - but for full actors it'd require complex checks against the texture and the engine is simply not equipped for that.
-
- Posts: 2070
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Descent Like Collision Detection For Textures With Transparency
A problem I can see with this is that it'd make textures matter for MP sync. Right now, textures are clientside and don't cause desyncs, so using texture packs is perfectly fine. I'm not sure that would be worth giving up for a feature that, by its own nature, can't really work that great outside of hitscans.
-
-
- Posts: 26494
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Descent Like Collision Detection For Textures With Transparency
I might also feel counter-intuitive that the instant, invisible (and logically very small) hitscans sometimes get blocked but the slower, bigger, more visible plasma bolts, fireballs etc. are not impeded.
-
- Posts: 303
- Joined: Fri Feb 21, 2014 5:04 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Montana, USA
Re: Descent Like Collision Detection For Textures With Transparency
Would it be feasible to only check for a projectile actor's absolute position and ignore its radius and height when checking for collision with a transparent texture or would that still be too much for the engine?
-
- Posts: 21703
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
Re: Descent Like Collision Detection For Textures With Transparency
I would honestly go with projectiles being blocked absolutely by such textures, assuming things like fences, bars, and windowpanes, and the majority of Doom engine projectiles generally being large enough to get caught on something like that. Sure, it wouldn't make sense on larger windows or very small projectiles (like my bullet tracers), but that's just the nature of the beast on an engine like this.