shinkan's Recent Forum Activity

  • Spritesheeting is subject to various options like the project downscaling quality setting, the image format of each frame, and a few other things. I could not say why this is happening unless you provide a .capx demonstrating it.

    I would happy to provide you capx file, but unfortunately this behavior is so random so even if I make a demo file there is no guarantee that this will happen at all :/

  • Exactly. Most game engines operate usually only on p^2 textures. So while you make your graphic assets you can aim for 1024x1024 for your character sheet and you know exactly how much space you have and how many frames you can fit into. But here's not the case. You can more less estimate if your final animation fit in 1024^2, but you need to know that before you start designing your assets. And if for some reason you forget about "extra fringe" then you will get nice surprise after export, because your arts were 2 pixels two big You ended up with 2048^2 half empty sheet.

  • shinkan That is because Construct uses power of 2 for spritesheeting. So, in your case, 3 64x64 images are smaller than one 128x128 image. Also, two 258x17 can`t be on a sheet that is lower size than 512, because 512/2 = 256, your image is 2 pixels too wide. And considering that Construct uses 1 pixel each side for sheeting, the max size for a 512x512 sheet would be 254.

    Hope I could help you, and sorry for my "engrish", I am Brazilian.

    I'm all aware how C2 uses power of 2 texture, you don't need to explain that to me.

    I'm not complaining, C2 does a great job with sprite sheets, but occasionally it's hard to predict what results you will get.

    And it still does not explain why textures make with proper size are sometimes sprite sheeted and sometimes not.

    In my current project I have a sprite with 14 frames, each one is 1022x254 - made them like that so they can be all placed in nice sprite sheets after export. And again sometimes it will make 1 sprite sheet 2048x2048 (which fits all frames all together), sometimes it will make 2 sheets 1024x1024, and rarely it makes 14 separate images 1022x254. and even more very rarely i got few 1024x1024 sheets with only two images inside.

    So yeah. I only try to understand how C2 decides what and when will be sprite sheeted.

  • rozpustelnik When I exporting my frames I always export them at same size - no matter what's the animation or pose, always export them for example at 512x512. This will make sure all frames are correctly align so image point is always on same place. Only when everything is in place and works like it should I will crop them all to reduce size for each frame.

  • newt it's actually true. While making sprite sheets C2 adds now a fringe for each image to get better seamless results (it was added few releases back). Which is great but a bit strange approach, because you can't make perfect p^2 textures anymore. You need to make them a bit smaller to fit p^2 on export... Which again in some cases can be problematic.

  • Seeing as how the export is made to use pow^2 for sprite sheets, wouldn't it be nice to have something that says you have nth much space left for the next nearest p^2?

    To be honest, after a lot of tests I still can't figure out how C2 exports to sprite sheet. Sometimes it will put all frame into a sprite sheet and sometimes it will leave all frames as separate objects... But if Image editor could show me how my sprites will look like after export then I'm all in.

    https://www.scirra.com/forum/viewtopic.php?f=146&t=118152&p=849467#p849467

  • Yes, there is.

  • It should always be only an "Animation editor" not Image editor.

    This is more important

  • besides this Ads issues... any news about music not changing volumes etc?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ah, maybe I was wrong - and it actually is probably more useful that way anyway. If you create an object at runtime then you might create it again later even after destroying it, so keeping its textures loaded helps prevent jank on the next creation.

    Weeell not necessarily xD

    Action to unload object would be really nice.

    Scenario of how this could be useful. I was struggling with this for mobile games

    You have a background made from 20 different objects and a lot of instances of them (tilemaps, tileddbg and sprites), and then on start of the layout you could simply paste all this objects into a Paster plugin and destroy/unload those objects because you don't need them anymore for this layout.

    So instead of ending up with a bunch of different objects you have only one object that uses less memory and is easier to manipulate.

    From my tests 1 sprite with few animations, each one have four frames with big images takes about 50mb of image memory.

    After adding a Paster and pasting all of this sprites memory goes to about 60-65mb - Paster+current sprite loaded into a memory.

    15mb or even 30mb instead of 50mb it's quite a lot for mobiles

    Please consider adding an option to unload objects from memory, pretty please ^^

  • No: the runtime treats separately objects which are placed in the layout, and objects that are not placed in the layout but created at runtime. If you destroy the last of an object that was placed in the layout, it is still not unloaded until the end of the layout. If you destroy the last of an object that was not placed in the layout, it will unload it.

    hmm, did something change in releases since this post?

    In r187 I have two layouts. layout1 is completely empty, layout2 have a sprite with few frames.

    In runtime on layout1 when I click mouse button it creates Sprite from layout2, at this point image memory goes up to ~28mb. But if I then destroy this object image memory stays at ~28mb.

    It looks like this "If you destroy the last of an object that was not placed in the layout, it will unload it" is not working, because after destroying last instance of the object that was initially not placed on layout1 it will keep it in memory instead of unloading it.

    Edit: Switching between layout1 and layout2 shows image memory correctly. ~3mb for layout1 and ~28mb for layout 2. So i would assume that C2 is not unloading objects from memory even if you destroy the last instance of object from other layout.

  • Yep, build fail, same as others with XDK 1536

shinkan's avatar

shinkan

Early Adopter

Member since 21 Nov, 2008

Twitter
shinkan has 8 followers

Connect with shinkan

Trophy Case

  • 16-Year Club
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

25/44
How to earn trophies