Page 6 of 9

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

Posted: Mon Jun 20, 2016 5:09 pm
by DBThanatos
Can we expect to have this stuff added soonish? :P

This will come incredibly handy for a few projects!

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

Posted: Tue Jun 21, 2016 8:34 am
by Major Cooke
I hope Graf will look into it too.
And I have managed to implement the DONTFLIP flag so he doesn't need to deal with it himself.

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

Posted: Fri Jun 24, 2016 6:50 pm
by maseter
Major, could this be used to do rotating 2D sprite items, like:
https://abload.de/img/2drotatevwpav.gif

As seen, and taken, from the Ghost in the Shell FPS for the Sony PSP:

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

Posted: Fri Jun 24, 2016 7:12 pm
by Major Cooke
Please put your gifs in a spoiler. It's making my browser lag.

And, yes, that's the whole point, to rotate 2D sprites. Wouldn't look very good but whatever floats your boat. :P

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

Posted: Sat Jun 25, 2016 1:20 am
by maseter
>Wouldn't look very good but whatever floats your boat.

It looks good in that psp game, certainly better than something always facing the player.

Sorry for the GIF, who knew those could lag, it didn't on my laptop with only 2GB ram...

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

Posted: Sat Jun 25, 2016 11:53 am
by Major Cooke
Don't forget some computers could be faulty and/or dying, or just don't sit well with certain browsers -- even though this one's causing the least bit of trouble. But what's done is done.

So Graf, is this ready?

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

Posted: Wed Jun 29, 2016 4:42 am
by Graf Zahl
I've been without internet for a week, so right now I have other things to take care of first. Maybe I'll give some feedback on the weekend.

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

Posted: Sat Jul 02, 2016 5:10 pm
by Major Cooke
Alright, cool. Looking forward to it!

You know, now that I look at this, I'm almost curious about rope-like sprites and/or lasers and if they are possible... For another pull request of course.

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

Posted: Sat Jul 02, 2016 5:42 pm
by Snarboo
Major Cooke wrote:You know, now that I look at this, I'm almost curious about rope-like sprites and/or lasers and if they are possible... For another pull request of course.
Like the guts that would get stuck in doorways in Duke 3D? I always wondered how that was implemented!

I'd love to see a laser effect like the one in PO'ed, too. IIRC, one of the guns fired a bolt of electricity that would stretch out to match the distance it traveled.

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

Posted: Sat Jul 02, 2016 6:07 pm
by Major Cooke
Yeah, well, more like Half Life lasers.

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

Posted: Sat Jul 02, 2016 6:58 pm
by Snarboo
Oh, I gotcha! Yeah, that would be pretty sweet, too.

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

Posted: Sun Jul 03, 2016 11:15 am
by Major Cooke
Agreed, though this needs to go in first before I can consider such a thing. I need to ensure I'm actually doing this right.

So Graf, how does this look?

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

Posted: Sun Jul 03, 2016 4:47 pm
by Graf Zahl
One thing:

This does not work as intended:

Code: Select all

	switch (spritetype)
	{
	case RF_FLATSPRITE:
		z = thingpos.Z;
	default:
		z = thingpos.Z - thing->Floorclip;
		// [RH] Make floatbobbing a renderer-only effect.
		if (thing->flags2 & MF2_FLOATBOB)
		{
			float fz = thing->GetBobOffset(r_TicFracF);
			z += fz;
		}
		break;
	}
Besides, even if it worked, why disable floatbobbing for flatsprites?

Aside from that, I think it's ok, although the code definitely could use some streamlining.

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

Posted: Sun Jul 03, 2016 5:08 pm
by Major Cooke
Fair enough, but thank you SO much! :D

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

Posted: Sun Jul 03, 2016 9:58 pm
by Major Cooke