Information Technology Reference
In-Depth Information
(a)
(b)
(c)
Fig. 2. a. Types of Game Tiles (not complete), b. Rule of Adjacent Game Tiles, c. Removing
artifacts horizontally
Fig. 3. Initialisation Algorithm Phase I-IV. Each colour represents a region, and the brown icon
is a door.
We first present how a map blueprint is created by our initialisation algorithm in
Section 5.1. Then, we detail how it evolves with a fitness function to produce the final
map blueprint and how it is mapped to the actual game environment in Section 5.2.
5.1
Initialisation Algorithm
Our initialisation algorithm consists of several phases. We first populate the blueprint
piece by piece before determining where to place strategic points and computing its
fitness.
PHASE I: Populating Game Tiles. Each game tile comprises of four smaller cells ,
which belong to either an indoor area (inside a building), outdoor area or inaccessible
area as shown in Figure 2a. A game tile can be placed in a location adjacent to an-
other game tile only if the neighbouring cells match (Figure 2b). We call this adjacency
requirement as Rule of Adjacent Game Tiles .
The map uses a grid layout, with each 'square' occupied by a game tile. The grid
is first enclosed by a layer of fully inaccessible game tiles. This ensures players can-
not move outside the map. Next, game tiles of random types are placed in unoccupied
'squares', constrained by the rule of adjacency (Figure 2b). This is repeated until it is
fully filled. An example of the generated map can be seen in Figure 3.
PHASE II: Cleaning Up. We notice several artifacts like overly small buildings or
protruding parts of buildings' remains. We scan the map blueprint both vertically and
horizontally, removing single cells which are surrounded by cells of different types as
 
Search WWH ::




Custom Search