Book Image

Construct 2 Game Development by Example

By : John Bura
Book Image

Construct 2 Game Development by Example

By: John Bura

Overview of this book

Table of Contents (16 chapters)
Construct 2 Game Development by Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Where to Go from Here
Index

Introducing arrays


Arrays are really powerful when it comes to game design. Essentially, an array is a grid of data. We can fill up this grid with any kind of information that we want. In the past, arrays were used quite heavily as the technology was limited, and even today arrays are still used and are still very useful. Here is a visual representation of an array:

(data)

(data)

(data)

(data)

(data)

(data)

(data)

(data)

An array is a table of data. You have probably seen this in a spreadsheet program. We can store multiple items of data in arrays. This differs from variables because we can now add large amounts, of data.

We can use arrays for the following purposes:

  • To save multiple points of data

  • To store game object information

  • To use a tile map

  • To create save states that save large amounts of information

  • To create a data set that will help us save time during development