Offline games in Construct 2. Construct 2 games work offline.
So long as the game has been downloaded once while online, the user can play the game again after going offline. This is great for both iOS web apps and Chrome Web Store hosted apps, since you don't need to be online to play! This tutorial describes how the offline support works and how you can enhance it with features like auto-update. The App Cache file After exporting your project, you should notice a file called offline.appcache in the exported folder. It's important to note when you upload your project, some servers are not set up to serve .appcache files correctly.
If everything is set up right, the browser will save your entire game to disk after loading it for the first time.
Construct 2 r154 (Beta) Download. New this build: a multiplatform in-app purchases (IAP) plugin!
Previously it has been difficult to set up IAP in games, requiring different plugins and events for each platform you want to publish to. This plugin aims to eliminate that work, having a single set of events for a single object that handles IAP on whichever platform you export to. The initial release of this plugin has support for the Windows Store, CocoonJS, Blackberry 10, Amazon Appstore, and Tizen. Other platforms are not yet supported, but we will be looking in to adding support for others in future.
Overview of plugins and behaviors Plugin scripts Plugin and behavior scripts are located at Each plugin has its own folder. Good luck! AJAX object. The AJAX plugin allows web pages to be requested during the running of the game.
The tokenat system expression may be useful to split simple responses. Tags A different tag can be provided for each request. Making AJAX requests cross-domain or in preview By default, browsers block AJAX requests across domains. In node-webkit. AJAX Example with Construct 2. Construct 2 has an AJAX object that will allow you to make a request to a target page in order to return the resultant data to AJAX.LastData where we can use the information collected.
In this tutorial I'm going to show you:1. How to set up a simple interface that can form as the boilerplate for future tutorials.2. How to set up a simple php file (we can also use a simple .txt file)3. How to connect the AJAX object to make a call to our target page then return it to our HTML5 page. If you are already familiar with Construct 2, you can skip step 1. Here's an example of what we're going to make: It's located at: If you click the image, it will do the following: