1 of 28

Shape grammars for level generation in an action RPG game

Tomáš Kalva

2 of 28

Soulslike action RPG

  • 3rd person
  • Combat-focused
  • Exploration

3 of 28

Shape grammar

  • System of rewriting rules for generating shapes
  • Left hand side - context
  • Right hand side - new shapes
  • Derivation - multiple applications of rules
  • Used in architecture

4 of 28

Modular kits

5 of 28

Implementation

6 of 28

Discretized space - grid

7 of 28

Grid components

Vertical faces

Vertical edges

Horizontal faces

8 of 28

Shape manipulation tools

  • Shape creation, extruding, splitting…
  • Hierarchical definition of shape
  • Shape placement constraints
  • Pathfinding

9 of 28

Paths

10 of 28

Styles

11 of 28

Shape grammar - production rule

12 of 28

Production rule definition

13 of 28

Derivation

14 of 28

Derivation

15 of 28

Derivation

16 of 28

Derivation

17 of 28

Derivation

18 of 28

Derivation

19 of 28

Derivation

20 of 28

Derivation

21 of 28

Random application

22 of 28

Linear application

23 of 28

Multiple grammars

Random => linear => goal based

24 of 28

Game

25 of 28

Enemies

  • Simple behavior
    • Move to the player
    • Attack based on the player’s position (blue boxes)
  • Mostly melee attacks and shooting
  • Can use various weapons

26 of 28

Gameplay

  • Combat
  • Simple inventory - view/use item
  • Interacting with objects

27 of 28

To do

  • Put all the components together into a game
  • Create language for creating:
    • Objects in areas
    • Levels
    • Runs
  • Fix bugs and polish

28 of 28

Thank you for your attention