This site is no longer active and is available for archival purposes only. Registration and login is disabled.

using actorpool


using actorpool

Postby laurnet » Mar 10, 2002 @ 12:22am

hello
How to use this class function AActorPool()?
and what is the use?
thanx
User avatar
laurnet
pm Member
 
Posts: 36
Joined: Jan 6, 2002 @ 9:25am
Location: FRANCE


Postby Phantom » Mar 11, 2002 @ 8:58am

Ehm yes, this is an undocumented yet very cool class. If you are already using actors, that is. An actor is an object that can do certain actions autonomously. There is one example in EasyCE 2.0 / 1.6: The particle explosion. What you do is this: First, you instantiate and initialize the actor. Then, for each frame, you call 'update' on it. That updates the actor. :) As soon as update returns 'false', the actor is 'done' and you can savely delete it. To create your own actor, simply subclass the AActor class and implement the pure virtuals.

The actor pool makes managing these actors even simpler. You add a couple of actors to the pool, and once a frame you call 'update' for the pool. That updates all the actors, and better, deletes the ones that are done. This way you can add dynanic stuff on-the-fly to the pool and update them automatically with a single call (without keeping track of all the individual actors), and they will even get deleted when ready.

It's really great for games. :)

- Jacco.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


pool

Postby laurnet » Mar 13, 2002 @ 5:25pm

User avatar
laurnet
pm Member
 
Posts: 36
Joined: Jan 6, 2002 @ 9:25am
Location: FRANCE


Postby Phantom » Mar 13, 2002 @ 5:28pm

Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum