Grammars and L-systems with applications to vegetation and levels

  • Togelius J
  • Shaker N
  • Dormans J
N/ACitations
Citations of this article
54Readers
Mendeley users who have this article in their library.
Get full text

Abstract

5.1 Plants are everywhere Just like most games that feature physical movement include some form of terrains, very many games feature some vegetation in some form. Grass, trees, bushes and a myriad other forms. Vegetation seems like the perfect case for PCG: we need to create a huge number of artefacts (there are many trees in the forest and many straws of grass in the lawn) that are similar to each other, recognisable, but also slightly different from each other. Just copy-pasting trees won't cut it 1 as players will spot it quickly. Further, in most roles vegetation is of little functional significance, meaning that a botched plant will not make the game unplayable, just look a bit weird. And in fact, vegetation is one of the success stories of PCG. Very many games use procedural vegetation generation, and there are many software frameworks avail-able. For example, the SpeedTree middleware has been used in dozens of AAA games. It turns out that one of the simplest and best ways to generate a tree or bush is to use a particular form of formal grammar called an L-system, and interpret its results as drawing instructions. This fact is intimately connected to the " self-similar " nature of plants, i.e. that the same structures can be found on both micro-and macro-levels. For an example of this, take a look at a branch of a fern, and see how the shape of the branch repeats in each sub-branch, and then in each branch of the sub-branch. Or look at a romanesco broccoli, which consists of cones on top of cones of top of cones... (see figure 5.1). As we will see, L-systems are naturally suited to reproducing such self-similarity. In this chapter, we will introduce formal grammars in general, L-systems in par-ticular and how to use a graphical interpretation of L-systems to generate plants. We will also give examples of how L-systems can be used as a representation in search-based PCG, allowing you to evolve plants. However, it turns out that plants 1 In William Gibson's Neuromancer, portal novel of the cyberpunk movement, one of the main characters is busy copy-pasting trees in one of the early chapters. 73

Cite

CITATION STYLE

APA

Togelius, J., Shaker, N., & Dormans, J. (2016). Grammars and L-systems with applications to vegetation and levels (pp. 73–98). https://doi.org/10.1007/978-3-319-42716-4_5

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free