O'Reilly logo

Learning Construct 2 by Aryadi Subagio

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing data in Construct 2

This is usually the time when I teach you to destroy the enemies and add scores to the game. However, because the focus of this chapter is to store data from the game, we'll cover this first. There are four objects we can use to store data in Construct 2: array, dictionary, WebStorage, and XML. We're not going to cover XML in this book, because XML is a bit hard for beginners of programming, but only knowing the first three is enough for you to save data from your game.

Getting to know arrays

An array, in programming context, is a list of ordered things. An array can be a list of all text values, all number values, or a combination of text and numbers. In programming languages, arrays are written as a list of data inside ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required