Two issues with exporting graphics to HTML5

Discussion and feedback on Construct 2

Post » Thu Jul 03, 2014 2:28 pm

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!
B
8
S
2
Posts: 55
Reputation: 616

Post » Thu Jul 03, 2014 2:47 pm

This has been covered more than once. Try search and look for Ashley's responses.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
137
S
31
G
87
Posts: 5,545
Reputation: 60,434

Post » Thu Jul 03, 2014 3:12 pm

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.
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Fri Jul 04, 2014 11:44 am

zenox98 wrote: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.
B
8
S
2
Posts: 55
Reputation: 616

Post » Fri Jul 04, 2014 11:49 am

jayderyu wrote: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).
B
8
S
2
Posts: 55
Reputation: 616

Post » Fri Jul 04, 2014 1:41 pm

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.
Scirra Founder
B
402
S
238
G
89
Posts: 24,628
Reputation: 196,023

Post » Fri Jul 04, 2014 2:13 pm

Ashley wrote: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. :)
B
8
S
2
Posts: 55
Reputation: 616


Return to Construct 2 General

Who is online

Users browsing this forum: DuckoIII, yauger2 and 1 guest