SpriteShadow (Duke3D Shadows) v1.85 [more optimization!]

Post your example zscripts/ACS scripts/etc here.

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby dpJudas » Wed Mar 22, 2017 6:45 am

Well, I wouldn't implement shadows this way because it could cause the shadow sprite to overlap a nearby sprite.

What you are describing sounds a bit like glPolygonOffset, except just for sprites' depth sort value. It is essentially just a value to add - in the software renderer to VisibleSprite::idepth before sorting is called. I don't think this will be very good for shadows, but maybe it will be useful for other things. Either way, it probably just requires a idepth += actor->ZDepthSortOffset at the right location.
dpJudas
 
 
 
Joined: 28 May 2016

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby MrDowntempo » Wed Mar 22, 2017 7:36 am

Could the original Sprite be subtracted from the shadow? That would make the shadow transparent where the original Sprite shows up which would make the shadow seem like it was behind the Sprite
MrDowntempo
 
Joined: 01 Mar 2017

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby ZZYZX » Wed Mar 22, 2017 8:07 am

dpJudas wrote:Well, I wouldn't implement shadows this way because it could cause the shadow sprite to overlap a nearby sprite.

I'm pretty sure that's what Duke does. Perfect compatibility! :D.
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby Nash » Wed Mar 22, 2017 12:12 pm

Plus there's this Nash's modular clothing that actually requires having actors on the front of the base one.


Yeah about this - every day I get the funny feeling that this is relying on some undefined behavior (I basically control the layer order by specifically defining the spawn order of the clothe pieces) and one day this will just stop working and my characters will start running around with their bodies being drawn in front of the clothes... :mrgreen:
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby Major030 » Thu Mar 23, 2017 3:12 pm

Sorry for being a noob but how do i use this mod? The .zip file had no pk3 or WAD in it so idk...
Major030
 
Joined: 14 Dec 2016

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby Nash » Thu Mar 23, 2017 5:51 pm

Major030: Just drag the ZIP on to gzdoom.exe

And actually, my file was packaged wrongly (I meant to give it the PK3 extension, not ZIP :< My bad, will fix for next version)
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby Major030 » Thu Mar 23, 2017 6:23 pm

i did that and i got this error message
Script error, "dukeshadow 1.2.zip:zscript.zsc" line 1:
Unexpected identifier
Expecting end of file or 'include' or 'extend' or 'class' or 'struct' or 'const' or 'enum'Execution could not continue.1 errors while parsing dukeshadow 1.2.zip:zscript/dukeshadow.zsc
EDIT: nvm it works on gzdoom 2.4 but not the devbuild i have, strange.
Last edited by Major030 on Thu Mar 23, 2017 6:28 pm, edited 1 time in total.
Major030
 
Joined: 14 Dec 2016

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby Nash » Thu Mar 23, 2017 6:26 pm

If I had a penny... :P

Please use GZDoom 2.4: viewtopic.php?f=1&t=55739
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Duke3D-style Shadows 1.2 [final, works on all monsters/m

Postby Major030 » Thu Mar 23, 2017 6:29 pm

omg you sent that as i edited my post lol, btw great mod
Major030
 
Joined: 14 Dec 2016

Re: Duke3D-style Shadows v1.3

Postby Nash » Sat Mar 25, 2017 9:18 am

Update March 25th 2017 (version 1.3)

- Fixed shadows not appearing on players when exiting and entering new levels
- Fixed player shadow build-up in multiplayer
- Your player's own shadow will no longer be drawn in first person (very evident in laggy multiplayer games - the shadow's position cannot update seamlessly with the prediction-adjusted player position)
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Duke3D-style Shadows v1.3

Postby Pompous Seed » Sun Mar 26, 2017 11:11 am

Okay, so... have the shadows always had issues with lifts? I haven't checked this out in a while, so I just popped in and decided to see how the new version works. I discovered that if a monster is on a moving lift (up or down), the shadow "lags" behind the monster, and doesn't catch up until the lift stops. As the lift descends, the shadow hovers in the air; as the lift ascends, the shadow sinks into the floor.

EDIT: It seems that adding +MOVEWITHSECTOR fixes the problem.
Pompous Seed
 
Joined: 05 Aug 2016

Re: Duke3D-style Shadows v1.3

Postby Hellser » Mon Mar 27, 2017 8:33 pm

Nash wrote:Update March 25th 2017 (version 1.3d)


Fixed that for you. :D

But honestly, I quite like the concept of this mod. Keep up the great work, Nash.
User avatar
Hellser
Misdreavus used Psybeam!
 
Joined: 25 Jun 2006
Location: Mount Silver
Discord: Hellser#8156

Re: Duke3D-style Shadows v1.3

Postby Nash » Sat Apr 15, 2017 8:04 pm

Mini update coming soon. Will fix the lift bug and a bug that accumulates the player's shadow in hub levels (I could sworn I already fixed this...)

Thanks for the idea, Hellser. >8D
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

Re: Duke3D-style Shadows v1.3

Postby sylandro » Wed Apr 26, 2017 12:10 am

I think I found another bug. When playing cooperative, I cannot see the other players' shadows, only my own (the same goes for them: they can only see theirs and not the other players). I did a printinv and everyone has the Z_ShadeMe item, Also, when a player respawns, the shadow becomes visible. It's weird.

The monsters are working fine, though.
sylandro
 
Joined: 17 Feb 2015

Re: Duke3D-style Shadows v1.3

Postby Nash » Wed Apr 26, 2017 1:20 am

Thanks! That's probably some noob-tier (on my part) if/else oversight I suspect. Will be fixed in next version. :D
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia GTX or Quadro with Vulkan support

PreviousNext

Return to Script Library

Who is online

Users browsing this forum: TweetMeme [Bot] and 1 guest