Como exportar a CocoonJS

1

Taggé

Contributeurs

Statistiques

6,254 visites, 6,618 vues

Outils

Partager

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Nota: Cuando exportas con android recomendamos "Crosswalk" ya que este tiene mas compatibilidad con juegos de construct 2. Para más información visita How to export to Android with Crosswalk. Tambien recomendamos Cordova para iOS.

La estabilidad de los juegos HTML5 en dispositivos móviles es un problema, especialmente con dispositivos viejos. CocoonJS by Ludei es un servicio que envuelve tu juego como una aplicación móvil nativa (similar a cómo funciona PhoneGap), pero también aumenta significativamente el rendimiento mediante la aceleración de hardware. Esto puede resultar en un aumento de rendimiento de 5-10x, a menudo se resuelven problemas de rendimiento

Integrando servicios de CocoonJS

Para añadir opciones de CocoonJS solo añade el objeto "CocoonJS" en la pestaña de añadir objetos

Exportando para CocoonJS

En el Export Project dialog, elije Export for: CocoonJS.

Abre la carpeta donde se exporto. Cuando exportas a CocoonJS te dara un simple archivo .zip. Este es el archivo que necesitas subir al servicio de CooconJS

Obten el launcher de CocoonJS

Para probar como funciona tu juego en dispositivos moviles solo instala la app desde el appstore/playstore:

CocoonJS Launcher in the Google Play store

CocoonJS Launcher in the iTunes store

Run the app and press Your app. You'll need to press the Register button and get a registration code. When you receive your code, enter it in to the app. It'll be saved so you only need to enter it once.

Testing with the CocoonJS Launcher

To test your game, enter its URL (e.g. from the public link on Dropbox) to the Launcher app, and press Launch current. CocoonJS will download the zip, then launch the game.

After pressing Launch current, you can also later press Launch previous to run the last entered URL again. There are also options to save your games to the SD card so you can preview several of them even without a connection.

You can touch the cog button to enable debug mode. In debug mode an FPS counter will appear. You can press the FPS counter to see a debug log which may include helpful information about unsupported features or any errors that happened.

It's also possible to use Preview over Wifi when testing with the CocoonJS launcher, which helps speed up testing cycles significantly. Just enter the preview URL in to the Launcher app's URL field, e.g. 192.168.1.3

Compatibility

The following features are not supported in CocoonJS. If any of them are used, Construct 2 will print a message to the debug log saying that they are not supported.

- The form control plugins Textbox and Button are not supported.

- The XML object is not supported.

- The Facebook object is not supported.

- The letterbox fullscreen modes are not supported. If they are selected, it will fall back to 'Scale outer' mode instead.

- The Text plugin's 'Set web font' action is not supported.

- The WebStorage plugin's session storage is not available. Use local storage or global variables instead.

Using the Cloud Compilation system

Once you've tested your game with the launcher and are happy that everything is working, you can go ahead and build it. Ludei provide the Cloud Compilation system, which is where you upload your app to Ludei's servers which build it in to Android and iOS native apps.

To find out more about this process, it is best to use Ludei's documentation. Visit this URL to get started using the Cloud Compilation system:

http://wiki.ludei.com/cocoonjs:cloud

Y buena suerte publicando tus aplicaciones de android y ios!

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!