Some material json issues

I was going through the material json files and noticed a couple things have changed:

  • The size has got way way bigger. You now export all attributes, even ones that aren’t used? It’s 1.9kb instead of 200bytes. I can manually cut this down, but would rather not.
  • “bledType” as well as “blendType” in material.json files. Looks like a typo somewhere.

For typo - thanks. Affected only imported materials from models. Fixed.
Regarding size of material, we can look at it indeed. Take in account that it is served within single json file at the end, and is gzipped, which actually gets tiny, around 800bytes per material.

The only complication of dropping default values from format, is that if we do change what default value is in engine, then materials will change appearance. But we will look onto that.

tiny, around 800bytes

Our definitions of tiny may be different. To me 300bytes is tiny. And 1kb is a moderate size. But I suppose compared to the images and sounds, it’s pretty negligable. I should just lighten up!

The target size for my (complete) game is 4mb not including levels. I’m currently at 3mb and still need to add 5 sounds and a script to deal with networking. The biggest item in my game is … ammo.js weighing in at 1.4mb. I wonder if there’s a minified version that’s smaller?

All js and json are served gzip’ed, so they get smaller.
Ammo.js is compiled using emscripten from C++, and unfortunately as most emscripten stuff - is large. It is already minified.
Consider streaming some stuff, disabling preload on assets, to load them in async manner, that allows to get loading finished and allow user to interact with app, before it is fully loaded.
Same applies for sounds, they definitely can come as non-preloaded, getting loading later on as game goes.