Page 1 of 1

Entity scenenode (aka the do-nothing-SceneNode )

Posted: Sun Oct 07, 2007 3:06 pm
by bull
I love IrrEdit, and I know many of you also. But one thing I hate about it is that I can't add a custom attribute(monster's hp, game object class ...) . To a game ,such informations mean much more than the scene node itself. I tried to solve the problem by jamming informations into the node name but it's too inconvenient. So I created a scene node and a plugin to solve this problem:

Screen shot: What's the point? My scene node doesn't even render itself,duh!!

Small update:
-Fix a very stupid bug in iteration.
-Since the scene node is only seen in design-time, not run-time, it now draws its bounding box.
-Removed the "constructor parameter"
New link: http://www.zshare.net/download/54562497f9bc0f/

Old link: http://www.zshare.net/download/4070918ea3f5d0/

The zip file contained source code and the plugin.

Installation and usage:

Copy the EntitySceneNode.dll into the plugins folder of irredit and the scenenode_entitySceneNode.bmp into the resource folder.

When you start irredit. You will see a blank space in the plugin toolbar. That's my custom sceneNode. Click it and a scene node is created.
In the node specific section there are these fields:

PropertyCount: accept number only. This is the number of the custom properties.

Property1
Property2
Property3
....
Propertyn: custom string, the number of them depends on PropertyCount.

Remarks:
Since the scene node is invisible, i suggest you should make it the child of another node.

This scene node supports cloning

That's all for the plugin.

About the scene node:
It has 2 methods:

Code: Select all

const s32 getPropertyCount(); //return the number of property
const c8* getProperty(s32 propertyNumber) const;//return the (n+1)-th property (the first is 0)
That's it. Now you can use IrrEdit as a level editor.Your game will then load the .irr file, run through the scene graph, catchs the entity scene node, get its properties, create your logic objects and game on!!

One more thing: credit is appreciated. Please don't change the button icon, i love it. The scene node does nothing and it will be used in my game engine(called Illusion3d) so it deserves nothingness :wink:

Posted: Sun Oct 07, 2007 4:06 pm
by fmx
lol, cool nothingness...

this is great!
now IrrEdit can be used to add things like spawn-points, which usually have to be done manually, or in a custom editor.

thanks bull!

:D

Posted: Sun Oct 07, 2007 5:12 pm
by MasterGod
I can't seem to see the use of your scene node. How would it be useful?

Posted: Sun Oct 07, 2007 5:30 pm
by FlyingIsFun1217
MasterGod wrote:I can't seem to see the use of your scene node. How would it be useful?
It sounds like it can be used in-game to set triggers, things that will be like logic for the game (spawn here, gain health here, reload here, open door here, etc.).

Very nice work!
FlyingIsFun1217

Posted: Mon Oct 08, 2007 5:06 am
by bull
I can't seem to see the use of your scene node. How would it be useful?
It is used to attach game specific information to a scene node in IrrEdit.

Imagine you are using irredit to create a level for a rpg game. There is a box with some items inside. Where will you store those informations? A mesh scene node only gives you id and name to edit. You can not write all items' names in the name field or the id field.
You can write them to a file and set the node's name to the path of the file but you will get confused when there are more and more boxes in your level. You will also have to alt-tab between irredit and the text/xml editor.

Or you can just add my scene node as the child of the box and set it's properties to the items' name inside the box.
It sounds like it can be used in-game to set triggers, things that will be like logic for the game (spawn here, gain health here, reload here, open door here, etc.).
Actually, it is supposed to be used in design time with irredit or your custom editor, not run time.

Posted: Mon Oct 08, 2007 11:25 am
by neoIxen
Nice!

I also wanted to create something like this but a bit more complex like in the quake-engine's entities.
There you have a name for every property like "target" and a value like "door". The engine then knows if you trigger that entity the target "door" is activated or rather opened.

So my node would have two arrays
One for the property's name and one for it's value.
imo that's much more flexible.

But your's has also it's advantages ;)

Posted: Mon Oct 08, 2007 1:37 pm
by MasterGod
@bull && FlyingIsFun1217: This is very interesting, so you say it can be used as a property (by text) for every scene node?

:idea:
Maybe like neoIxen said, add the functionality to add more then just Title properties :roll:

PS: Is it v1.4 compatible?

Posted: Mon Oct 08, 2007 7:08 pm
by rogerborg
Excellent work! This looks thoroughly useful. Thanks for sharing.

Posted: Tue Oct 09, 2007 3:13 pm
by TheGameMaker
Great Work!!
I always wanted to do something like this!! No you've done it!
THX

Posted: Wed Oct 10, 2007 10:19 am
by Virion
interesting. it could be useful. thanks.

Posted: Wed Oct 17, 2007 5:00 pm
by christianclavet
Thanks Bull, this will be very useful.