A.T.L.A.S.: Automatic Terrain and Labels Assembling Software Alessandro De Francesco Laura Anna Ripamonti Davide Gadia Dario Maggiorini alessandro.defrancesco@studenti.unimi.it ripamonti@di.unimi.it gadia@di.unimi.it dario@di.unimi.it Department of Computer Science, Università degli Studi di Milano Milan, Italy ABSTRACT teams is crucial, and it requires specific solutions and ap- The interactivity and the decision making processes typical proaches [1]. A critical stage is often the creation and defi- of a video game have a strong influence on how the story nition of the story of the game. The characteristics, size and of the game should be told, but also on how the imaginary intensity of the story in a video game can vary in a rele- world of the game, where the story takes place, should be vant way across different game genres: e.g., it can be very structured. As a consequence, there is a growing interest limited in a puzzle game, while it can assume an overwhelm- in the development of tools able to couple well with the ing importance in adventure games [23], in which the game increasing demanding peculiarities of “game writing” and progression is strongly linked to the story evolution. Except “world building” activities, especially when game or level for the big companies, which can have in their staff profes- designers are called to do also the work of a writer. In this sionals devoted to the interactive stories creation (the game paper, we present A.T.L.A.S. (Automatic Terrain and Labels writers), small independent studios are forced in many cases Assembling Software), a tool aimed at the automatic creation to ask game or level designers to write stories for their video of complex imaginary worlds for video games, based on Pro- games. Unfortunately, game writing requires a different set cedural Content Generation techniques, but characterized of skills than game design. Actually, a game always includes also by a story-driven approach. some elements of interactivity and a certain number of deci- sion making processes: both of them have a strong influence CCS CONCEPTS on how the story should be told, but also on how the “game • Human-centered computing; • Computing method- world” should be structured [23]. This is particularly true ologies → Computer graphics; • Software and its engi- in games whose success is deeply rooted into strong and neering → Virtual worlds software; Interactive games; ongoing social interaction among players, such as MMOGs (Massively Multiplayer Online Games) and MOBAs (Multi- KEYWORDS player Online Battle Arena). In these game genres, the devel- Procedural Content Generation, Imaginary Worlds, Video opment process is more focused in the design of the world than on storytelling, since the “story” development is heav- Games, Story Driven, Game Story, Game Writing ily affected by the emerging narrative derived from the so- cial interaction among players [18]. Therefore, video games developers seek solutions and tools able to support their ev- 1 INTRODUCTION eryday work and to couple well with the increasing demand- ing peculiarities of “game writing” and “world building” ac- Video games are peculiar and intrinsically multidisciplinary tivities (see e.g., [5, 23, 25]), especially when game or level artifacts, requiring transversal expertise and characterized designers are called to do also the work of a writer. by an active involvement of their audience. In the devel- In this paper, we present A.T.L.A.S. (Automatic Terrain and opment process, the collaboration among multidisciplinary Labels Assembling Software), a tool for the automatic gener- GHItaly19: 3rd Workshop on Games-Human Interaction, September 23, 2019, ation of imaginary worlds for video games. A.T.L.A.S. com- Padova, Italy bines state-of-the-art techniques from the Procedural Con- Copyright © 2019 for this paper by its authors. Use permitted under Cre- tent Generation (PCG) field, with a story-driven approach: ative Commons License Attribution 4.0 International (CC BY 4.0). indeed, the tool has been designed in order to consider spe- Generator [8] is very similar to Terra Incognita, but it uses cific elements, created in the game writing stage, in the au- procedural generation instead of fractals. It supports tags, tomatic generation of the virtual environments. but they are placed automatically, with no possibility to edit The paper is organized as follows: in Sec. 2 we present them. Fantasy Maps [7] is an open-source application with an overview of procedural techniques for the generation a web-based interface. It procedurally generates 2D fantasy of imaginary worlds, while in Sec. 3 we present the pro- world in the Tolkienian fashion. The map can be person- posed tool. In Sec. 4 we present the result of an evaluation alized thorough a very limited number of parameters, but of A.T.L.A.S. and finally, in Sec. 5 we draw conclusions and cities and villages are automatically added to the map, bas- discuss major future developments. ing on a grammar consistent throughout the whole map. However, it is impossible to modify the map, once it has 2 RELATED WORK been generated, or to add manually other tags. In commer- Procedural Content Generation (PCG) [22] is an approach cial video games, Civilization VI [4] presents a tool for the with a long and established history. In the Computer Graph- automatic generation of game maps. It has a limited amount ics (CG) field, there is a relevant literature on the use of PCG of parameters, and the generated map is usable only inside for the creation of complex models like buildings [21], cities the game. Cities and locations are automatically placed in [16, 20], and materials [3, 6]. In the development of video the generated world, with no personalization allowed by the games, several works have shown the potentialities of PCG user. for the automatic creation of game levels [12, 14, 19], and for the generation of characters with different features [10, 15]. Regarding the automatic or semi-automatic creation of 3 A.T.L.A.S. FUNCTIONALITIES imaginary worlds for games, a certain number of dedicated To design and implement A.T.L.A.S., we have started from softwares have been proposed. These softwares differ mainly the analysis of the state of the art presented in Sec. 2. Since in the PCG techniques used to generate the imaginary worlds, applications for imaginary world generation are quite dif- in the level of parameterization and additional editing pro- fused and their basic design principles are quite well estab- vided to the designer, and in the nature of the generated lished, the intriguing implications from the research per- maps (only some of them produces assets which can be im- spective are more related to the definition of a set of fea- ported into the most diffused game engines). Anyway, to tures able to guide our design in developing a process and the best of our knowledge, none of them offers any form of a tool able to: (i) offer an effective and flexible help both to integration with tools for story-writing. game designers and to game writers, (ii) overcome the limits Fractal Terrain [9] uses fractal functions to generate fic- intrinsic in existing similar products, and (iii) smoothly in- tional worlds. The procedural generation can be personal- tegrate the “world building” activity with the output of the ized by setting the values of a quite noticeable number of pa- “game writing” stage. Hence, we focused on how we could rameters (such as the climate, relative percentages of ocean improve the existing approaches and tools. and land, etc.). Moreover, the world can be modified after its As a first step, we decided to focus our attention on the generation (e.g., to adjust temperatures, mountains heights). design of fantasy worlds, mainly for the following reasons: However, it produces only a 2D map, which cannot be per- they are the most diffused setting in the panorama of story- sonalized by adding tags to identify specific locations (e.g., based games, and they are easily generalizable to other set- cities and villages names). World Creator [27] exploits the tings; e.g., by choosing the appropriate value for certain gen- GPU to procedurally generate 3D worlds in real-time. The eration parameters (like the relative quantities of water and world can be personalized using a huge number of param- land), they can be easily moulded into representing other eters, it can be edited and exported as an asset, ensuring settings (e.g., alien planets). its portability into the majority of 3D game engines and As any game designer or game writer could easily testify, 3D modeling applications. Anyway, it has a steep learning to make an imaginary world “credible” and convincing for curve, and it does not allow to add tags to locations. World the player, it must be “consistent”, in the sense that no aspect Machine [28] has a more user-friendly interface, it is based in it should be perceived as “out-of-place” [2]. Then, we have on visual-scripting and it allows to procedurally generate decided to use the consistency of the world as our guiding 3D worlds, which can be exported as height-maps or meshes. light in the design process of A.T.L.A.S.. In particular, we Again, it is not possible to add tags. Terra Incognita [24] is have rooted our generative approach into an approximated based on a web site that offers the possibility to generate a simulation of the physical phenomena at the basis of the evo- 2D map using fractal functions. The interface is very easy, lution of our planet: we have selected a set of elements im- but no customization of the world is allowed, the map is pacting on the configuration of the land which is sufficiently only 2D and it is impossible to add any tag. Fantasy World effective to generate convincing landscapes and maps for games. Our approach is top-down: it moves from the gen- the maximum freedom to the designer in customizing every eral (i.e., the generation of the Earth’s crust) to the partic- aspect of the world. Fig. 2(a) shows the GUI of the proposed ular (roads, villages, specific buildings). Also, we have split tool, with the possible parameters for the generation of the our generation process into two subsequent phases: the first physical map. phase aims at creating the orography of the environment, Grid creation. The first step is the generation of the polyg- basing on elements of physical geography (plate tectonics, onal mesh of the world. The user can set the dimension of rainfall and moisture maps, hydrology, etc.), while the sec- the map, and its density (i.e., the overall number of trian- ond phase, basing on political geography principles, adds in- gles). The mesh is created by applying Voronoi tessellation habited areas to the map (i.e., cities, villages, roads, etc.). In on a set of random generated points on the map, and then this second phase, elements from the story writing process considering Delaunay triangulation on the generated tessel- can be used as input to A.T.L.A.S.. In particular, we have de- lation [17]. This approach produces irregular cells, thus im- veloped A.T.L.A.S. in order to be also used in conjunction proving the “credibility” of the terrain once the produced with GHOST, a tool [11] aimed at interactively helping the land is rendered. Moreover, Delaunay triangulation provides game and level designers to produce a solid narrative struc- an adequate navigation graph useful to support the pathfind- ture for stories, plots and tales to include in games. Figure 1 ing algorithms [13] often used in video games. summarizes the whole generation process, showing the two interconnected phases. To make A.T.L.A.S. easy to integrate Ocean and land creation. A.T.L.A.S. then subdivides the gen- in a game development pipeline, we have decided to imple- erated world in a random number of submeshes (i.e., the ment it using the Unity3D game engine. tectonic plates). Each tectonic plate can be labelled “land” or “ocean”; the number and dimension of the oceans are deter- mined on the basis of specific parameters set by the user. Plate tectonics simulation. Once all the plates are in place, A.T.L.A.S. simulates tectonics effects: for each plate it is as- signed a force, whose direction and magnitude affects the in- teraction of the plate with its neighbouring ones. The forces magnitude could be modified by the choices of the user (e.g., if she has set a high value for the number of mountains, plates will collide with a stronger impact). According to the type of interaction at the borders of two plates, we can have constructive (a depression is produced), destructive (a high ground appears) or conservative (a small rise will be gen- erated) margins. The effect on the surface are milder for oceanic plates. The final effect of this simulation produces a map that is perceived as realistic, since it mimics the natural phenomena affecting the surface of our planet. Mountain elevation computation. Once the high grounds and the depressions have been appropriately distributed on the grid, the elevation of each single cell is calculated by means of a distribution based on Perlin-noise [6]. The final height of each cell is obtained by adjusting it to that of its neigh- bours, in order to avoid unnatural effects due to excessive Figure 1: Scheme of A.T.L.A.S. generation process. displacements. Volcanoes generation. The following step is the creation of A.T.L.A.S. physical map volcanoes (if any): one or more random mountains near a destructive margin are turned into volcanoes. As shown in Fig. 1, the generation of the physical map has a modular structure: each step in the generation of the orog- Rainfalls simulation, rivers and lakes generation. Basing on raphy is affected by a different subset of parameters, and is the climate set by the user and on the orography, a moisture based on its own generation technique. This approach sim- map is created with a random distribution and magnitude, plifies the overall generation process, at the same time guar- using again Perlin Noise. The rainfall distribution is used anteeing an outcome highly “credible”. Moreover, it allows both to place lakes (they are randomly scattered throughout (a) (b) Figure 2: A.T.L.A.S. GUI (a) and an example of generated imaginary world (b) the map, but they appear more frequently in areas with a Pre-defined points of interest placement. Once the influence lot of rainfall and moisture, avoiding very high mountains) maps have been defined, it is possible to decide the most and to define the elevated areas adapt to place the springs appropriate location for points of interests like e.g., cities, of rivers. Both the number of rivers and lakes is affected by castles, forests. In the first step related to the placements the parameters set by the user. of points of interests, we have designed A.T.L.A.S. in order to be part of a larger ecosystem of tools aimed at the cre- Biomes assignment. The last step assigns biomes to areas. ation of contents for story-driven video games. To this aim, We use a simplified version of the Whittaker diagram [26], a certain number of locations can be imported directly from where temperature is inversely proportional to the eleva- those present in a structure for a story produced by GHOST tion, and moisture is directly proportional to rainfalls and [11], a tool for the interactive production of a solid narra- proximity to water sources. tive structure for stories to include in games. We have de- fined positioning rules for each element that could be gen- A.T.L.A.S. political map erated by GHOST: for example, a city is placed randomly in During the second phase (Fig. 1), elements like cities, vil- the map, but with highest probability near lakes, rivers, sea, lages and roads are distributed on the map according to the mountains and fields; a forest is placed in an area with an ad- parameters set by the user and the orography of the terri- equate biome. The rules take into consideration also the in- tory, generated in the first phase. fluence maps: for example, the probability in the placement Influence maps generation. To simplify the positioning of places we have adopted an approach based on influence map- ping. Influence maps are gray level images representing in each point the effect of a certain parameter or value on the neighborhood. They have been proposed in PCG techniques aimed at the automatic generation of large cities [16], but they are also applied in the development of real-time strat- egy video games [13]. This approach can be customized to label points in maps according to specific perspectives: for example, we could represent how the existence of a river influences the fertility of a region. In particular, A.T.L.A.S. produces influence maps to track the impact of: rivers, lakes, oceans, fields, volcanoes, mountains, forests, elevation, pop- ulation. For example, the last variable helps in deciding where to place cities, by keeping track of the areas more favourable Figure 3: An influence map of the impact of heights used to the flourishing of a population. Fig.3 shows an influence for the political map generation (lighter areas are positions map of the impact of heights (lighter areas are the highest). more influenced by heights). of a city is lowered for already densely populated areas in In Fig. 4 we have resumed the outcomes of the questions the influence map. on the user experience and the functionalities of A.T.L.A.S.. Regarding usability (Fig. 4(a) and 4(b)), the clear major- Custom places placement. A.T.L.A.S. allows also the genera- ity of testers gave us a positive feedback on A.T.L.A.S.. The tion of places directly defined by the user. On the basis of generated maps seemed to be highly appreciated, in both the data in the influence maps, and of the constraints set the physical and political aspects (Fig 4(d), 4(e) and 4(f)). by the user, the tool determines the most appropriate posi- Regarding the parameters available in A.T.L.A.S., the feed- tion inside the map. For example, it is possible to force the back was again positive (Fig. 4(c)), even if, in the suggestion spawning of a certain location in a position characterized section of the questionnaire, some users have reported that either by a combination of a predefined biome, height, pop- they would have preferred a finer control on the generation ulation density, humidity, presence of a river/road, etc. of places like cities or dungeons. Roads generation. To generate a convincing road network, we have emulated the principles adopted in the European 5 CONCLUSION AND FUTURE WORK Middle Age to create roads: at that time, carriageable roads In this paper, we have presented A.T.L.A.S., a tool for the were generally used only to connect large enough cities. automatic generation of imaginary worlds for fantasy video Thus, in A.T.L.A.S., for each couple of relevant places (e.g., games. We have based the procedural generation of the imag- cities) the traveling distance is calculated: if it exceeds a pre- inary world on an approximated simulation of the physical defined threshold, no road will appear. If a road can exist, phenomena at the basis of the evolution of our planet, start- the A* algorithm [13] is applied to determine the best path ing from the placement of physical elements like mountains, to move from the first to the second place. The algorithm oceans, etc., and then adding inhabited areas to the map. In avoids unwalkable tiles (such as: water flooded areas, high this stage, the tool has been designed in order to consider mountains, etc.). Once the best path has been found, a road specific places created using tools to interactively help the is built, whose width is directly proportional to the product production of narrative structures for stories to include in of the population of the two locations and inversely propor- games. tional to their distance. The feedbacks we have collected from the first tests with In Fig. 2(b), it is shown an example of generated imagi- users are encouraging. Future developments will consider nary world by A.T.L.A.S.. the introduction of a higher number of parameters aimed at a finer tuning of the generated world and of complex places 4 A.T.L.A.S. EVALUATION like cities or dungeons, the introduction of a scripting lan- A.T.L.A.S., in its prototypal version, has been tested with guage for a better control on the placement of pre-defined real users, in order to evaluate its effectiveness in the sup- points of interest generated by GHOST (or by other tools for port to the imaginary world creation process. We have asked game writing), and the development of a final phase aimed to a group of testers to download the tool and its documenta- at further checking the imaginary world consistency. tion, and to try to use it to create several imaginary worlds. We have then asked them to answer to a questionnaire, com- REFERENCES posed of four sections, aimed at collecting respectively: de- [1] Barbara R. Barricelli, Li Zhu, and Claudia Iacob. 2011. A Meta-Design mographic data, opinions on the user experience, on the Model for Creative Distributed Collaborative Design. Int. J. Distrib. functionalities of A.T.L.A.S., and suggestions and critics. Syst. Technol. 2, 4 (2011), 1–16. We have enrolled 29 testers (38% females, 62% males, be- [2] Richard Bartle. 2003. Designing Virtual Worlds. New Riders Games. [3] Alessio Bernardi, Davide Gadia, Dario Maggiorini, and Laura Anna tween 21 and 45 years old, with average age 25 years). Most Ripamonti. 2019. Using a Genetic Algorithm for the procedural gen- of the subjects were master students in Computer Science, eration of layered materials for real-time rendering. In Proceedings of all of them specializing in video game design and develop- GAME-ON 2019 Conference. ment (37.9%). Another 24.1% of the testers were working in [4] Civilization VI. 2019. https://civilization.com/. video game field at the time of the test. 79.3% of the subjects [5] Mary DeMarle. 2007. Nonlinear Game Narrative. Charles River Media. [6] David S. Ebert, F. Kenton Musgrave, Darwyn Peachey, Ken Perlin, and reported to play often to fantasy video games, and 51.7% of Steve Worley. 2003. Texturing & Modeling: a procedural approach. Mor- them agreed or strongly agreed that coherence between the gan Kaufmann. map in a fantasy video game and the real word is an impor- [7] Fantasy maps. 2019. http://mewo2.com/notes/terrain/. tant factor. More than the half of the testers (51.7%) have [8] Fantasy world generator. 2019. http://donjon.bin.sh/fantasy/world/. tried in the past to create a map for a fantasy game: 35.7% [9] Fractal terrain 3. 2019. http://secure.profantasy.com/products/ft.asp. [10] Andrea Guarneri, Dario Maggiorini, Laura Anna Ripamonti, and of them has reached the goal in less than 3 hours, while a Marco Trubian. 2013. GOLEM: Generator Of Life Embedded into relevant percentage (21.4%) has spent more than 12 hours MMOs. In Proceedings of the Twelfth European Conference on the Syn- on the task. thesis and Simulation of Living Systems: Advances in Artificial Life, ECAL. 585–592. [11] Andrea Guarneri, Laura Anna Ripamonti, Francesco Tissoni, Marco Trubian, Dario Maggiorini, and Davide Gadia. 2017. GHOST: A GHOst STory-writer. In Proceedings of the 12th Biannual Conference on Italian SIGCHI Chapter (CHItaly ’17). ACM, New York, NY, USA, Article 24, 24:1–24:9 pages. [12] Claudio Mazza, Laura Anna Ripamonti, Dario Maggiorini, and Davide Gadia. 2017. FUN PLEdGE 2.0: A FUNny Platformers LEvels GEn- (a) Is A.T.L.A.S. difficult to use? erator (Rhythm Based). In Proceedings of the 12th Biannual Confer- ence on Italian SIGCHI Chapter (CHItaly ’17). ACM, Article 22, 22:1– 22:9 pages. [13] Ian Millington. 2019. Artificial Intelligence for Games, Third Edition. CRC Press. [14] Fausto Mourato, Manuel Próspero dos Santos, and Fernando Birra. 2011. Automatic Level Generation for Platform Videogames Using Genetic Algorithms. In Proceedings of the 8th International Conference on Advances in Computer Entertainment Technology (ACE ’11). ACM, (b) Is A.T.L.A.S. GUI easy to understand? Article 8, 8:1–8:8 pages. [15] Daniele Norton, Laura A. Ripamonti, Mario Ornaghi, Davide Gadia, and Dario Maggiorini. 2017. Monsters of Darwin: A Strategic Game Based on Artificial Intelligence and Genetic Algorithms. In Proceed- ings of the 1st Workshop on Games-Human Interaction (GHItaly 2017) (CEUR Workshop Proceedings). [16] Yoav I. H. Parish and Pascal Müller. 2001. Procedural Modeling of Cities. In Proceedings of ACM SIGGRAPH ’01. ACM, 301–308. [17] Franco P. Preparata and Michael I. Shamos. 1985. Computational Ge- ometry: An Introduction. Springer-Verlag. (c) Are the parameters sufficient to tune the generated map? [18] Laura Anna Ripamonti, Marco Granato, Marco Trubian, Antti Knutas, Dario Maggiorini, and Davide Gadia. 2018. Multi-agent simulations for the evaluation of Looting Systems design in MMOG and MOBA games. Simulation Modelling Practice and Theory 83 (2018), 124 – 148. [19] Laura Anna Ripamonti, Mattia Mannalà, Davide Gadia, and Dario Maggiorini. 2017. Procedural content generation for platformers: de- signing and testing FUN PLEdGE. Multimedia Tools and Applications 76, 4 (2017), 5001–5050. [20] Manlio Scalabrin, Laura Anna Ripamonti, Dario Maggiorini, and Da- (d) Are the generated maps adequate for a fantasy game? vide Gadia. 2016. Stereoscopy-based procedural generation of virtual environments. In Proceedings of IS&T’s Stereoscopic Displays and Ap- plications XXVII (28t h Symposium on Electronic Imaging : Science and Technology). 1–7. [21] Michael Schwarz and Pascal Müller. 2015. Advanced Procedural Mod- eling of Architecture. ACM Trans. Graph. 34, 4, Article 107 (July 2015), 107:1–107:12 pages. [22] Noor Shaker, Julian Togelius, and Mark J. Nelson. 2016. Procedural Content Generation in Games: A Textbook and an Overview of Current (e) Are you satisfied by the physical geography (placement of Research. Springer. mountains, oceans, etc.) of the generated map? [23] Lee Sheldon. 2013. Character Development and Storytelling for Games, Second Edition. Thomson Course Technology PTR. [24] Terra Incognita. 2019. http://gmworldmap.com. [25] Huaxin Wei, Jim Bizzocchi, and Tom Calvert. 2010. Time and Space in Digital Game Storytelling. International Journal of Computer Games Technology 2010, Article 8 (2010). [26] Robert H. Whittaker. 1975. Communities and Ecosystems. MacMillan Publishing Company. [27] World creator. 2019. http://www.world-creator.com/. [28] World machine. 2019. http://www.world-machine.com. (f) Are you satisfied by the political geography (placement of cities, villages, etc.) of the generated map? Figure 4: Evaluation of the user experience and the function- alities of A.T.L.A.S.. Answers expressed using Likert scale (1 = Strongly Disagree, 5 = Strongly Agree).