Sprite strips and project size

0 favourites
  • 4 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • Hi All,

    I haven't found this information in my searches of the forums, so here goes...

    I have been using the "import sprite strip" function because it's a quick and easy way to get animations into C2. Up until now, I haven't thought much about its impact on project size.

    I have the same sprite strip in 2 different formats, PNG-8 (150Kb) and JPEG (65Kb). The strip is 6 cells long. I have tested importing each format into C2 using "import sprite strip" and have gotten new estimates of project size that don't make sense to me.

    When I import the PNG-8, the project size estimate increases by 400Kb. When I import the JPEG, the project size estimate increases by 600Kb. This is a larger increase than I was expecting. Also, it seems odd to me that the JPEG strip, which is smaller, would increase the project size more than the PNG-8.

    So, here's my question: What is the exact process when a sprite strip is imported? Specifically, what does C2 save besides the original sprite strip?

    Knowing this would help me to decide whether to import the frames one at a time.

    Thanks so much for any help, and, as always, thanks for a wonderful tool in C2!

  • Remember the estimate is only a guess: the only way to know for real is to actually export your project, which will run various CPU intensive compression algorithms and compact the project size down. More info in this blog post. The estimate is pretty crude since it doesn't do all that work.

    When you import images, regardless of the format of the image, C2 stores it in the project as PNG-32. This is what the estimated size measures, so there should be no difference between importing a PNG-32, a PNG-8 or a JPEG on the estimated size.

    You can set a different export format in the image editor. It's still PNG-32, but will be recompresed to either PNG-8 or JPEG upon exporting if you use this option. It's not automatically set, so if you import a JPEG it will still export a PNG-32 unless you click the image format button and change it to JPEG.

    The export format is not currently taken in to account in the estimated size, but for the next build I've changed it: PNG-8 will be estimated to be half the size, and JPEG will be estimated to be a quarter the size. Again those are pretty arbitrary guesses, so you'd have to export to know for sure.

    Hope that helps!

  • Thanks for the quick reply, Ashley! This is a helpful summary of the format issues. I should've tested some actual exports before I posted. I will try that shortly to get some more data.

    Specific to the sprite strip importer: can you say quickly what it does to the strip during the import? Is it slicing it into pieces and resaving individual files for every cell?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, it will slice each frame in to a separate PNG-32 file. Save as a folder project and browse the files to see what it's doing.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)