Actor performance problem

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
mty
Posts: 46
Joined: Thu Mar 29, 2018 1:48 pm
Graphics Processor: nVidia with Vulkan support
Location: EU
Contact:

Actor performance problem

Post by mty »

Hey everybody,

I have a performance issue I don't really get – well actually I have a lot of those, but let's focus on one xD.

I have this roof which is a 3d model. It seems to have a big impact on the performance.
When I remove the whole actor, performance is much better.
Just disabling the 3d model, doesn't do much.

The game is on freeze.



Is there an error in my DECORATE?

Code: Select all

ACTOR PagodaRoof  30213
{
	+THRUACTORS
	+NOGRAVITY
	+INTERPOLATEANGLES
	RenderRadius 1024
	States
	{
	Spawn:
		MOD1 E 1
		Goto SpawnTurrets
	Spawnturrets:
		MOD1 E 1 A_SpawnItemEx("RoofTurret", 0, 0, 90, 0, 0, 0, 22.5, SXF_SETMASTER, 0, 7501)
		MOD1 E 1 A_SpawnItemEx("RoofTurret", 0, 0, 90, 0, 0, 0, 67.5, SXF_SETMASTER, 0, 7502)
		MOD1 E 1 A_SpawnItemEx("RoofTurret", 0, 0, 90, 0, 0, 0, 112.5, SXF_SETMASTER, 0, 7503)
		MOD1 E 1 A_SpawnItemEx("RoofTurret", 0, 0, 90, 0, 0, 0, 156.5, SXF_SETMASTER, 0, 7504)	
		MOD1 E 1 A_SpawnItemEx("RoofTurret", 0, 0, 90, 0, 0, 0, 202.5, SXF_SETMASTER, 0, 7505)
		MOD1 E 1 A_SpawnItemEx("RoofTurret", 0, 0, 90, 0, 0, 0, 247.5, SXF_SETMASTER, 0, 7506)
		MOD1 E 1 A_SpawnItemEx("RoofTurret", 0, 0, 90, 0, 0, 0, 292.5, SXF_SETMASTER, 0, 7507)
		MOD1 E 1 A_SpawnItemEx("RoofTurret", 0, 0, 90, 0, 0, 0, 337.5, SXF_SETMASTER, 0, 7508)
		Goto See
	See:
		MOD1 E 5
		Loop
	}
}

Actor RoofTurret 30214
{
	+THRUACTORS
	+NOGRAVITY
	+INTERPOLATEANGLES
	Monster
	RenderRadius 1024
	States
	{
	Spawn:
		MOD1 F 120
		MOD1 F 1 A_LookEx(LOF_NOSOUNDCHECK, 0, 0, 0, 45, "Missile")
		Loop
	Missile:
		MOD1 F 51 A_SpawnItemEx("RoofShooter", 522, 0, -80, 0, 0, 0, 0, SXF_TRANSFERPOINTERS)
		Goto Spawn
	}

}



ACTOR RoofShooter 
{
	+THRUACTORS
	+NOGRAVITY
	States
	{
	Spawn:
		MOD1 G 1 A_FaceTarget
		MOD1 G 1 A_CustomMissile("RoofMissile")
		Stop
	}
}

Any help is appreciated.

THX
User avatar
KeksDose
 
 
Posts: 596
Joined: Thu Jul 05, 2007 6:13 pm
Location: my laboratory
Contact:

Re: Actor performance problem

Post by KeksDose »

On their own, these actors look innocent (under profilethinkers too), but you are setting tids in those A_SpawnItemEx calls, so maybe it's an acs lagging you? They continue during freeze as well.
Post Reply

Return to “Scripting”