OK, I just took a look at the editor. Nice I have to say. But for the examples: how do you load the xml files? I don't really see examples (OK, there is an example folder, and there are "main.cpp" files, but they look like this:
A little hint would be fine. I there some load function that needs to be added? I would really love to use the system (and create another IrrEdit plugin using it), but I need a starting point.
@brainsaw: Examples are in the folder 'effects', there are a fire effect (the one from the SPARK demos) and an effect playing with interpolators.
The 'main.cpp' is in the 'plugin sdk', it's not for an effect but for a plugin, in order to extend the editor.
To load effect files (*.spes), first you need a xml parser (the editor uses TinyXml). Node are stored by types (zone, modifier, etc...) and by plugins.
Each plugin handle a SPARK module. To see loaded plugins, you can look at the log file or in the menu Plugins -> View plugins
For example, the plugin handling sphere zones is "SPEZones.dll/sphere".
You can safely ignore the 'lock' attribute, it will only be used by the editor. References are here to allow the editor to be extendible, I don't think you really need it. After that, you have properties.
In the future I plan to add a extensible binary scene loader for SPARK - maybe next year, I am very busy with my courses ^^
Oh ... I see ... you've been talking about the particle demos, I've been talking about a demo program. Is there some sort of loader (there obviously is one, because the editor can load the files ), and is it realeased somewhere?
So, your question is "How the editor can parse XML ?" or "How the editor loads xml files ?" ?
For the first question, the answer is TinyXML.
For the second question, when the editor loads an xml file, it does almost not involve SPARK code: the editor is built on a database containing all elements you created (SPARK modules, textures, 3D objects - note that 3D object managing is not implemented yet). Here is a light and old sheme of the architecture of the editor:
Well, I'm not sure I have entirely understood you question ...
I think this comes closer. Are you planning to release a loading function to load and display the particle system created with the editor. I was thinking about something like
Brainsaw wrote:I think this comes closer. Are you planning to release a loading function to load and display the particle system created with the editor. I was thinking about something like
System *mySystem=System::loadParticleSystemFromFile("myFileCreatedWithTheEditor");
This would be fine. It wouldn't be necessary to care about the internals, just use what was created with the editor.
For loading library, you can use my editor instead, and there is C++ particle loader included. There's already one game released using it, so with some dedication you are able to create production quality particle effects too.
I'm not an expert programmer when it comes to linking and things outside plain code. I'm trying to build a solution with spark but I always come up with "unresolved externals".
What I did was copy pasted the first irrlicht tutorial, pasted in the irrlicht stuff and SPARK + SPARK_IRR .lib and .dlls.
I had the same errors recently when i've tried to compile irrlicht samples projects with spark dynamic libraries. (SPARK_project_1_05_04)
(I use msvc 2005 and 2010 express for my tests)
First, try to compile with static libraries.
Perhaps you will have errors on unresolved randomseed and useVBO functions
In this case recompile SPARK_project_1_05_04 projects to get new libs "spark.lib and spark_irr.lib"
(debug will be spark_debug.lib and spark_irr_debug.lib)
Compile your project (or Spark Irrlicht samples) with the new libs, It should be good.
(you don't need to use new dlls)
/usr/local/lib/libSPARK_IRR.a(SPK_IRR_QuadRenderer.cpp.o): In function `SPK::IRR::IRRQuadRenderer::IRRQuadRenderer(irr::IrrlichtDevice*, float, float)':
SPK_IRR_QuadRenderer.cpp:(.text+0x3d): undefined reference to `SPK::QuadRenderBehavior::QuadRenderBehavior(float, float)'
SPK_IRR_QuadRenderer.cpp:(.text+0x4d): undefined reference to `SPK::Oriented3DRenderBehavior::Oriented3DRenderBehavior()'
/usr/local/lib/libSPARK_IRR.a(SPK_IRR_QuadRenderer.cpp.o): In function `SPK::IRR::IRRQuadRenderer::IRRQuadRenderer(irr::IrrlichtDevice*, float, float)':
SPK_IRR_QuadRenderer.cpp:(.text+0xfb): undefined reference to `SPK::QuadRenderBehavior::QuadRenderBehavior(float, float)'
SPK_IRR_QuadRenderer.cpp:(.text+0x10b): undefined reference to `SPK::Oriented3DRenderBehavior::Oriented3DRenderBehavior()'