Extending event system

A forum to store posts deemed exceptionally wise and useful
Post Reply

Will be useful to extend Irrlicht event system?

yes
3
60%
no
2
40%
 
Total votes: 5

etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Extending event system

Post by etcaptor »

Hi all,
these days I think about design of some Irrlicht base game using of standart Irrlicht functions and collisions.
I occur some troubles with handling of events and still cannot choice appropriate solution.

At first time can say that I don't like when get any big switch with event receiver. Also if any animators are used, there is not event generators when animator finished animation.

Also if we have any node, sensitive to events making of more complex things will be easy. For example any node can catch events by own OnEvent function even can be add some functions like:
OnCollision, OnMoving OnRotation and other.

If this isue is used we must to add extention of SceneNodes derived form two classes:
SceneNode
EventReceiver
Also must be add some event structures in receiver class, and any additions in animators and postEventFromUser function in SceneManager.

What is your opinition? Will be this issue a good way, or I'm mistake?
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post by keless »

I disagree with you, but that doesnt mean you're wrong.

Personally, in ICE I avoid having large switch statements because major separations of game logic are kept in separate game state classes. Furthermore, the idea of having an OnCollision function is definately bad because it will force people to use whatever system Irrlicht has for physics. So people will either be stuck with that, or they'll have to completely ignore it if they use an external physics API.

I'm not yet at the stage in IrrlichtAPI where I have different physics and user control systems; so when I work on that I may change my mind, but this is my opinion at the moment.

(also, this isnt a FAQ or a HowTo-- so maybe this is the wrong forum topic to put it under? )
a screen cap is worth 0x100000 DWORDS
Post Reply