Testing your PlayCanvas Game in CocoonJS
Before you generate a native build of your PlayCanvas game, you will want to test it in CocoonJS and see how it performs. Ludei have created an awesome app called the CocoonJS Launcher that can pull your PlayCanvas game directly from playcanvas.com and run it on the device. Just give the launcher your game's URL and it will happily run in the launcher.
Let's step through the process to illustrate how easy it is:
- Create an account on ludei.com.
- Install the CocoonJS Launcher for Android or iOS.
- Start the Launcher on your mobile device.
- Select 'Your App' and log in.
- Select URL and enter the URL to your embeddable link (see below) for your PlayCanvas game.
Type this into the URL edit box in the Launcher and hit 'CANVAS+' or 'WEBVIEW+'!
Your game can be accessed by one of two links. The build link or the project link.
http://playcanv.as/b/BUILD_ID- links to a specific build
http://playcanv.as/p/PROJECT_ID- links to the project's Primary App
To get the embeddable version of either link, add
/e/ after the host. e.g.
Generating the Native Build of your Game
Now that you have tested your game on your mobile device via the CocoonJS Launcher app, you are ready to build a native version. Once again, Ludei makes this really easy for you. Just follow these simple steps:
- Log in to the Ludei Dev Portal.
- Hit the 'New Project' button.
- Fill in the Project Information form.
- Select iOS configuration from the left.
- Select the link to load default assets from the web. This will set default images for icons and loading screen. You can change these at any point to your own images.
- Select Compilation -> Compile Project.
- Download your game from PlayCanvas as explained in the self-hosting guide.
- Select the downloaded ZIP file.
- Check the platforms your want to publish to.
- Accept the conditions.
- Hit 'Compile Project' and you're done.