
126 ◾ HTML5 Game Development from the Ground Up
spots at the top of the mountain that we should now store into a suitable
data structure.
In my layout these four points are identied by the following coordi-
nates: (230,155), (570,115), (260,50), and (525,50). A good way to save them
is to use a two-dimensional array: add the Array object to the project and
then, in the On start of layout event, add an action to dene a new array
object via the Set size option. Construct’s array object is made to handle
up to three-dimensional arrays, where each dimension is labeled as width,
height, and depth (i.e., x, y, z) so, for a 2D array having four ...