Procedural dungeon generation in RPG games

Date04 December 2017
Published date04 December 2017
DOIhttps://doi.org/10.1108/LHTN-08-2017-0058
Pages13-14
AuthorDavid David,Albertus Agung,Yudy Tirana
Subject MatterLibrary & information science,Librarianship/library management,Library technology,Library & information services
Procedural dungeon generation in RPG games
David David, Albertus Agung and Yudy Tirana
Introduction
The purpose of a game is to meet
one’s need for entertainment and
edutainment. Games have several
elements such as text, picture,
animation, sound and video (Adam,
2010). Games have had success in
information literacy instruction and can
make learning about the library fun.
In designing a game, several
methods can be used. One of them is
procedural content generation (PCG).
PCG is a way to create content for a
game using an algorithm with input
from users along with some controlled
parameters (Shaker et al., 2016). PCG
can self-create content, so it will
decrease the workload of the game
artist as a provider of in-game assets.
PCG can also provide a way to generate
personalized games that can adapt
content according to a player’s
preferences and experience.
PCG is increasingly becoming
popular in the game-development field
(Yannakakis and Togelius, 2015). PCG
can be further developed into a
procedural dungeon generation (PDG).
PDG is part of PCG, and it is a
methodology used for automatically
creating a dungeon by using a certain
algorithm. This method is often used
in game design to create dungeons in
role-playing games (RPGs), and it can
add surprise elements each time the
game is played (Linden et al., 2014).
Related research
Some pipeline modules were used to
produce the caves in real time and
implement these using a general-
purpose computing graphics processing
technology. This pipeline has three
comprehensive approaches such as:
L-System to imitate the cracks and
form a structure of caves; the meatballs
approach used for 3D virtual engraving;
and the component rendering for
isosurface extraction from voxel data
model and enhancement through shader
programming (Mark et al., 2015).
Six layers of thorough game
taxonomy content introduced by
Hendrikx et al. were bits, space,
systems, scenarios and derived designs.
This study also conducted a comparison
of games using a PCG technique such
as Diablo, Minecraft, Realm of the Mad
God, Left4Dead, EVE Online, etc. It
turns out that many of the methods used
to generate game content from one
layer can be used to generate content
from another (Hendrikx et al., 2013).
Togelius et al. (2013) identified six
challenges for PCG research: non-generic
original content, style, general content
generators, search space construction,
interface and controllability for PCG
systems. Also included were interaction
and opportunistic control flow between
generators, overcoming any animation
bottlenecks, integrating music and other
types of content and theory and
taxonomy of PCG Systems.
Procedural dungeon generation
To generate the dungeon, one needs
some parameters and these parameters
will determine the difficulty level of the
dungeon. The parameters are number of
floors and the current player level. The
number of floors will affect the room to
be generated, while the current player
level will affect the number and level of
enemies on that floor. This process
starts by creating a dimensional array.
This array serves to store data for the
map of the dungeon. To determine the
number of rooms, a formula is used:
number of rooms 5(number of
floors/2). By using this formula, the
number of rooms will increase every
two floors starting with five rooms.
Each room will have a random width
and length with a value between four
and six. To create the dungeon map,
two methods are used: linear generation
and dynamic generation.
Linear generation begins by
generating one room. After that, one
selects the side of the room that has no
path and makes a line of three squared.
If the end of the line has a blocked path,
such as another room or another path,
then the process is repeated by
choosing the other side of the room. If
all the sides have been visited and a
new room is not found, go back to the
previous room. If the end of the path
does not have a blocked path, then a
new room will be created. This process
will continue until all the rooms are
created. The spawn player location will
be in the first room and the stairs to
enter on the next floor will be in the last
room. The player will pass the dungeon
in a linear path, where all rooms must
be visited to reach the next floor. Linear
generation is used if the game designer
wants to require the player to visit all
rooms. The time spent on each floor
will be longer owing to the increasing
number of rooms.
Dynamic generation means that the
rooms are generated at random. If there
is a room that touches or intersects with
another room, then the choices are
random for another location. After all
the rooms have been created, the next
step is to connect each room with the
path. This is accomplished by the
following steps: select the wall of a
room at random; then drag a straight
line; if the line bumps into another
room or another road, then the path will
be created; and then change the room
state to complete. If the line does not
bump into another room or road, then
choose another wall. If all walls have
been visited and the line is not
successfully created, then the room is
removed. This process will be repeated
for other rooms. The spawn player
location and stairs to enter the next
floor will be determined randomly but
not in the same room. The advantage of
this generation is that the resulting
dungeon will be random and more
varied. The drawbacks are with the
spawn player and the stairs. Because it
is random, there is the possibility of a
LIBRARY HITECH NEWS Number 10 2017, pp. 13-14, © Emerald Publishing Limited, 0741-9058, DOI 10.1108/LHTN-08-2017-0058 13

To continue reading

Request your trial

VLEX uses login cookies to provide you with a better browsing experience. If you click on 'Accept' or continue browsing this site we consider that you accept our cookie policy. ACCEPT