GameSalad & Cordova Part 1

Posted by

For a while, GameSalad has also supported Cordova. Exporting to HTML would also produce the files to support Cordova integration. But since I didn’t know of any way to communicate with the engine this integration had limited use and very little benefits over just exporting to the target native application.

This all changed recently. As some of you might know GameSalad for the first time that I am aware of either introduced or documented how to communicate with the engine after the game has been exported as HTML5.

I don’t represent GameSalad in any way but I believe this was done to support their new partner Legends of Learning. If you have kids that need some extra help especially now that they are at home, I would recommend checking their products. Anybody that supports GameSalad should also be supported.

This series of blog posts and youtube videos will try to document my journey as I try to discover and integrate functionality through Cordova that I always wanted in GameSalad. I only have a really old mac so if you are on a PC, I don’t know know how much this series would be helpful.

So here we go:

  1. Followed the steps to get Cordova installed. For the create platform step, I said I wanted to create an iOS app:
    • $ cordova platform add ios

  2.  I exported my game from the GameSalad portal. For this project, I am using the game that I created for the “repair” game jam. The game, project, and export are already available in multiple places including itch.io.
  3. From the export, I copied everything into the Cordova project under platforms -> ios -> www.
  4.  I renamed the Cordova HTML file to index.html. In the end, your folder should look like this:Screen Shot 2020-04-10 at 11.40.37 AM
  5. I then moved all the useful tidbits from the sample sample-legendsoflearning.html file to the cordova-app.js (<- attached here) file inside the js folder. I remove all the references to the LoL library since Cordova won’t have those. For now, most of the functions are blank, I’ll fill those up as I work on the integration.
  6. As the final step, I fired off Xcode and make sure that the project still runs. Screen Shot 2020-04-10 at 11.43.33 AM

That is all I did yesterday. Questions or comments let me know.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.