Page 1 of 9

[GZDoom]Flat, Wall, and Roll Sprites v2

Posted: Tue Oct 06, 2015 6:33 pm
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.

Re: Flat, Wall, and Roll Sprites v2

Posted: Tue Oct 06, 2015 7:41 pm
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.

Re: Flat, Wall, and Roll Sprites v2

Posted: Tue Oct 06, 2015 8:59 pm
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.

Re: Flat, Wall, and Roll Sprites v2

Posted: Tue Oct 06, 2015 11:59 pm
by Tormentor667
Thanks for this :)

Re: Flat, Wall, and Roll Sprites v2

Posted: Wed Oct 07, 2015 7:37 am
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.

Re: Flat, Wall, and Roll Sprites v2

Posted: Tue Oct 13, 2015 9:19 am
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.

Re: Flat, Wall, and Roll Sprites v2

Posted: Mon Nov 09, 2015 4:07 am
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.

Re: Flat, Wall, and Roll Sprites v2

Posted: Mon Nov 09, 2015 11:32 am
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...)

Re: Flat, Wall, and Roll Sprites v2

Posted: Mon Nov 09, 2015 2:08 pm
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*

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

Posted: Thu Dec 31, 2015 3:44 pm
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.

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

Posted: Sat Jan 02, 2016 8:48 am
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.

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

Posted: Fri Jan 29, 2016 11:20 am
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.

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

Posted: Fri Jan 29, 2016 11:57 am
by Graf Zahl
This one's on hold until after a release.

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

Posted: Wed Feb 10, 2016 6:48 pm
by Major Cooke
Graf: Would now now be a good time for updating this?

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

Posted: Wed Feb 10, 2016 7:09 pm
by Graf Zahl
This will need some work on my part, so maybe this weekend.