Game Development Reference
In-Depth Information
Checking an array's properties
Once you have done this, you can see that the object type is called an array. This is like
adding a sprite. You can have multiple sprites in one game and you can have multiple ar-
rays in one game. If you wish to add more than one array, simply double-click on the back-
ground and add another one. If you want to change the name of the array, you simply need
to select it, press the F2 key, and then rename it. Click on the array on the right-hand side
and look to the left to see the properties, as shown in the following screenshot:
You can see the properties of the array in the preceding screenshot. It has a width, a height,
and a depth. What this means is that arrays can be one-dimensional, two-dimensional, or
three-dimensional. Currently, we have a one-dimensional array. This means that it only has
a width. In this case, the array will be a single row and looks like the following table:
It has a width of 10 cells with a height of one cell and a depth of one cell.
Tip
For the most part, it is recommended that you start with easy arrays. Most starting deve-
lopers can get confused with complexity. It is always better to make development simple.
One thing about arrays is that the base of an array starts at 0. This means that the cells are
numbered as shown in the following screenshot:
0 1 2 3 4 5 6 7 8 9
Search WWH ::




Custom Search