Microsoft Azure and Construct 2
When you start building applications or games at some point you are going to run into the question “Where do I save data?”. Some apps can keep data locally but if the app or game wants any viral or social activity then a central data store will be needed at some point. There are plenty of ways to go about doing that but today I am going to touch briefly on Azure Mobile Services and Construct 2.
First lets briefly describe Constuct 2. Construct 2 is a cross platform game editor. You can create casual 2D games very quickly. Add some animation and artwork and you can have a stellar looking game in no time. I have some articles on my site and a few of my collegues have some great videos and tutorials.
Azure is Microsoft Cloud platform. This platform enables productivity for all devices ranging from IoT(Internet of things) to Mobile Devices to Web Application. Content Delivery, Virtual Machines, Web Hosting and more. To find out more about Azure visit azure.microsoft.com.
The assumptions here are you already built a Construct 2 game AND you already set up Mobile Services out on Azure.
I built a quick game that you need to jump on platforms and avoid the red lines. The further you get, the better your score.
The one issue with the plugin, is your game needs to be running within a Windows 8 application. If you want it to run just on a HTML5 site all you have to do is search for the Azure plugin within the Construct 2 output file and comment out a few lines. Find the onCreate function and replace it with the following.
instanceProto.onCreate = function()
azureRuntime = this.runtime;
azureInst = this;
this.appURL = this.properties;
this.appKey = this.properties;
this.mobileService = new WindowsAzure.MobileServiceClient(
Find the insertRecord and comment out the following line as well
Basically anywhere it says this.isWindows8 you can comment out. OR you can set that to be true when it first initalizes in the onCreate function.
And…presto…your Windows 8 Azure Plugin is now working for HTML5 Websites.
- Everytime you export you have to perform these operations.
- If you minify then good luck finding these functions
Next up is to fork this plugin and create one for HTML5.