Showing sprites without an actor?
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!)
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!)
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Showing sprites without an actor?
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?
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?
- zrrion the insect
- Posts: 2411
- Joined: Thu Jun 25, 2009 1:58 pm
- Location: Time Station 1: Moon of Glendale
Re: Showing sprites without an actor?
I may be remembering wrong, but IIRC it had something to do with randi's work on blood compatibility.
EDIT: [wiki]Classes:CustomSprite[/wiki]
Could this be it?
EDIT: [wiki]Classes:CustomSprite[/wiki]
Could this be it?
- Rip and Tear
- Posts: 185
- Joined: Tue May 02, 2017 3:54 pm
Re: Showing sprites without an actor?
CustomSprite still inherits from Actor.zrrion the insect wrote:I may be remembering wrong, but IIRC it had something to do with randi's work on blood compatibility.
EDIT: [wiki]Classes:CustomSprite[/wiki]
Could this be it?
There are some flags like +NOINTERACTION which can reduce the load of an actor.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Showing sprites without an actor?
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)
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)
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Showing sprites without an actor?
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.
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.
Re: Showing sprites without an actor?
I think the real solution here would be skinnable particles.
- The Zombie Killer
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: Showing sprites without an actor?
Classes inherit from Object by default, therefore: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?
Code: Select all
class Example : Object
{
}
// is the same as
class Example
{
}
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Showing sprites without an actor?
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).Nash wrote:I think the real solution here would be skinnable particles.
- Caligari87
- Admin
- Posts: 6174
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Showing sprites without an actor?
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.
Re: Showing sprites without an actor?
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
There may or may not already be an open suggestion yet; I'm too tired to search
Re: Showing sprites without an actor?
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.
But that probably because I am a blind kitten in programming.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Showing sprites without an actor?
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.