[GZDoom]Flat, Wall, and Roll Sprites v2

Moderator: GZDoom Developers

Locked
User avatar
Major Cooke
Posts: 8205
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:

[GZDoom]Flat, Wall, and Roll Sprites v2

Post by Major Cooke »

GZDoom Only
ZDoom Compatibility

I thought I'd start a new thread for this.
This is essentially a fixed up version of Nash's pull request. A test.pk3 is included, summon FC in console to see a flattened cacodemon like it was hammered flatter than pancakes.
Spoiler: Screenshot
Spoiler: Why did I rename FLOOR to FLAT?
  • FLATSPRITE - A sprite whose name says it all: flat like vanilla doom's floors and ceilings with changeable angles.
  • WALLSPRITE - Now implements rolling and is exposed for use. Becomes flatter when viewing from the side like a cardboard cutout.
  • ROLLSPRITE - Simply allows rolling to affect the sprite and give it rotation, a la Unreal style.
  • DONTFLIP - Used with FLATSPRITE. When viewing a sprite from behind, it will be flipped (actor's facing the wrong way if they have rotations). This prevents it and instead draws the sprite unflipped from behind.
Attachments
test.pk3
Summon FC in console.
(7.72 KiB) Downloaded 377 times
Last edited by Major Cooke on Sun Jun 05, 2016 2:25 pm, edited 13 times in total.
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

Re: Flat, Wall, and Roll Sprites v2

Post by GFD »

Why limit the rendering of non-billboarded sprites to only straight vertical and horizontal? Something like PITCHSPRITE sounds more useful, where you can simply pitch sprites by using the existing "pitch" variable, like how ROLLSPRITE works.
User avatar
Major Cooke
Posts: 8205
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: Flat, Wall, and Roll Sprites v2

Post by Major Cooke »

I didn't make this. Fgsfds did, and Nash ported it over. I just happened to be tidying up after him for the reasons Randi rejected it in the first place, because Nash upped and quit. You should ask them.
User avatar
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: Flat, Wall, and Roll Sprites v2

Post by Tormentor667 »

Thanks for this :)
User avatar
Major Cooke
Posts: 8205
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: Flat, Wall, and Roll Sprites v2

Post by Major Cooke »

You're welcome. I was not about to let a feature die just because someone gave up, not one that happens to be so useful especially.
User avatar
Major Cooke
Posts: 8205
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: Flat, Wall, and Roll Sprites v2

Post by Major Cooke »

gamefreakdude wrote:Why limit the rendering of non-billboarded sprites to only straight vertical and horizontal? Something like PITCHSPRITE sounds more useful, where you can simply pitch sprites by using the existing "pitch" variable, like how ROLLSPRITE works.
Actually that's what WALLSPRITE does, now that I went back over the code again.
User avatar
StrikerMan780
Posts: 486
Joined: Tue Nov 29, 2005 2:15 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Flat, Wall, and Roll Sprites v2

Post by StrikerMan780 »

Flat/Wall aligned sprites? Cool. This would be very useful for plants, trip mines, and wall-mounted interactive props. I can also imagine an enemy that moves along a wall, then pulls itself off the wall when it's ready to attack. This could also make the build engine map loader in ZDoom (yes, there's one there) much more effective.
User avatar
Shadow Hog
Posts: 173
Joined: Fri Aug 14, 2015 8:56 pm

Re: Flat, Wall, and Roll Sprites v2

Post by Shadow Hog »

Personally I'm thinking flat sprites would be really handy for Duke 3D-esque footprints - at least, if the Z-fighting issues the GLOOME version had are addressed. (Being able to angle them for slopes would be nice, too, but not strictly necessary...)
User avatar
phantombeta
Posts: 2159
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Flat, Wall, and Roll Sprites v2

Post by phantombeta »

@Shadow Hog
Eeeeeeh... IIRC Randy was working on Duke3D style wall and floor sprites. (Literally sprites rendered with the wall and floor/flat renderer, I believe) In fact, I think there was a rendering glitch in ZDoom (And I think GZDoom too?) where the sprites would glitch because something got derped on the code...
I believe that could maybe be used for Duke3D style footprints and better floor decals that work in ZDoom too...
(Obviously, it is something that would work in ZDoom too/wouldn't need GZDoom/a hardware renderer, considering it was Randy who was working on it...)

However, we'll only possibly see/hear anything about that next eternity when she stops playing Bloodborne. Something that will never happen, just like DoomScr- *brick'd*
User avatar
Major Cooke
Posts: 8205
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

Post by Major Cooke »

Okay, good news. It was actually a lot simpler than I thought. Kudos to fgsfds for helping.

+PITCHFLATSPRITE now supports actor rolling.

I've uploaded a binary build + test package both on the first post and here for testing convenience.
User avatar
Major Cooke
Posts: 8205
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

Post by Major Cooke »

New property and function added for submission.
A_SetFlatAngle sets the value in floating point. The property, FlatAngle, can be accessed with decorate parser expression functions.

Flat Angle is an angle which the flattening is done upon for WallSprite and PitchFlatSprites only.

All it does is rotate the angle in which the sprite is flattened against. Specifying 90, for example, will flatten the sprite along the side so viewing it from the front or back will make the sprite be flattest. The default is 0, meaning from the front.

Useful for things like signs or making actors out of multiple sprites, such as 2.5D armor.

I also saw this as a need so modders don't have to make a whole bunch of sprite rotations just to achieve a small effect.

EDIT: Whoops, forgot to post the new test.pk3 package. This one's newer with use of A_SetFlatAngle which demonstrates its usage.
User avatar
Major Cooke
Posts: 8205
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

Post by Major Cooke »

Okay. I'm going to update this one more time. However, after that...

Graf, if you do not mind, can I simply hold off on updating this further until you decide to turn your interest towards it? With so many things changing along with the portals, I get the feeling you're going to wait until after they're complete.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [GZDoom]Flat, Wall, and Roll Sprites v2

Post by Graf Zahl »

This one's on hold until after a release.
User avatar
Major Cooke
Posts: 8205
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

Post by Major Cooke »

Graf: Would now now be a good time for updating this?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [GZDoom]Flat, Wall, and Roll Sprites v2

Post by Graf Zahl »

This will need some work on my part, so maybe this weekend.
Locked

Return to “Closed Feature Suggestions [GZDoom]”