Two issues with exporting graphics to HTML5

0 favourites
  • 7 posts
From the Asset Store
This is a Dungeon Master tool & the 1st of 12 Combat Engines from the Building Combat Engines for Browser Games workshop
  • Hello! I'm a long-time techie and coder, but new to Construct 2.

    When I export a project to HTML5, I notice two issues with how graphics are handled:

    1) The sprite graphics are stored as individual files and not compiled into sprite sheets (except for individual animated sprites). Doesn't this hurt performance, especially for games with large numbers of sprite types?

    2) My JPGs are converted to PNGs. For large background images without transparency, JPG makes more sense than PNG. But C2 is automatically converting them and adding needless megs and loading time to my project. Is there any way to change this?

    Any feedback or suggestions would be appreciated. Thanks!

  • This has been covered more than once. Try search and look for Ashley's responses.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1) On one you are right. Ashley says one thing("don't worry about managing sprites") but he does do good sprite batching practisies by batching images into single sprites. Often by layer to reduce overdraw on WebGL calls.

    If you can I suggest sprite batching into a single sprite object. And then use a variable and build the SOL by doing a compare on the object var... If your not sure what this is. I suggest going through the manual and some tuts

    2) Well how you presented the information has you sound like your not 100% accurate. The JPG/GIF/BMP/PNG is only a storage model. Once the system unpacks the image into RAM it's all the same. So while JPG could reduce the download size. It's not really going to be a big difference unless you need that bleeding edge download. Most people don't need it. However if you need it. Just take the PNG in the export and convert it to JPG.

  • This has been covered more than once. Try search and look for Ashley's responses.

    Already did that. Did some more.

    Found the setting to change a graphic to JPG export.

    Still have no idea about sprite sheet exporting.

  • Well how you presented the information has you sound like your not 100% accurate. The JPG/GIF/BMP/PNG is only a storage model. Once the system unpacks the image into RAM it's all the same. So while JPG could reduce the download size. It's not really going to be a big difference unless you need that bleeding edge download. Most people don't need it. However if you need it. Just take the PNG in the export and convert it to JPG.

    I want a smaller download, smaller storage footprint, and a faster loading time, all of which does indeed matter if it's JPG. And it turns out there's a setting to do just that in the sprite editor (Properties, Animations, Edit, Set export image format) without converting it back manually after the export (which would also result in image degradation).

  • Our rationale for the way spritesheets are done is explained in this blog post: https://www.scirra.com/blog/87/under-the-hood-spritesheets-in-construct-2

    It's a trade-off between various concerns of PNG color counting and recompression, loading feedback, backwards compatibility, and a few other concerns.

    All images are exported as PNG unless you set them to JPEG in the image editor.

  • Our rationale for the way spritesheets are done is explained in this blog post: https://www.scirra.com/blog/87/under-the-hood-spritesheets-in-construct-2

    It's a trade-off between various concerns of PNG color counting and recompression, loading feedback, backwards compatibility, and a few other concerns.

    Ah, thank you! That explains in detail exactly what I was wondering about. And it does make sense.

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