YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

20
YGGDRASIL WORLD GENERATION A modular approach to procedural world generation

Transcript of YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Page 1: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

YGGDRASIL WORLD GENERATIONA modular approach to procedural world generation

Page 2: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Features• Highly flexible• Semi predictable output• Modular framework• Automatic world update• Step-by-step generation • Random and prefabricated rooms

• High control over room layouts and spacing

• Three different graph generators• Ensured connectivity

• Two different corridor generators

Page 3: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Generation Screenshots

Page 4: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Normal distribution

Page 5: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Generation Process• Generation is split into modules

• Room and layout generator• Node graph generator• Node graph simplifier• Corridor generator• Grid conversion• Wall generator• Binary space partitioning

• Run in order, can require data from others• External configuration files

Page 6: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Generation Process

Page 7: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Rooms and layout• Prefabricated Rooms

• High variety and control

• Randomized Rooms• Normal distribution

• Room Layout• Circular algorithm

• Portals• Connectivity between rooms• One on each side

Page 8: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Rooms and layout

Page 9: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Node graph generators• Connect the rooms• Three algorithms

• Delaunay triangulation• Gabriel graphs• Relative neighborhood graphs

• Circles• Greedy and expensive algorithms

• Problem: All nodes are checked• Solution: Sort nodes on XY-axis

Page 10: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Node graph generators

Page 11: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Node graph simplifiers• Minimum Spanning Tree (MST)• Lowest edge cost• Ensures node connectivity to graph• Remove redundant edges

• Remove loops• End with tree structure

• Greedy algorithms

Page 12: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Node graph simplifiers

Page 13: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Corridor generator• Node graph for connectivity

• Either complete or simplified graph

• Portals• Find closest between two rooms

• Various shapes• L-shapes• Straight lines• Bresenham’s algorithm

• Width

Page 14: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Corridor generator

Page 15: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Grid conversion and walls• Convert dungeon data to grid format

• Wasteful on memory

• Walls• Line between void and non-void cells in grid• Internal walls between corridors and rooms

Page 16: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Grid conversion and walls

Page 17: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Binary space partitioning • Splits dungeon grid into smaller pieces• Later usable for

• Render optimization • Physics• Artificial Intelligence• General performance

optimization

Page 18: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Step-by-step generation• Generate in real time

• One frame = one step

• Three stage process• Pre step• Step• Post step

• Highly useful• Graphic representation of generation process• Preloading next level

• No loading times!

Page 19: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Live demonstration

Time for a live demonstration of

Yggdrasil World Generation

Page 20: YGGDRASIL WORLD GENERATION A modular approach to procedural world generation.

Questions?

Any questions about anything?