Irredit plugins.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Irredit plugins.
Hi, I'm working on a plugin for Irredit so that I can add my custom scene node to it. I'm kinda confused on one part though. When I program the plugin. Do I include the same scene node implementation I use in the game? Or do I make some sort of custom one only for in Irredit?
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
well that depends in irredit u actually only need a placeholder node that writes the correct name to the irr file. in your programm u can spawn a totally different scenenode with just the same name.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
So I can't save a custom scene node so that I can edit properties in Irredit? I thought that I needed to make some sort of node in the Irredit plugin and also a node factory, that deals with the same type of node. Then have the same two things in my program, a node and a node factory. Am I missing something there?
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Of course u can do that. and yes you will need a node factory in irredit and also in your programm when u wanna use loadScene(..).3DModelerMan wrote:So I can't save a custom scene node so that I can edit properties in Irredit? I thought that I needed to make some sort of node in the Irredit plugin and also a node factory, that deals with the same type of node. Then have the same two things in my program, a node and a node factory. Am I missing something there?
But they don't have to be the same classes. thats what i wanted to say.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Oh okay. How are the node factories associated with one another? The types returned by getType()?
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Well ... I am using the same code for my plugins that I use for the game(s). There are just some #ifdefs to disable certain things, this way I can also use the same scenenodefactories. If you want more details you could look at the factory in my IrrOde wrapper.
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Oh, okay. Can you do custom scene node animators?
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
yes3DModelerMan wrote:Oh, okay. Can you do custom scene node animators?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
I tried compiling my plugin but it didn't work in Irredit. It said "Can't find entry point" or something like that. I'm compiling my plugin with Irrlicht 1.7.1 though. Do I need to compile with 1.5? Or does anyone here have a redistribution license and would be willing to recompile for Irrlicht 1.7.1? I've basically copy and pasted the entry point function in the ExamplePlugin.cpp file, I only changed typenames to match my scene nodes and factories. I didn't see any function declaration in ExamplePlugin.h for the entry point function, it's only supposed to be in the .cpp file right?
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Which compiler are you using? You have to compile IrrEdit plugins with VC++, otherwise they won't work (sad but true).
Dustbin::Games on the web: https://www.dustbin-online.de/
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
You have to compile with the irrlicht version that is included with irrEdit. check out the plugin examples. maybe just usem them as a base and add your own code. And like Brainsaw said, you have to use VisualC++3DModelerMan wrote:I tried compiling my plugin but it didn't work in Irredit. It said "Can't find entry point" or something like that. I'm compiling my plugin with Irrlicht 1.7.1 though. Do I need to compile with 1.5? Or does anyone here have a redistribution license and would be willing to recompile for Irrlicht 1.7.1? I've basically copy and pasted the entry point function in the ExamplePlugin.cpp file, I only changed typenames to match my scene nodes and factories. I didn't see any function declaration in ExamplePlugin.h for the entry point function, it's only supposed to be in the .cpp file right?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Yeah I'm using VC2008 and I'm gonna upgrade to 2010.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
It works, the plugin loads in Irredit. The only problem is that I have the serializeAttributes and deserializeAttributes functions both implemented, in both the plugin node and the regular node, but nothing shows up under "node specific" in Irredit.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
This is my code
Code: Select all
void CLevelEndCheckpoint::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options)
{
ISceneNode::serializeAttributes(out, options);
out->setAttribute("Radius", m_radius);
out->setAttribute("Box", m_boundingBox);
out->setAttribute("Next_checkpoint_ID", m_nextID);
out->setAttribute("Load_level_filename", *m_levelFilename);
out->setAttribute("Script_filename", *m_scriptFilename);
}
void CLevelEndCheckpoint::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
{
ISceneNode::deserializeAttributes(in, options);
m_radius = in->getAttributeAsFloat("Radius");
m_boundingBox = in->getAttributeAsBox3d("Box");
m_nextID = in->getAttributeAsInt("Next_checkpoint_ID");
*m_levelFilename = *in->getAttributeAsEnumeration("Load_level_filename");//Watch these for errors.
*m_scriptFilename = *in->getAttributeAsEnumeration("Script_filename");
}
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
-
- Posts: 52
- Joined: Wed Mar 03, 2010 7:11 pm