Jump to content

Dror Rejwan

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Dror Rejwan

  1. 3 hours ago, lucid said:

    I sent it to you, but all I did was delete all the entities except the first one.

    O.K, I spent some time with the code and think I found the cause for the slow loading.
    It looks like the cause is the nlohmann/json library.

    When loading the XML version, it loads up in 1 second where in the json version it takes around 10 (!).

    Also it is not clear to me why the XML spriter file is smaller than the JSON, since JSON should be a'lot thinner, but thats another question.

    Lucid, I assume that when you checked it yourself, you did that with the SCML version too, right ?

  2. 30 minutes ago, lucid said:

    I sent it to you, but all I did was delete all the entities except the first one.

    Yes, I can see you did that.

    The project loads much faster now, around 10 seconds, I think its still not optimal but I will test to see if non-debug version is faster.

     

    Is there a way to dynamically create character maps through the code ?
    I may have to dig inside to see how this can be done, but if you have any pointers for me I will appriciate.

  3. 6 hours ago, lucid said:

    Debug mode might be causing things to go much slower.  The scon file just has a lot of repeated information in it.  See below:
     

     

    I hadn't gone through all the animations, so I didn't notice they were all the same.  I see you already have character maps in your project.  You don't need to duplicate the animation for each design.  That's what the character maps are for.  You can use them to try out on your character in Spriter and to playback in the implementation.   After removing the duplicate entries, the file was only 435k.

    Thank you,

    Can you please send me the fixed file so we can take a look and study for future characters ?

    I hope this will fix the problem.

  4. Also, another question on the matter

    As you can see from the Spriter project I sent you, there are 12 "monsters" that all look has the same movement animations but using different PNG's (e.g a blue monster, a red monster, a white monster etc..).

    Is it possible to use the library to "construct" a monster from various monsters ?
    (or in other words, combine different animation elements into a new animation) ?

    If so, can you please give pointers to where I should investigate ?

     

    Thanks !

  5. Hi

    I've implemented the library into my SFML based project.
    I've just replaced the "to override".
    Basically had to update the file factory and object factory a little.
    Remove the XML support and left only the JSON support.

    Currently trying to load a 6 MB JSON file that has 12 sprites consist from 6 MB of PNG files,
    took more than 2 1/2 minutes to load, raising the memory usage to 2 GB which were dropped significantly after load to around 400 MB.

    I output to log texture loading to see if this is a bottleneck and its not, loading the textures (one by one, not from an atlas file) was pretty quick.

    Something is wrong, does anyone have  an idea where to look ?

    I have yet to try implementing a sprite to the screen, just focusing on loading.

×
×
  • Create New...