UserData in Irrlicht

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: UserData in Irrlicht

Post by serengeor »

aaammmsterdddam wrote:well.
I can see several reasons to have user data pointers in a node eg. healt values, other character values (rage, stamina mana, strength. you name it, ammo), use your imagination and the potential uses are endless ^^*
I'm sure you have written many games and you know what you are talking about, so I'll agree with you and all I can add to what you said, is that you are full of s**t :roll: Please try to accept this as (not so) constructive criticism.

From my experience there was no need for user data at all in the scene nodes. If you are using irrlichts collision system, you will have to implement it yourself (make ISceneNode inherit from some data holding class or patch it to hold the data or even as was suggested make some sort of map with nodes and your data ). Otherwise you're most likely writing another layer of Objects that will keep that data for you and there will be no need to have it in ISceneNode.
Working on game: Marrbles (Currently stopped).
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Re: UserData in Irrlicht

Post by 3DModelerMan »

If you really need user data then I guess you could write a user data animator and attach it to your node. That would be kind of messy though. I don't directly use nodes in my game, I wrote a component based entity system that has a scene node component. It's much cleaner that way. You implement all your gameplay logic in the game object system and use Irrlicht for rendering.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: UserData in Irrlicht

Post by Cube_ »

oh well... I just like having all data in the same place :/
wether you find it to be good or bad is irrelevant.
and I shall now leave this discussion.
"this is not the bottleneck you are looking for"
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: UserData in Irrlicht

Post by ACE247 »

Any of you realize that this thread was FREAKIN ANCIENT! :D LOL eh?
Post Reply