[SOLVED] Base Project Size

Hey guys!
So I’m looking to use Playcanvas for a freelance gig my team has coming up, but we are very new to web stuff working previously mainly with Unity or Unreal. A big concern with the upcoming project is overall size, and performance, so obviously using Unity is off the cards.

Im wondering what the base size of an exported project is, for instance what the exported html size would be if it contained nothing but a completely empty scene. I’ve looked across the site and tried searching for this info in the forums, but was unable to find anything, but apologies if this has already been answered.

The end product we will be working on will be a kind of interactive ad targeted at phone users, so whatever we do has to be ultra light weight and load very quickly. Unity’s base size is like 20mb or so, we would prefer to be between 1 to 2 meg max.

The playcanvas graphics/scenegraph engine ~700kb
The physics engine (ammo.js) is 1.3Mb

I’m not quite sure how big the framework that the playcanvas editor uses is (eg to handle model pre-loading and scene handling - which isn’t part of the engine). I imagine the complete system will be under 3Mb base size.

I use playcanvas engine-only, writing my own scene handling/loading, and my latest project’s complete size is (excluding a 5Mb music file) is 3Mb. So keeping size down is possible

Some constraints:

  • A single vertex occupies at minimum 6 floats of about 15 decimal places, so a minimum of 90 bytes. Thus, a 1000 poly model will be at 90kb plus some overhead.
  • Textures are generally a large portion of the project, with a 1024x1024 jpeg being from ~20kb to >200kb each.

However as you are targeting an advert, I hope you don’t need high fidelity!

Ahah! That pretty much answers my question thank you!
I would be interesting in seeing the project you are talking about that is 3Mb as a point of reference if possible.
Also what do you mean by scene loading/handling?

What they want is verrry light weight, basically they want a little single scene, single screen remix of frogger using 8bit pixel art. So we should be able to do it very light indeed, especially as we wont need the physics engine. We are hoping for between 1 to 3Mb, though we are unsure of standards for this kind of thing.

PlayCanvas after gzipping is about 300-400 KB IIRC.

You should be able to fit a frogger clone well within 3MB. This Flappy Bird example downloads only 275KB: https://playcanvas.com/project/375389/overview/flappy-bird

Ideally you want to the user to see/interact with the page as soon as possible so you can load just enough assets to get to the title screen/simple intro while continue to load the remaining assets in the background.

Just be conscious of texture and audio file sizes as they can easily eat into the published build size. A 512 x 512 is considerably smaller than a 1024 x 1024 texture.

Read this - it will answer all your questions.

My project is currently residing at:

The HUD is inactive currently until I muster up the courage to write some GLSL for the graphs. I also need to optimise the memory allocation to prevent the microstutters every second or two.

Not gzipped: 2.7Mb
Gzipped: 726kb

Also what do you mean by scene loading/handling?

If you use the playcanvas web interface to make your game, you can forget that I mentioned this. It’s only for strange people like me who don’t use the online interface.