background preloader

Datas

Facebook Twitter

WebStorage - Construct 2 Manual. The WebStorage object can store data locally on the user's computer between sessions. For example, it can be used to store the last save checkpoint, and restore the player's progress if they come back the next day. (Note: if you want a full-state save and load feature, see How to make savegames.) Note that despite the name the WebStorage object does not use online storage. Since data is stored locally to the user's computer, it will work when offline, as well as for storing data in offline exporters such as node-webkit or mobile wrappers like CocoonJS. WebStorage does not store in the browser cache. If the user opts to empty the browser cache, WebStorage data remains intact.

However if the user opts to clear all their cookies or offline website data, WebStorage will be cleared. Storage per domain The WebStorage object associates all stored data with the current domain. Most browsers implement a maximum size of the data that can be stored with WebStorage - 5mb is a common limit. Local vs. Rfc2049. Network Working Group N. Freed Request for Comments: 2049 Innosoft Obsoletes: 1521, 1522, 1590 N. Borenstein Category: Standards Track First Virtual November 1996 Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Abstract STD 11, RFC 822, defines a message representation protocol specifying considerable detail about US-ASCII message headers, and leaves the message content, or message body, as flat US-ASCII text.

Properly Configuring Server MIME Types - Web security. Background By default, many web servers are configured to report a MIME type of text/plain or application/octet-stream for unknown content types. As new content types are invented or added to web servers, web administrators may fail to add the new MIME types to their web server's configuration. This is a major source of problems for users of Gecko-based browsers, which respect the MIME types as reported by web servers and web applications. What are MIME types? MIME types describe the media type of content either in email or served by web servers or web applications and are intended to help guide a web browser in how the content is to be processed and displayed.

Examples of MIME types are: text/html for normal web pages text/plain for plain text application/octet-stream meaning "download this file" application/x-java-applet for Java™ applets application/pdf for Adobe® PDF documents. Technical Background Why are correct MIME types important? Why browsers should not guess MIME types Security. How to use loader layouts to make custom loading screens. A common request is to customise Construct 2's loading screen. This can be done by using a loader layout, which is a special layout shown while the project is still loading. Creative possibilities Here are some interesting ideas about how to best take advantage of having your own loading screen: - You can design the progress bar in the same style as the rest of your game. This helps immerse the player in your game's look-and-feel from the moment the game starts loading. - The loading screen could be designed like the main title screen, so the player feels they are closer to being able to play the game. - You can also include information like instructions and controls on the loading screen, so the player can read something useful while waiting.

. - You could even include a mini-game, or a tiny section of the actual game, so the player can be kept entertained while waiting. How projects load Before making a loader layout, it's best to understand how Construct 2 projects are loaded. 1. 2. 3. 4. 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. Note: if you rename your index.html file - even just to change the extension, e.g. index.php or index.asp - make sure you also change the line with index.html in offline.appcache. Updating your game This allows you to easily make a simple auto-updater for your game. Conclusion. Project Files - Construct 2 Manual. Any external files can also be imported to your project via the Project Bar. This is useful for including any other resources your project might need, such as videos, additional images, JSON data, XML data, text data, documents, or other general files you might want to let the user download.

For ideas on uses for project files and possible workflows, see the tutorial Using project files in Construct 2. Files can be imported by right-clicking the Files folder in the Project Bar and selecting Import Files. By default you can add any kind of file to the project, but you can also set the file filter to only show text-based files if those are the kinds of files you are looking for. Importing project files has the following effects: The file is copied to your project folder, or stored inside the .capx file.

Project files can also be AJAX requested at runtime using the AJAX object's Request project file action. MIME types.