HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 Questions about SPARK (2)

View previous topic View next topic Go down 
AuthorMessage
DevilWit
Guest



PostSubject: Questions about SPARK (2)   Sat Jan 29, 2011 6:00 pm

Hello ! I enjoy using SPARK a lot! Thanks for making it ;D

I would like to know if it is being actively developed, and what state is SPARK 2.
I am integrating SPARK in my 2D Game Engine, and before making the particle editor tool i need to have a nice particle format and i see SPARK 1 offers trouble when doing that, as there is no easy way to serialize : )

Is SPARK 2 usable ? what new features does it have? Thanks
Back to top Go down
Darktib
Committer


Messages : 389
Date d'inscription : 2009-07-20
Localisation : A coté de Paris

PostSubject: Re: Questions about SPARK (2)   Sun Jan 30, 2011 4:58 am

SPARK 2 is actively developped, you can get it on the SVN (be aware that you might encounter problems due to the recent attack against Sourceforge). It is usable, it is faster than SPARK1, now you can emit emitters, and some other features I forgot Rolling Eyes. All things feasible in SPARK1 are feasible in SPARK2. But, the documentation is not entirely done for the moment.
SPARK 2 includes serialization, for the moment the only writer is a xml writer, and there are no loaders, but you can add your own format if you want (all serialization code is in SPK::IO namespace).


There are at the moment 2 particle editors for SPARK: the first was made by kvakvs, it's named SimpleSpark, and you can download it here: http://spark.forum0.net/t54-started-simplespark-editor-project (SPARK1)
The second one is mine, you can download it here, but be aware it's a quite old release (6-7 months), and it's using SPARK1. Currently, on my computer, it uses SPARK2 and is more evolved. (There is a thread for it, but in french)
Back to top Go down
View user profile
DevilWithin



Messages : 16
Date d'inscription : 2011-01-30

PostSubject: Re: Questions about SPARK (2)   Mon Jan 31, 2011 10:31 pm

Thanks, appreciate your information!

So i will start using SPARK2 when i have time,lets see how it goes, if i have trouble i'll share the bad news here Very Happy
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: Questions about SPARK (2)   Tue Feb 01, 2011 6:11 am

Hi,

SPARK 2 is not stable now and some features are missing. There is a serialization system included in it but it has to be finalized too.

If I were you I would go with SPARK 1 and check the xml format and editor SimpleSpark, if you want to integrate now.
If you integarte later (1 or 2 months), SPARK 2 may be more stable.
Back to top Go down
View user profile http://spark.developpez.com
DevilWithin



Messages : 16
Date d'inscription : 2011-01-30

PostSubject: Re: Questions about SPARK (2)   Tue Feb 01, 2011 9:28 am

Ok, i will follow SPARK 2, i just wish when i really need it, it works ;D
Back to top Go down
View user profile
DevilWithin



Messages : 16
Date d'inscription : 2011-01-30

PostSubject: Re: Questions about SPARK (2)   Sun Feb 27, 2011 4:43 pm

Little Bump Smile

Just wondering how is SPARK2 going, is it already functional? (no need for 100% complete at all yet)

And the serialization of systems, already working? Looking forward to use SPARK2 Smile
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: Questions about SPARK (2)   Mon Feb 28, 2011 5:08 pm

Hi, yes you can use SPARK 2, not everything is implemented yet and they may be some bugs still, but it is functional already. The serialization system works (will need more test though).

However as you re planning to use it to integrate it in your engine, know that the rendering system is being changed. So if you plan to write custom renderers for your engine, you will have to rework them soon.
Back to top Go down
View user profile http://spark.developpez.com
DevilWithin



Messages : 16
Date d'inscription : 2011-01-30

PostSubject: Re: Questions about SPARK (2)   Mon Feb 28, 2011 5:26 pm

No custom renderers needed, most likely! OpenGL looks fine Smile

Where can i find instructions on usage of SPARK2? any info is better than nothing : )

Thanks for the support!
Back to top Go down
View user profile
DevilWithin



Messages : 16
Date d'inscription : 2011-01-30

PostSubject: Re: Questions about SPARK (2)   Mon Mar 14, 2011 8:46 pm

I am really needing help on this problem i'm having!

I tried to load a system with:

SPK::Ref<SPK::System> system = SPK::IO::IOManager::get().load("test.xml");

Being test.xml from the demos.

My application crashes while on that function, saying GLQuadRenderer is not registered, before the crash. I've been digging in the code, and in fact i see registerCoreObjects, but nothing related to GL.

I was able to solve this(i think) by doing this:
SPK::IO::IOManager::get().registerObject<SPK::GL::GLQuadRenderer>();

...just before loading the file. It said success.. But shouldn't the engine do this for me? specially because the demos don't do this? Help!

I'm using latest svn version, freshly compiled.

Tried to compile and run SPARK Test and it worked fully without any magic.
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: Questions about SPARK (2)   Tue Mar 15, 2011 7:07 am

Actually this is normal... the serialization is not performed for Renderers. This is because I wanted to perform the refactor of renderers first.
Regarding the crash, error handling when loading xml must be improved.

By registering the GLQuadRenderer, you will create one when parsing but with default values (basically a GLQuadRenderer with no scale, no texture and facing the camera). You cannot yet import custom data with renderers (unless coding it)
Back to top Go down
View user profile http://spark.developpez.com
DevilWithin



Messages : 16
Date d'inscription : 2011-01-30

PostSubject: Re: Questions about SPARK (2)   Tue Mar 15, 2011 4:18 pm

When do you think i will be ready to load/save a full system?

I hope it gets done soon, a way to have a ready to draw system from a file Smile

Back to top Go down
View user profile
DevilWithin



Messages : 16
Date d'inscription : 2011-01-30

PostSubject: Re: Questions about SPARK (2)   Tue Mar 22, 2011 7:15 pm

Im really sorry to bother again with this, but will the new renderers take long to be out? Smile

Two things,
1. test.xml has inside of it a GLQuadRenderer "serialization", "definition", not sure what to call it, and spark samples can live with that, why can't my app?
2. If i serialize my system except for the renderers, as they are not ready, i can load them and put them to render with a few easy lines right?
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: Questions about SPARK (2)   Fri Mar 25, 2011 11:57 am

Hi, sorry about the late reply, been very busy these days.

I had no time to work seriously on the renderer refactor yet. I started it but need to find some time to finish it.

Anyway you can implement serialization quite easily by modifying the renderer classes. You basically need 3 things :

  • Describe the parameters to serialize
  • Implement the import method
  • Implement the export method


The serialization is already implemented for all SPK objects except renderers. So you can take a look at what exists already.
For instance, for the Obstacle it looks like this :

In the header file, those macros allow to describe the parameters to serialize (name + type)
Code:

SPK_START_DESCRIPTION
SPK_PARENT_ATTRIBUTES(ZonedModifier)
SPK_ATTRIBUTE("bouncing ratio",ATTRIBUTE_TYPE_FLOAT)
SPK_ATTRIBUTE("friction",ATTRIBUTE_TYPE_FLOAT)
SPK_END_DESCRIPTION

In the cpp, now 2 methods must be implemented :
innerImport to load :
Code:

void Obstacle::innerImport(const IO::Descriptor& descriptor)
{
  ZonedModifier::innerImport(descriptor);

  const IO::Attribute* attrib = NULL;
  if (attrib = descriptor.getAttributeWithValue("bouncing ratio"))
    setBouncingRatio(attrib->getValue<float>());
  if (attrib = descriptor.getAttributeWithValue("friction"))
    setFriction(attrib->getValue<float>());
}

and innerExport to save :
Code:

void Obstacle::innerExport(IO::Descriptor& descriptor) const
{
  ZonedModifier::innerExport(descriptor);
  descriptor.getAttribute("bouncing ratio")->setValue(getBouncingRatio());
  descriptor.getAttribute("friction")->setValue(getFriction());
}

Hope this helps
Back to top Go down
View user profile http://spark.developpez.com
DevilWithin



Messages : 16
Date d'inscription : 2011-01-30

PostSubject: Re: Questions about SPARK (2)   Mon Apr 04, 2011 10:35 am

Hello, when compiling SPARK2 with msvc everything goes great, when i try to compile with code::blocks, i get a lot of errors like this:

Code:

..\..\..\include\Core\IO\SPK_IO_Attribute.h||In member function 'void SPK::IO::Attribute::setValue(const T&, bool)':|
..\..\..\include\Core\IO\SPK_IO_Attribute.h|171|error: invalid use of incomplete type 'struct SPK::IO::Descriptor'|
..\..\..\include\Core\IO\SPK_IO_Attribute.h|34|error: forward declaration of 'struct SPK::IO::Descriptor'|
..\..\..\include\Core\IO\SPK_IO_Attribute.h|174|error: invalid use of incomplete type 'struct SPK::IO::Descriptor'|
..\..\..\include\Core\IO\SPK_IO_Attribute.h|310|error: invalid use of incomplete type 'struct SPK::IO::Descriptor'|

...


||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|

Is this a known issue or something? thanks

P.S: whats the state of spark 2, whats new? Very Happy
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Questions about SPARK (2)   Today at 9:28 am

Back to top Go down
 
Questions about SPARK (2)
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Answer these questions with song titles
» EEG Questions
» Few questions about switching to Selenium
» 40 questions everyone is afraid to ask themselves
» Selenium Interview Questions

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: