RollCenter is calculated differently for billboard sprites

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: RollCenter is calculated differently for billboard sprites

Re: RollCenter is calculated differently for billboard sprites

by Graf Zahl » Mon Oct 30, 2023 11:24 pm

You may already consider it deprecated, as is evident by not changing this.
The main problem here is that a proper wall and floor sprite implementation needs to be done very differently, especially how they handle in-game collision testing.

Re: RollCenter is calculated differently for billboard sprites

by Enjay » Mon Oct 30, 2023 2:13 pm

Graf Zahl wrote: Fri Oct 27, 2023 8:34 am I am fully aware that all these options are not really usable, when they were implemented, maximum flexibility was rated higher than a robust foundation. If there weren't actual projects using them they would long have been removed by now.
Is there any mileage in deprecating the current implementation and introducing a new, better one (as and when time and priorities allow, of course)?

Re: RollCenter is calculated differently for billboard sprites

by Graf Zahl » Mon Oct 30, 2023 1:04 pm

Build's code is better than what got into GZDoom for flat and wall sprites but it's far from perfect. because it has no concept of attaching such sprites to a surface. The result is countless errors with wall and floor decals in the games.

Re: RollCenter is calculated differently for billboard sprites

by Sir Robin » Mon Oct 30, 2023 12:55 pm

I haven't had a lot of issues with wall sprites but I know flat sprites are pretty wonky. I realize you can't change them because they're already in use. Any chance we could get a +WallSprite2 or something like that that would function as expected?
I know you're also working on a build engine, and I remember duke3d using sprites quite extensively. is that code better and portable?

I realize the work-around for now is to use a model with a plane on its floor as a wall sprite.

Re: RollCenter is calculated differently for billboard sprites

by Graf Zahl » Fri Oct 27, 2023 8:34 am

I am fully aware that all these options are not really usable, when they were implemented, maximum flexibility was rated higher than a robust foundation. If there weren't actual projects using them they would long have been removed by now.

RollCenter is calculated differently for billboard sprites

by Sir Robin » Sun Oct 22, 2023 8:16 am

I noticed this because I have an actor that is a rollsprite and is a standard billboard sprite out in the open but becomes a wallsprite near walls. Best I can tell, the "empty space" in a sprite is ignored for a billboard center but considered for a wallsprite center.

Reproduce:

Code: Select all

//TEXTURES: Create a sprite with some empty space:
sprite JGLRA0, 14, 36
{
	offset 7,36
	sprite BON1D0,0,18
}

//ZSCRIPT:
version "4.11.1"
class jiggler : actor
{
	default {+RollSprite;}
	states {spawn: JGLR A -1; stop;}
	
	override void tick()
	{
		roll = sin(360. * (level.time % 35 / 34.)) * 45;
		super.tick();
	}
}
class JRC : jiggler {default {+RollCenter}}
class JWS : jiggler {default {+WallSprite}}
class JWSRC : JWS {default {+RollCenter}}
class JFS : jiggler {default {+FlatSprite}}
class JFSRC : JFS {default {+RollCenter}}
Summon these classes near each other. Jiggler, JWS, and JFS should all be similar and they are. JRC, JWSRC, and JFSRC should all be similar and they are not.

Top