Showing sprites without an actor?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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.

Showing sprites without an actor?

Postby Matt » Tue May 08, 2018 4:26 pm

I find I spawn a lot of smoke, puff, flame, etc. sprites. Most of these don't need anything like all the stuff that gets initialized when a new actor is spawned.

I remember reading on the forums a while ago about a special thinker or something that doesn't do anything but show a sprite and now I'm wondering if using that might help.

Does anyone know what I'm talking about? And does it actually use significantly less CPU time to spawn if not maintain?
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Showing sprites without an actor?

Postby zrrion the insect » Tue May 08, 2018 5:54 pm

I may be remembering wrong, but IIRC it had something to do with randi's work on blood compatibility.

EDIT: Classes:CustomSprite
Could this be it?
User avatar
zrrion the insect
Like a fish in a child's hands.
 
Joined: 25 Jun 2009
Location: Time Station 1: Moon of Glendale

Re: Showing sprites without an actor?

Postby Rip and Tear » Tue May 08, 2018 6:30 pm

zrrion the insect wrote:I may be remembering wrong, but IIRC it had something to do with randi's work on blood compatibility.

EDIT: Classes:CustomSprite
Could this be it?

CustomSprite still inherits from Actor.

There are some flags like +NOINTERACTION which can reduce the load of an actor.
User avatar
Rip and Tear
 
Joined: 02 May 2017

Re: Showing sprites without an actor?

Postby Caligari87 » Tue May 08, 2018 6:57 pm

Well, I just tested and it's already possible to inherit from something as low-level as Object, though I can't seem to do much with it. Might it be possible, with a few exports, to build such an actor from scratch?

Although Matt, in your case it's probably the translucency overdraw that's causing a lot of the lag, not necessarily the number of actors (unless of course you've tested and found otherwise, but that's just my guess)

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: Showing sprites without an actor?

Postby Matt » Tue May 08, 2018 8:43 pm

zrrion: That's what I was thinking about! But yeah, it's an actor. Oh well, I'll think of something (possibly even just not spawning as many actors...)

R&T: I'm aware of the advantages of +nointeraction but it doesn't stop the overhead of initializing all those actors at once.

Caligari: Maybe, but the actor-spawning is definitely contributing - try using a doorbuster (or five) on a larger door, say the north secret on Map01, and unless you've got a much faster computer than me there will be a noticeable pause as all the debris actors appear.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Showing sprites without an actor?

Postby Nash » Wed May 09, 2018 1:36 am

I think the real solution here would be skinnable particles.
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: Showing sprites without an actor?

Postby The Zombie Killer » Wed May 09, 2018 2:30 am

Caligari87 wrote:Well, I just tested and it's already possible to inherit from something as low-level as Object, though I can't seem to do much with it. Might it be possible, with a few exports, to build such an actor from scratch?

Classes inherit from Object by default, therefore:

Code: Select allExpand view

class Example 
: Object
{
}

// is the same as

class Example
{
}
User avatar
The Zombie Killer
King of the Kangaroos
 
Joined: 14 Jul 2011
Location: Gold Coast, Queensland, Australia
Discord: Zombie#1795

Re: Showing sprites without an actor?

Postby Matt » Wed May 09, 2018 1:03 pm

Nash wrote:I think the real solution here would be skinnable particles.
Are those possible right now? I have this vague recollection of this being implemented at some point but I could be imagining things (and I can't find anything on the wiki).
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Showing sprites without an actor?

Postby Caligari87 » Wed May 09, 2018 1:54 pm

Sort of, but not really. You can replace the particle graphic in GZDoom.pk3 and it'll be used in place of all particles as expected, but hasn't been exported to be generally usable by mods. I'm not an engine dev but that seems like a reasonably straightforward thing to do, considering it, y'know, already halfway works.

8-)
User avatar
Caligari87
I'm just here for the community
User Accounts Assistant
 
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Re: Showing sprites without an actor?

Postby Nash » Wed May 09, 2018 2:45 pm

There's a small discussion but that's about it. viewtopic.php?f=4&t=55737

There may or may not already be an open suggestion yet; I'm too tired to search
User avatar
Nash
Nash Muhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: Showing sprites without an actor?

Postby Apeirogon » Fri May 18, 2018 1:33 pm

I looks through all base definitions of object, thinker and actor, in zscript part of gzdoom, and did not see any function/way which can show sprite, or make from thinker something, which from far distance looks like default actor.
But that probably because I am a blind kitten in programming.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Showing sprites without an actor?

Postby Graf Zahl » Sat May 19, 2018 2:13 am

To render a sprite there needs to be some reference object in the map - that's the Actor. Sorry, it cannot work any other way.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests