Need put lots of assets into the game

Hi, all.
We need to put lots of 3D assets into our game, say about 600M.
My question is if we put all of those onto PlayCanvas server via the editor, would the editor become very slow while we are coding the game?
Also, would it be very hard to deploy the game? Cause there are lots assets and the building and downloading of the game is not fast for now as I know.

Is there any solution to deal with huge amount of 3D assets?

It would mean that opening the project may take a little while as the assets get downloaded. I don’t know if PlayCanvas Editor caches some of files. It does do lazy loading so it shouldn’t be too bad.

Once it’s loaded, it should be fine.

Builds on the PlayCanvas Editor will take longer as it has to package all the assets into a build. Loading the application as an end user once it is deployed depends on you have set the assets to load. E.g are they all set to preload or do they only load once they are needed?

One of the common ways is to host the assets on an external server and load them dynamically in the application. This means that the editor project won’t have the assets in the project making it quick to load and quick to build. You may still need to use the editor to convert/build the models, animations, materials etc and download the files to be hosted on the external folder.

I know the preload and lazyload functionality, there won’t be game loading time problem on end user side. The problem is that for each deployment it takes long time to download the game from PlayCanvas for self hosting in China.
I have thought about hosting the assets on an external server too, but it’s inconvenient as you mentioned. Thank you.

Another option is that if you are on the ORG plan, is to use the API to build the project and download the build. It will still take as long but it can happen in the background/as a job on a CI machine and you can also have CI unzip and upload to your server.

That way, it won’t tie up your local machine and you can just get on with the next feature etc.

CICD is great! We’ll consider that.
We are on ORG plan (curtis@bitguild.com).
Thank you.

I’ve been using Python for to do the builds via the API. Below is my script:

import sys
import requests
import time
import subprocess
import os
import shutil
import zipfile
import io
import re

FNULL = open(os.devnull, 'w')

build_path = '../build'
export_url = 'https://playcanvas.com/api/apps/download'
job_url_template = 'https://playcanvas.com/api/jobs/{}'

headers = {
    'Authorization':'Bearer AUTHKEY',
    'Content-Type':'application/json'
}

data = '{"project_id":000000, "name":"Some project name", "scripts_concatenate":true }'

job_poll_interval_secs = 1

job_id = -1
download_url = ''

# Request the download of the project
print('Requesting project download job')
r = requests.post(export_url, headers=headers, data=data)

if r.status_code == 201:
    json = r.json()
    status = json['status']

    if status == 'running':
        job_id = json['id']
    elif status == 'complete':
        download_url = json['url']
    else:
        sys.exit(1)

else:
    print('Error: {}'.format(r.status_code))
    sys.exit(1)

if len(download_url) == 0:
    print('Waiting for job to complete')

    # Poll job till its complete
    job_url = job_url_template.format(str(job_id))
    job_finished = False

    while not job_finished:
        r = requests.get(job_url, headers=headers)

        if r.status_code == 200:
            json = r.json()
            status = json['status']

            if status == 'complete':
                download_url = json['data']['download_url']
                job_finished = True
            elif status == 'running':
                print('Still waiting')
                time.sleep(job_poll_interval_secs)
            else:
                sys.exit(1)
        else:
            sys.exit(1)

# Remove all files from the snapshot directory 
print('Clearing snapshot directory')
shutil.rmtree(build_path)
os.mkdir(build_path)

# Download zip from JSON response
print('Download archive from {}'.format(download_url))
r = requests.get(download_url)
z = zipfile.ZipFile(io.BytesIO(r.content))

# Unzip the archive
print('Unzipping archive')
z.extractall(build_path)

Thank you, yaustar.
I have another concern about the game build and deployment.
If we are coding new features which are not intended to be deployed while building the game, will the new code (or assets) affect the build process? Wil the build include the new code which are not intended to be deployed?

If it is in the project, it will be in the build. I would consider using feature flags that allow you to disable/enable WIP features.

Sorry, I don’t understand what you meant.
What are WIP features?

WIP = Work In Progress.

Sorry, we didn’t get the meaning of ‘Work In Progress’. Could u please explain in details?

What is your current workflow in developing this game and creating builds to publish/upload to a host?

We currently use the editor to build and download the game for self hosting.
If putting in lots of 3D assets in the game won’t slowdown the editor as you mentioned, and so won’t affect the development in the editor, then things should be fine.
The build and downloading of the game from Playcanvas for deployment is slow in China, but I think we can just wait the downloading to be complete, as long as the downloading can successfully finish.

Thank you.