What is a safe maximum memory size for WebGL PlayCanvas builds?

We like to purchase PlayCanvas for our new 3D simulations, which needs to support mobile browsers. So, please answer my below questions:

1- What is the safe maximum memory size for WebGL PlayCanvas builds without loading errors/memory issues in mobile devices?
2- We tried with free playCanvas build and a it shows ~30MB and took ~15 mins time in iPad (iOS 8.1) to download and launch?
3- We need to develop ~20 Minutes 3D interaction simulation, does playcanvas/webgl handle it in mobile browsers (Android and iOS)?
4- Is there any process to optimize the assets/build for mobile browsers?
5- Does PlayCanvas allow developer to write scripts like AJAX calls etc?

Thanks a lot!!
-Chandu

Hello.

You better take a look on preloading and streaming

And surely you can use AJAX like a regular JS feature.

1 Like

Thanks Mike, if possible can you please answer my above questions item wise?

Mainly:

3- We need to develop ~20 Minutes 3D interaction simulation, does playcanvas/webgl handle it in mobile browsers (Android and iOS)?
4- Is there any process to optimize the assets/build for mobile browsers?
1- What is the safe maximum memory size for WebGL PlayCanvas builds without loading errors/memory issues in mobile devices?

I’m not quite sure about every point.
3. I played Tanks (game on PlayCanvas) on iOS8 around 30 mins and it was okay, I don’t think there may be any problems.
4. You can compress textures, images.Your simulation is a web application, so there is the same rules,
5. I don’t know exactly, but i’m almost sure it depends on operation system. iOS 8 has memory issue, when browser reloads page when is exceeds memory limit, but I’ve never had it with PlayCanvas.

1 Like

There are few things to look at:

  1. Download Size - this is what defines how long it will take untill users will be able to interact with your content. In the web, you always want to have it as tiny as possibly. Consider using streaming and async assets loading to deliver only necessary content first, and stream what needed on demand.
  2. RAM usage - this usually is not a problem, unless you doing something very crazy, computing a lot of data in your app.
  3. VRAM usage - this is major consideration for mobile. Mobile VRAM is actually shared with RAM, and is not very large. So for example, if you use uncompressed, raw texture, lets say PNG of resolution 4096x4096, that is about 90Mb of VRAM with mipmaps. On low end devices with 512Mb of RAM, this means you barely can have few of these, remember that this RAM is shared by OS and other apps too. So VRAM usage - is huge consideration, and we do provide tools to deal with it well:
    a. You can load/unload textures on demand.
    b. You shall compress textures to mobile friendly compression formats, that can save at least 6 times of VRAM usage.
    c. Geometry shall be simple as well, as large buffers takes longer to download, parse, render and they take more VRAM too.

Pretty much same rules apply as for native development, but you have to consider the fact that users in web do not want to wait loads of MB to download. So you have to keep initial download as small as possible.

Downloading on mobile internet will be always slow. You have to make initial download tiny, regardless of technology you are using.
30Mb - is a lot, unless you deliver content to users that have to access it, people will simply not wait that long.

You can have app running as long as you want. If it is engaging and users like it - they will use it as long as they want.
Same rules apply here as for any other platform development, nothing special:

  1. Manage your memory, avoid leaks.
  2. Make content engaging.
  3. Make content accessible (UX).

Yes. You have to keep things simple. Same process applies here as for any other tools developing optimised content for mobile - it has to be small and compressed.

Writing code for PlayCanvas, is writing same JavaScript for any other purpose. You have full control over your code and environment. There is no compilation/translation in the middle. And there is no isolation - you have full access from JS to anything that browsers offer as for classic web development.

1 Like

Thank you so much Max for your reply. It is very helpful.
-Chandu

1 Like

Hi Max,

Can you please look the below different browsers/devices/platforms and confirm which areas the PlayCanvas work and which areas it wont?
Operating systems:
MS Windows 7
MS Windows 8
MS Windows 8.1
MS Windows 10
OSX 10.10 - Yosemite
OSX 10.9 - Mavericks
ChromeBook

Browsers:
Chrome 40+
Safari 7.x+
Firefox 35+
IE10+Windows Edge Browser

Requirements:
Android 4.4+
Android 5.X
Android 6.0
iOS 7.1.2+
iOS 8.X
iOS 9.X

Also:

iPad Pro (12.9 & 9.7 inch)
iOS 10.x
Android 7

Browsers:
Chrome for Andorid
Mobile Safari for iOS

Also, if possible please share the list of compatibility PlayCanvas can offer across different devices?

Many Thanks!
Chandu

Hi, chandu.

I’m not Max, but PlayCanvas based on WebGL technology so device compability depends on it.

You can check it on caniuse

Also, there is FAQ with your questions

Which browsers are supported by PlayCanvas? What about Internet Explorer?
PlayCanvas runs in all major web browsers. Note that Internet Explorer 11 or Edge is required to run PlayCanvas.

Does PlayCanvas support mobile devices?
Yes, PlayCanvas runs in mobile Safari and Chrome for Android. You can also wrap your PlayCanvas app as a native mobile app (APK or IPA) for shipping to the App Store or Google Play. To do this, we recommend taking a look at Ludei’s Cocoon or Intel’s XDK.

What are the system requirements to run PlayCanvas?
In order to run the PlayCanvas tools, you simply need to have a supported web browser installed. Ultimately, the hardware requirements will largely depend on the scope of your game. A small social game will clearly require less advanced hardware than an asset-heavy high fidelity action shooter game, for example

1 Like

Also worth checking out this section in the User Manual:

http://developer.playcanvas.com/en/user-manual/introduction/#supported-browsers

1 Like

We strongly maintain compatibility of all core features across all platforms that support WebGL.
If technology relies on partly available extensions, we implement fallbacks so it behaves the same on all platforms, but might differ in performance.

Hi mikefinch, Will and Max thanks all for your quick response.