wait

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
DtD
Posts: 264
Joined: Mon Aug 11, 2008 7:05 am
Location: Kansas
Contact:

Post by DtD »

B@z wrote:but why dont make an animator?
you can check how the createDeleteAnimator made, you have to do the same, just not delete, but set it invisible
lol, finally a reusable, sensible solution that isn't game-specific :lol:

~DtD
Ulf
Posts: 281
Joined: Mon Jun 15, 2009 8:53 am
Location: Australia

Post by Ulf »

What he's trying to do is actually game specific.
What? Are you always going to set every node visible after 2 seconds?

Man, I suppose it can be put in the engine, but it's only a function. Not much to it!
We already have an answer for it that is simple and scalable.

... thinking more about it... (as I don't know about the animators yet) ..
if making an animator is simple as inheriting a class, and changing the update function or something like that, then it's useful.
I can hear birds chirping
:twisted:

I live in the Eye of Insanity.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

what youre saying is easily can be achieved by using animators :D
i wrote animators myself too, not too hard.
Image
Image
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

I agree that writing an animator to do something does indeed solve the problem. If that is all the user wants, and ever wants to do, that is an excellent solution. Unfortunately, it makes the assumption that everything the user might ever want to do periodically relates to manipulating a scene node. This is clearly not always going to be the case.

A simple timer callback system is more generic and can be quite a bit cleaner. It is also more easily testable (if you're into that kind of thing).

Code: Select all

// make node invisible in 2 seconds, only do it once
timerQueue.insert(make_node_invisible(node), 2000);

// update proximity engine every second, repeate indefinitely
timerQueue.insert(update_proximity_engine(), 1000, TQ_REPEAT);
Travis
Ulf
Posts: 281
Joined: Mon Jun 15, 2009 8:53 am
Location: Australia

Post by Ulf »

I agree with Vitek.

The implementation I suggested.. and Brainsaws or Viteks... is good and more than good enough.. and it is simple as can be... nothing to it.

Once again, I want to say,,, this thread should be closed as we have the answer, and the ideas about integrating into the engine or making animators is going to far I think!
I haven't heard from Seraph for a while ;-)

Brainsaw, Vitek and I know what's happening here..
I can hear birds chirping
:twisted:

I live in the Eye of Insanity.
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Post by randomMesh »

Ulf wrote:this thread should be closed as we have the answer
Uhm, no. Seraph might have questions, post a status report or whatever.
Besides, there's so much room for more suggestions on ways to solve this problem.
"Whoops..."
Ulf
Posts: 281
Joined: Mon Jun 15, 2009 8:53 am
Location: Australia

Post by Ulf »

Uhm, no. Seraph might have questions, post a status report or whatever.
Besides, there's so much room for more suggestions on ways to solve this problem.
Yea true, it's not just about me. haha. it's not even my post.
I can hear birds chirping
:twisted:

I live in the Eye of Insanity.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

well maybe its just me, but i dont like bumping my main loop, if avoidable :3
Image
Image
Post Reply