SlideShare a Scribd company logo
Procedural
Contents
Generation
History and techniques used in the modern video-game industry.
05.2015 /Davide Aversa
Introduction
PCG: Definition and Basic Concepts
What is PCG?
“PCG is a family of techniques,
algorithms and procedures used for
generating contents in an automatic way
rather than manually.”
What is PCG?
PCG IS NOT RANDOM
What is PCG?
PCG IS A WAY TO OVERCOME
THE LIMITED HUMAN
IMMAGINATION
Why PCG?
▪Help Designer at Design Phase.
▪Generate Contents at Runtime
History of PCG in games
▪ 1952: One of Alan Turing’s final projects was a computer-based,
automated love-letter generator, which some have identified as the
first known work of new media art. It was programmed by
Christopher Strachey in 1952 for the Manchester Mark I computer.
Darling Sweetheart
You are my avid fellow feeling. My affection curiously clings to your passionate wish. My liking
yearns for your heart. You are my wistful sympathy: my tender liking.
Yours beautifully
Example:
History of PCG in games
PCG was born as a way to compress
data. There was literally no enough space
to store pre-made artworks and data.
▪ 1980: Richard Garriott's Akalabeth is the
(maybe) first game to use a seed to
generate the game world.
History of PCG in games
▪ 1980: Rogue, the real ancestor of the
rogue-like games used PCG to create a
fully replayable game experience.
▪ Rogue, and all the rogue-like games from
then, are one of the main game genres to
use PCG in modern videogame.
History of PCG in games
▪ 1985: The Sentinel had 10,000 different
levels stored in only 48 and 64 kilobytes.
History of PCG in games
▪ 1985: Elite use PCG to generate an
universe with 8 galaxies with 256 solar
system each. Each solar system has from
1 to 12 planets, each with a space station
in its orbit, a proper names, a personal
terrain , prices of commodities, and name
and local details.
▪ Everything have to be contained in a
32Kb home PC. Both code and
“contents”.
▪ SO EVERYTHING IS PCG
History of PCG in games
▪ The seed of the universe is hardcoded.
▪ The seed number in the released game is
4096
▪ However, there was some problems.
Some solar system was poorly connected
and the random name generator
sometimes used profanity to name
planets or space stations. :)
History of PCG in games
▪ The original algorithm is open source and can be found here:
▪ http://www.iancgbell.clara.net/elite/text/
▪ A detailed explanation of the algorithm is given here:
▪ http://www.gamasutra.com/view/feature/3377/algorithms_for_an_infinite_universe.php
History of PCG in games
▪ By the way, the new version of Elite, Elite
Dangerous use PCG to generate 1:1
replica of the Milk Way with more than
400 billion star systems.
▪ If we assume 1Kb per star system (very
optimistic), without PCG the full system will
occupy more than 400 Terabyte.
History of PCG in games
▪ Then the CD comes and developers became able to store thousands of times as
much data than was possible in the early 80s, using procedural generation to
build large worlds became unnecessary.
▪ So nothing happens, until mid 90s. At this time PCG has three main purposes:
1. Automatize designer into producing assets (for instance trees, rocks, foliage, and so
on)
2. Increase the amount of contents in a game in a way that is not possible to do manually.
3. Provide improved replayability of a game!
History of PCG in games
▪ 1995: Diablo was one of the first games
to introduce PCG and rogue-like games
into the modern era of the videogame
industry.
▪ Introduced
▪ Random dungeon layouts.
▪ Random item generation. This was the
new things in commercial videogames.
History of PCG in games
▪ After 1996, real-time PCG was almost
only confined into RPG, space games or
obscure rogue-like game (not really
mass-popular at that time).
Federation of Free
Traders (1998)
Strange Adventures
in Infinite Space
(2002)
Dark Clouds (2000)
History of PCG in games
▪ Commercial design PCG based tools was
instead starting its business!
▪ For instance, SpeedTree, the most
famous PCG tools for trees and other
organic assets, starts in 2002.
History of PCG in games
▪ 2006: Dwarf’s Fortress. Meanwhile,
some obscure developer was
implementing a state-of-the art fantasy
world generator.
▪ The DF engine can generate:
▪ A full who takes into account weather,
biomes, geological distribution of materials,
plate tectonics, wind and water erosion.
▪ A full history for the world with population,
races, cities who can rise and fall.
▪ Poetry, monsters, animals, events, cities
and A LOT MORE.
History of PCG in games
Dwarf’s Fortress was (and is) a niche
game. Inspired by that game Markus
Persson (Notch) decided to develop
Minecraft (2009)
Minecraft is considered the root of the
modern hype for PCG in the game industry.
History of PCG in games
Since then, PCG is now present in almost
every non-FPS game released!
Modern PCG
How PCG is used nowadays!
Types of PCG
▪ There are six main application of PCG
▪ Runtime Random Level Generation
▪ Design Of Level Content
▪ Instancing Of In-Game Entities
▪ User Mediated Content
▪ Dynamic Systems
▪ Procedural Puzzles And Plot Generation
Runtime Random Level Generation
▪ It is generation of game levels/world while the game is
being played or loaded. In this category fall all the map
generation techniques. It is probably the most famous
type of PCG techniques in games.
▪ Notable Games: Elite, Minecraft, Spelunky, Diablo, and a
lot more.
Runtime Random Level Generation
Design Of Level Content
▪ It is the use of PCG techniques at design or build time.
In other world, the goal of PCG is to help the designer into
creating contents.
▪ It is usually hidden to the final player.
▪ A common example of these techniques is the use of
fractal height map to create landscapes and terrains
which will than populated with other objects by hand.
▪ Notable Games: almost every game since 2002.
Design Of Level Content
Instancing Of In-Game Entities
▪ These techniques are, in some sense, orthogonal to the
previous category.
▪ Instead of generating the world, they instantiate the game
objects (such as, trees, monsters, characters, item,
treasures and so on).
▪ Notable Games: Left for Dead. It is used to instantiate
dynamically the enemies into a static environment in order
to provide variety and some adaptation capability to the
game.
Instancing Of In-Game Entities
User Mediated Content
▪ This is a borderline technique.
▪ It uses the users themselves as a source of new and “PCG”
contents. This can be also be mixed with other PCG
techniques (hence the word “mediated” in the name).
▪ Users can manually change PCG parameters to generate
personalized contents, share these parameters, and so on.
▪ Notable Games: Spore, X-COM and Dryad, a tool for tree
and organic offline generation.
Dynamic Systems
▪ This is PCG applied to agent behaviors.
▪ For instance, dynamic systems such as weather, and
group and crowd behaviour, can be modelled using PCG
techniques.
▪ In short: PCG applied to agent-s behaviors.
▪ Notable Games: S.T.A.L.K.E.R.: The Shadow of
Chernobyl, contains one thousand non-scripted
characters.
Dynamic Systems
Procedural Puzzles And Plot Generation
▪ PCG can be also applied to plot, story, quests and puzzle
generation.
▪ This is a more difficult field because it often requires some Natural
Language Processing ability. However, many games are starting
to integrate automated quests into their code and gameplay.
▪ Puzzles can be extended by making multiple parts of the
dependency graph randomly placed (e.g. moving the key that
opens the door to a random accessible location) or by changing the
shape of the dependency graph completely.
▪ Notable Games: Apophenia, indie-fully PCG puzzle game. Mount
and Blade, for the PCG plot (thanks to community mods).
Cutting-Edge PCG
There are a lot of other PCG field expanding right now. This field are not still fully
absorbed by the game industry.
▪ Experience-Driven Procedural Content Generation
▪ Use player experience as a source for PCG algorithms.
▪ Search-based procedural content generation
▪ Use evolutionary technique to produce more controllable PCG contents.
▪ Procedurally Artistic-Contents Generation
▪ Visual art, music, poetry, architectures and so on.
▪ Procedurally Generated Gameplay
PCG in practice
Some Real-World algorithm for PCG
Teleological vs. Ontogenetic
▪ Teleological Algorithms: creates an accurate physical model of the environment
and the process that creates the thing generated, and then simply runs the
simulation, and the results should emerge as they do in nature. Usually used in
offline applications.
▪ Ontogenetic Algorithms: ontogenetic approach observes the end results of this
process and then attempts to directly reproduce those results by ad hoc algorithms.
Usually used in online applications.
T
O
Mazes
O
Mazes are one of the eldest form of PCG. Studied in mathematics for several
decades.
There are A LOT of algorithms:
• Prim’s Algorithm: http://bl.ocks.org/mbostock/11159599
• Random Traversal: http://bl.ocks.org/mbostock/70a28267db0354261476
• Randomized Depth-First: http://bl.ocks.org/mbostock/1ef3b1fb9eb35ca8ffff
• Wilson’s Algorithm: http://bl.ocks.org/mbostock/11357811
• And others….
Cellular Automata
A cellular automata is a grid of cells, each one
having a state, and a rule for determining what
state a cell transitions to based on the state of it
and its neighborhood.
Used for cave/natural-like environments.
O
Cellular Automata
function cellularLogic(r,c,clean) {
var numWalls = countAround(r, c, 1, 1);
var numWalls2 = countAround(r, c, 2, 2);
if (isWall(r,c)) {
if (numWalls >= 3) { return 1; } return 0; }
else {
if (!clean) { if (numWalls >= 5 || numWalls2 <= 2) { return 1; } }
else { if (numWalls >= 5) { return 1; } } } return 0; }
L-System
O
An L-System is a parallel rewriting system and a type
of formal grammar.
• Introduced in 1968 by Aristid Lindenmayer, a
botanist. Was used to describe the behavior of
plant cells and to model the growth processes of
plant development.
L-System: Example
O
variables : 0, 1
constants: [, ]
axiom : 0
rules : (1 → 11), (0 → 1[0]0)
The shape is built by recursively feeding the axiom
through the production rules.
axiom: 0
1st recursion: 1[0]0
2nd recursion: 11[1[0]0]1[0]0
3rd recursion: 1111[11[1[0]0]1[0]0]11[1[0]0]1[0]0
L-System: Example
O
At the end we add a semantic to each symbol. For
instance:
• 0: draw a line segment ending in a leaf
• 1: draw a line segment
• [: push position and angle, turn left 45 degrees
• ]: pop position and angle, turn right 45 degrees
11[1[0]0]1[0]0TRY THIS
L-System Use Case: PCG Buildings
O
L-Sys has been proven useful for PCG buildings.
Müller, Pascal, et al. Procedural modeling of
buildings. Vol. 25. No. 3. ACM, 2006.
Use basic building block (L, H, U and T) and use
grammars to generate complex shapes (rotation,
splitting, scaling, roof selection and a lot of things).
L-System Use Case: PCG Cities
O
L-Sys has been proven useful also for cities!
Parish, Yoav IH, and Pascal Müller. "Procedural
modeling of cities." Proceedings of the 28th
annual conference on Computer graphics and
interactive techniques. ACM, 2001.
L-System Use Case: PCG Cities
O
Altitude
Water
Pop.Density
Generated Output
Diamond-square algorithm
O
Is a common implementation of the midpoint displacement
algorithm.
1. Assign a height value to each corner of the rectangle
(image).
2. Divide the rectangle into 4 subrectangles, and let their
height values be the mean values of the corners of the
parent rectangle.
3. When computing the middle height, one should add a
small error that depends on the size of the rectangle
(roughness)
4. Iterate and subdivide each rectangle into smaller ones.
Eventually, they will be too small to produce a noticeable
difference. When this occurs, stop the iteration, and
render the pixel with the mean of the height values.
Dungeons
O
There is an huge amount of techniques to generate dungeons. This
can be a presentation by its own. :D
Dungeons: Voronoi-Delaunay Triangulation
O
Dungeon Generators is another big field of PCG. A
common technique to build dungeon-like artificial
structures is given by the Voronoi-Delanuay
Triangulation.
Example:
http://tinykeep.com/dungen/
Rain-Drop Algorithm
A rain drop algorithm is a method of modifying a height field by
simulating rain drops falling onto the height field, and then moving
from higher points to lower points. The rain drops are used to initially
remove height from where they first appear, then deposit additional
height at lower or lowest points they find. This emulates the process
of erosion.
T
Other Teleological Algorithms
• Fire Propagation: Diffusion of flames in dynamic environments.
• Artificial Life: Simulate the environment through the creation of a
lot of simple artificial life agents.
• Fluid Dynamics: Dynamic of fluids like water and magma (e.g.,
in Dwarf Fortress the user can create “steam engines” using the
in game fluid and thermodynamic simulation.
• Reaction-Diffusion System: introduced in 1950 by Alan Turing
to explain the morphogenesis of living creatures.
T
PCG Music
O
Procedurally generated music is usually implemented using Hidden
Markov Models.
http://hdl.handle.net/1802/1510
Funny Example:
http://www.fakemusicgenerator.com/
Generates, album, artists, tracks and, obviously, generate MP3.

More Related Content

What's hot

게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
Seungmo Koo
 
Game Concept
Game ConceptGame Concept
Game Concept
Martin Sillaots
 
쩌는게임기획서 이렇게 쓴다
쩌는게임기획서 이렇게 쓴다쩌는게임기획서 이렇게 쓴다
쩌는게임기획서 이렇게 쓴다
Jinho Jung
 
GAME 3400 Level Design - Puzzle Design
GAME 3400 Level Design - Puzzle DesignGAME 3400 Level Design - Puzzle Design
GAME 3400 Level Design - Puzzle Design
Seth Sivak
 
게임업계에서 내가 하고 싶은 일 찾는 방법
게임업계에서 내가 하고 싶은 일 찾는 방법게임업계에서 내가 하고 싶은 일 찾는 방법
게임업계에서 내가 하고 싶은 일 찾는 방법
Donghun Lee
 
기획자의 포트폴리오는 어떻게 써야 할까
기획자의 포트폴리오는 어떻게 써야 할까기획자의 포트폴리오는 어떻게 써야 할까
기획자의 포트폴리오는 어떻게 써야 할까
Han Je Sung
 
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
SeongkukYun
 
Introduction to game development
Introduction to game developmentIntroduction to game development
Introduction to game development
Gaetano Bonofiglio
 
게임 BM 설계를 위해 알아야 할 게임 Entity
게임 BM 설계를 위해 알아야 할 게임 Entity게임 BM 설계를 위해 알아야 할 게임 Entity
게임 BM 설계를 위해 알아야 할 게임 Entity
Hyeyon Kwon
 
게임에서 흔히 쓰이는 최적화 전략 by 엄윤섭 @ 지스타 컨퍼런스 2013
게임에서 흔히 쓰이는 최적화 전략 by 엄윤섭 @ 지스타 컨퍼런스 2013게임에서 흔히 쓰이는 최적화 전략 by 엄윤섭 @ 지스타 컨퍼런스 2013
게임에서 흔히 쓰이는 최적화 전략 by 엄윤섭 @ 지스타 컨퍼런스 2013영욱 오
 
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
JungKeun Lee
 
Street runner final
Street runner finalStreet runner final
Street runner final
Kumar Narayan
 
Narrative Design and Audio-Visual Style in Video Games
Narrative Design and Audio-Visual Style in Video GamesNarrative Design and Audio-Visual Style in Video Games
Narrative Design and Audio-Visual Style in Video Games
Altug Isigan
 
Level Design
Level DesignLevel Design
Level Design
Martin Sillaots
 
Game Design Process
Game Design ProcessGame Design Process
Game Design Process
Martin Sillaots
 
Game Design - Monetization
Game Design - MonetizationGame Design - Monetization
Game Design - Monetization
Erez Yerushalmi
 
Artificial intelligence in gaming.
Artificial intelligence in gaming.Artificial intelligence in gaming.
Artificial intelligence in gaming.
Rishikese MR
 
Just add points? What UX can (and cannot) learn from games
Just add points? What UX can (and cannot) learn from gamesJust add points? What UX can (and cannot) learn from games
Just add points? What UX can (and cannot) learn from games
Sebastian Deterding
 
[IGC 2017] 넥슨코리아 오현근 - 평생 게임 기획자 하기
[IGC 2017] 넥슨코리아 오현근 - 평생 게임 기획자 하기[IGC 2017] 넥슨코리아 오현근 - 평생 게임 기획자 하기
[IGC 2017] 넥슨코리아 오현근 - 평생 게임 기획자 하기
강 민우
 
Gaming Documentation final
Gaming Documentation finalGaming Documentation final
Gaming Documentation final
MemesTech
 

What's hot (20)

게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
 
Game Concept
Game ConceptGame Concept
Game Concept
 
쩌는게임기획서 이렇게 쓴다
쩌는게임기획서 이렇게 쓴다쩌는게임기획서 이렇게 쓴다
쩌는게임기획서 이렇게 쓴다
 
GAME 3400 Level Design - Puzzle Design
GAME 3400 Level Design - Puzzle DesignGAME 3400 Level Design - Puzzle Design
GAME 3400 Level Design - Puzzle Design
 
게임업계에서 내가 하고 싶은 일 찾는 방법
게임업계에서 내가 하고 싶은 일 찾는 방법게임업계에서 내가 하고 싶은 일 찾는 방법
게임업계에서 내가 하고 싶은 일 찾는 방법
 
기획자의 포트폴리오는 어떻게 써야 할까
기획자의 포트폴리오는 어떻게 써야 할까기획자의 포트폴리오는 어떻게 써야 할까
기획자의 포트폴리오는 어떻게 써야 할까
 
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
최소 300억은 버는 글로벌 게임 기획 : 몬스터슈퍼리그 사례를 중심으로
 
Introduction to game development
Introduction to game developmentIntroduction to game development
Introduction to game development
 
게임 BM 설계를 위해 알아야 할 게임 Entity
게임 BM 설계를 위해 알아야 할 게임 Entity게임 BM 설계를 위해 알아야 할 게임 Entity
게임 BM 설계를 위해 알아야 할 게임 Entity
 
게임에서 흔히 쓰이는 최적화 전략 by 엄윤섭 @ 지스타 컨퍼런스 2013
게임에서 흔히 쓰이는 최적화 전략 by 엄윤섭 @ 지스타 컨퍼런스 2013게임에서 흔히 쓰이는 최적화 전략 by 엄윤섭 @ 지스타 컨퍼런스 2013
게임에서 흔히 쓰이는 최적화 전략 by 엄윤섭 @ 지스타 컨퍼런스 2013
 
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
Ndc17 슈퍼판타지워 포스트모템_srpg로 맨땅에 헤딩하기
 
Street runner final
Street runner finalStreet runner final
Street runner final
 
Narrative Design and Audio-Visual Style in Video Games
Narrative Design and Audio-Visual Style in Video GamesNarrative Design and Audio-Visual Style in Video Games
Narrative Design and Audio-Visual Style in Video Games
 
Level Design
Level DesignLevel Design
Level Design
 
Game Design Process
Game Design ProcessGame Design Process
Game Design Process
 
Game Design - Monetization
Game Design - MonetizationGame Design - Monetization
Game Design - Monetization
 
Artificial intelligence in gaming.
Artificial intelligence in gaming.Artificial intelligence in gaming.
Artificial intelligence in gaming.
 
Just add points? What UX can (and cannot) learn from games
Just add points? What UX can (and cannot) learn from gamesJust add points? What UX can (and cannot) learn from games
Just add points? What UX can (and cannot) learn from games
 
[IGC 2017] 넥슨코리아 오현근 - 평생 게임 기획자 하기
[IGC 2017] 넥슨코리아 오현근 - 평생 게임 기획자 하기[IGC 2017] 넥슨코리아 오현근 - 평생 게임 기획자 하기
[IGC 2017] 넥슨코리아 오현근 - 평생 게임 기획자 하기
 
Gaming Documentation final
Gaming Documentation finalGaming Documentation final
Gaming Documentation final
 

Similar to Introduction to Procedural Contents Generation

Computer Games Inner Workings - I. Loukeris AIT
Computer Games Inner Workings - I. Loukeris AITComputer Games Inner Workings - I. Loukeris AIT
Computer Games Inner Workings - I. Loukeris AIT
AIT_Communications
 
Beat Your Mom At Solitaire—Reverse Engineering of Computer Games
Beat Your Mom At Solitaire—Reverse Engineering of Computer GamesBeat Your Mom At Solitaire—Reverse Engineering of Computer Games
Beat Your Mom At Solitaire—Reverse Engineering of Computer Games
Christoph Matthies
 
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionistDEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
Felipe Prado
 
Building a Holodeck
Building a HolodeckBuilding a Holodeck
Building a Holodeck
Jon Radoff
 
Web3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCIWeb3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCI
Victor Porof
 
Don't Give Credit: Hacking Arcade Machines
Don't Give Credit: Hacking Arcade MachinesDon't Give Credit: Hacking Arcade Machines
Don't Give Credit: Hacking Arcade Machines
Michael Scovetta
 
Cross-Platform Game Engine
Cross-Platform Game EngineCross-Platform Game Engine
Cross-Platform Game Engine
Kiyoung Moon
 
Confrontation Pipeline and SCons
Confrontation Pipeline and SConsConfrontation Pipeline and SCons
Confrontation Pipeline and SCons
slantsixgames
 
Game prototyping workshop
Game prototyping workshopGame prototyping workshop
Game prototyping workshop
University of South Australlia
 
Ancient world online
Ancient world online Ancient world online
Ancient world online
SeifElDeen3
 
.net for fun: write a Christmas videogame
.net for fun: write a Christmas videogame.net for fun: write a Christmas videogame
.net for fun: write a Christmas videogame
Marco Parenzan
 
Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”
Lviv Startup Club
 
AI and Interactive Narrative
AI and Interactive NarrativeAI and Interactive Narrative
AI and Interactive Narrative
Mirjam Eladhari
 
AI and Interactive Narrative in 2019
AI and Interactive Narrative in 2019 AI and Interactive Narrative in 2019
AI and Interactive Narrative in 2019
Mirjam Eladhari
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
David Galeano
 
Optimizing Unity games for mobile devices
Optimizing Unity games for mobile devicesOptimizing Unity games for mobile devices
Optimizing Unity games for mobile devices
Bruno Cicanci
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in Pascal
Michalis Kamburelis
 
SAIG Overview March 2011
SAIG Overview March 2011SAIG Overview March 2011
SAIG Overview March 2011
Luke Dicken
 
ARG Panel at VWLondon
ARG Panel at VWLondonARG Panel at VWLondon
ARG Panel at VWLondon
Roo Reynolds
 
TiConf 2014 Game Dev with Titanium and Platino 5/10/14
TiConf 2014 Game Dev with Titanium and Platino 5/10/14TiConf 2014 Game Dev with Titanium and Platino 5/10/14
TiConf 2014 Game Dev with Titanium and Platino 5/10/14
gouldjw13
 

Similar to Introduction to Procedural Contents Generation (20)

Computer Games Inner Workings - I. Loukeris AIT
Computer Games Inner Workings - I. Loukeris AITComputer Games Inner Workings - I. Loukeris AIT
Computer Games Inner Workings - I. Loukeris AIT
 
Beat Your Mom At Solitaire—Reverse Engineering of Computer Games
Beat Your Mom At Solitaire—Reverse Engineering of Computer GamesBeat Your Mom At Solitaire—Reverse Engineering of Computer Games
Beat Your Mom At Solitaire—Reverse Engineering of Computer Games
 
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionistDEF CON 24 - Allan Cecil and DwangoAC -  tasbot the perfectionist
DEF CON 24 - Allan Cecil and DwangoAC - tasbot the perfectionist
 
Building a Holodeck
Building a HolodeckBuilding a Holodeck
Building a Holodeck
 
Web3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCIWeb3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCI
 
Don't Give Credit: Hacking Arcade Machines
Don't Give Credit: Hacking Arcade MachinesDon't Give Credit: Hacking Arcade Machines
Don't Give Credit: Hacking Arcade Machines
 
Cross-Platform Game Engine
Cross-Platform Game EngineCross-Platform Game Engine
Cross-Platform Game Engine
 
Confrontation Pipeline and SCons
Confrontation Pipeline and SConsConfrontation Pipeline and SCons
Confrontation Pipeline and SCons
 
Game prototyping workshop
Game prototyping workshopGame prototyping workshop
Game prototyping workshop
 
Ancient world online
Ancient world online Ancient world online
Ancient world online
 
.net for fun: write a Christmas videogame
.net for fun: write a Christmas videogame.net for fun: write a Christmas videogame
.net for fun: write a Christmas videogame
 
Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”
 
AI and Interactive Narrative
AI and Interactive NarrativeAI and Interactive Narrative
AI and Interactive Narrative
 
AI and Interactive Narrative in 2019
AI and Interactive Narrative in 2019 AI and Interactive Narrative in 2019
AI and Interactive Narrative in 2019
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Optimizing Unity games for mobile devices
Optimizing Unity games for mobile devicesOptimizing Unity games for mobile devices
Optimizing Unity games for mobile devices
 
Developing games and graphic visualizations in Pascal
Developing games and graphic visualizations in PascalDeveloping games and graphic visualizations in Pascal
Developing games and graphic visualizations in Pascal
 
SAIG Overview March 2011
SAIG Overview March 2011SAIG Overview March 2011
SAIG Overview March 2011
 
ARG Panel at VWLondon
ARG Panel at VWLondonARG Panel at VWLondon
ARG Panel at VWLondon
 
TiConf 2014 Game Dev with Titanium and Platino 5/10/14
TiConf 2014 Game Dev with Titanium and Platino 5/10/14TiConf 2014 Game Dev with Titanium and Platino 5/10/14
TiConf 2014 Game Dev with Titanium and Platino 5/10/14
 

Recently uploaded

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 

Recently uploaded (20)

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 

Introduction to Procedural Contents Generation

  • 1. Procedural Contents Generation History and techniques used in the modern video-game industry. 05.2015 /Davide Aversa
  • 3. What is PCG? “PCG is a family of techniques, algorithms and procedures used for generating contents in an automatic way rather than manually.”
  • 4. What is PCG? PCG IS NOT RANDOM
  • 5. What is PCG? PCG IS A WAY TO OVERCOME THE LIMITED HUMAN IMMAGINATION
  • 6. Why PCG? ▪Help Designer at Design Phase. ▪Generate Contents at Runtime
  • 7. History of PCG in games ▪ 1952: One of Alan Turing’s final projects was a computer-based, automated love-letter generator, which some have identified as the first known work of new media art. It was programmed by Christopher Strachey in 1952 for the Manchester Mark I computer. Darling Sweetheart You are my avid fellow feeling. My affection curiously clings to your passionate wish. My liking yearns for your heart. You are my wistful sympathy: my tender liking. Yours beautifully Example:
  • 8. History of PCG in games PCG was born as a way to compress data. There was literally no enough space to store pre-made artworks and data. ▪ 1980: Richard Garriott's Akalabeth is the (maybe) first game to use a seed to generate the game world.
  • 9. History of PCG in games ▪ 1980: Rogue, the real ancestor of the rogue-like games used PCG to create a fully replayable game experience. ▪ Rogue, and all the rogue-like games from then, are one of the main game genres to use PCG in modern videogame.
  • 10. History of PCG in games ▪ 1985: The Sentinel had 10,000 different levels stored in only 48 and 64 kilobytes.
  • 11. History of PCG in games ▪ 1985: Elite use PCG to generate an universe with 8 galaxies with 256 solar system each. Each solar system has from 1 to 12 planets, each with a space station in its orbit, a proper names, a personal terrain , prices of commodities, and name and local details. ▪ Everything have to be contained in a 32Kb home PC. Both code and “contents”. ▪ SO EVERYTHING IS PCG
  • 12. History of PCG in games ▪ The seed of the universe is hardcoded. ▪ The seed number in the released game is 4096 ▪ However, there was some problems. Some solar system was poorly connected and the random name generator sometimes used profanity to name planets or space stations. :)
  • 13. History of PCG in games ▪ The original algorithm is open source and can be found here: ▪ http://www.iancgbell.clara.net/elite/text/ ▪ A detailed explanation of the algorithm is given here: ▪ http://www.gamasutra.com/view/feature/3377/algorithms_for_an_infinite_universe.php
  • 14. History of PCG in games ▪ By the way, the new version of Elite, Elite Dangerous use PCG to generate 1:1 replica of the Milk Way with more than 400 billion star systems. ▪ If we assume 1Kb per star system (very optimistic), without PCG the full system will occupy more than 400 Terabyte.
  • 15. History of PCG in games ▪ Then the CD comes and developers became able to store thousands of times as much data than was possible in the early 80s, using procedural generation to build large worlds became unnecessary. ▪ So nothing happens, until mid 90s. At this time PCG has three main purposes: 1. Automatize designer into producing assets (for instance trees, rocks, foliage, and so on) 2. Increase the amount of contents in a game in a way that is not possible to do manually. 3. Provide improved replayability of a game!
  • 16. History of PCG in games ▪ 1995: Diablo was one of the first games to introduce PCG and rogue-like games into the modern era of the videogame industry. ▪ Introduced ▪ Random dungeon layouts. ▪ Random item generation. This was the new things in commercial videogames.
  • 17. History of PCG in games ▪ After 1996, real-time PCG was almost only confined into RPG, space games or obscure rogue-like game (not really mass-popular at that time). Federation of Free Traders (1998) Strange Adventures in Infinite Space (2002) Dark Clouds (2000)
  • 18. History of PCG in games ▪ Commercial design PCG based tools was instead starting its business! ▪ For instance, SpeedTree, the most famous PCG tools for trees and other organic assets, starts in 2002.
  • 19. History of PCG in games ▪ 2006: Dwarf’s Fortress. Meanwhile, some obscure developer was implementing a state-of-the art fantasy world generator. ▪ The DF engine can generate: ▪ A full who takes into account weather, biomes, geological distribution of materials, plate tectonics, wind and water erosion. ▪ A full history for the world with population, races, cities who can rise and fall. ▪ Poetry, monsters, animals, events, cities and A LOT MORE.
  • 20. History of PCG in games Dwarf’s Fortress was (and is) a niche game. Inspired by that game Markus Persson (Notch) decided to develop Minecraft (2009) Minecraft is considered the root of the modern hype for PCG in the game industry.
  • 21. History of PCG in games Since then, PCG is now present in almost every non-FPS game released!
  • 22. Modern PCG How PCG is used nowadays!
  • 23. Types of PCG ▪ There are six main application of PCG ▪ Runtime Random Level Generation ▪ Design Of Level Content ▪ Instancing Of In-Game Entities ▪ User Mediated Content ▪ Dynamic Systems ▪ Procedural Puzzles And Plot Generation
  • 24. Runtime Random Level Generation ▪ It is generation of game levels/world while the game is being played or loaded. In this category fall all the map generation techniques. It is probably the most famous type of PCG techniques in games. ▪ Notable Games: Elite, Minecraft, Spelunky, Diablo, and a lot more.
  • 25. Runtime Random Level Generation
  • 26. Design Of Level Content ▪ It is the use of PCG techniques at design or build time. In other world, the goal of PCG is to help the designer into creating contents. ▪ It is usually hidden to the final player. ▪ A common example of these techniques is the use of fractal height map to create landscapes and terrains which will than populated with other objects by hand. ▪ Notable Games: almost every game since 2002.
  • 27. Design Of Level Content
  • 28. Instancing Of In-Game Entities ▪ These techniques are, in some sense, orthogonal to the previous category. ▪ Instead of generating the world, they instantiate the game objects (such as, trees, monsters, characters, item, treasures and so on). ▪ Notable Games: Left for Dead. It is used to instantiate dynamically the enemies into a static environment in order to provide variety and some adaptation capability to the game.
  • 30. User Mediated Content ▪ This is a borderline technique. ▪ It uses the users themselves as a source of new and “PCG” contents. This can be also be mixed with other PCG techniques (hence the word “mediated” in the name). ▪ Users can manually change PCG parameters to generate personalized contents, share these parameters, and so on. ▪ Notable Games: Spore, X-COM and Dryad, a tool for tree and organic offline generation.
  • 31. Dynamic Systems ▪ This is PCG applied to agent behaviors. ▪ For instance, dynamic systems such as weather, and group and crowd behaviour, can be modelled using PCG techniques. ▪ In short: PCG applied to agent-s behaviors. ▪ Notable Games: S.T.A.L.K.E.R.: The Shadow of Chernobyl, contains one thousand non-scripted characters.
  • 33. Procedural Puzzles And Plot Generation ▪ PCG can be also applied to plot, story, quests and puzzle generation. ▪ This is a more difficult field because it often requires some Natural Language Processing ability. However, many games are starting to integrate automated quests into their code and gameplay. ▪ Puzzles can be extended by making multiple parts of the dependency graph randomly placed (e.g. moving the key that opens the door to a random accessible location) or by changing the shape of the dependency graph completely. ▪ Notable Games: Apophenia, indie-fully PCG puzzle game. Mount and Blade, for the PCG plot (thanks to community mods).
  • 34. Cutting-Edge PCG There are a lot of other PCG field expanding right now. This field are not still fully absorbed by the game industry. ▪ Experience-Driven Procedural Content Generation ▪ Use player experience as a source for PCG algorithms. ▪ Search-based procedural content generation ▪ Use evolutionary technique to produce more controllable PCG contents. ▪ Procedurally Artistic-Contents Generation ▪ Visual art, music, poetry, architectures and so on. ▪ Procedurally Generated Gameplay
  • 35. PCG in practice Some Real-World algorithm for PCG
  • 36. Teleological vs. Ontogenetic ▪ Teleological Algorithms: creates an accurate physical model of the environment and the process that creates the thing generated, and then simply runs the simulation, and the results should emerge as they do in nature. Usually used in offline applications. ▪ Ontogenetic Algorithms: ontogenetic approach observes the end results of this process and then attempts to directly reproduce those results by ad hoc algorithms. Usually used in online applications. T O
  • 37. Mazes O Mazes are one of the eldest form of PCG. Studied in mathematics for several decades. There are A LOT of algorithms: • Prim’s Algorithm: http://bl.ocks.org/mbostock/11159599 • Random Traversal: http://bl.ocks.org/mbostock/70a28267db0354261476 • Randomized Depth-First: http://bl.ocks.org/mbostock/1ef3b1fb9eb35ca8ffff • Wilson’s Algorithm: http://bl.ocks.org/mbostock/11357811 • And others….
  • 38. Cellular Automata A cellular automata is a grid of cells, each one having a state, and a rule for determining what state a cell transitions to based on the state of it and its neighborhood. Used for cave/natural-like environments. O
  • 39. Cellular Automata function cellularLogic(r,c,clean) { var numWalls = countAround(r, c, 1, 1); var numWalls2 = countAround(r, c, 2, 2); if (isWall(r,c)) { if (numWalls >= 3) { return 1; } return 0; } else { if (!clean) { if (numWalls >= 5 || numWalls2 <= 2) { return 1; } } else { if (numWalls >= 5) { return 1; } } } return 0; }
  • 40. L-System O An L-System is a parallel rewriting system and a type of formal grammar. • Introduced in 1968 by Aristid Lindenmayer, a botanist. Was used to describe the behavior of plant cells and to model the growth processes of plant development.
  • 41. L-System: Example O variables : 0, 1 constants: [, ] axiom : 0 rules : (1 → 11), (0 → 1[0]0) The shape is built by recursively feeding the axiom through the production rules. axiom: 0 1st recursion: 1[0]0 2nd recursion: 11[1[0]0]1[0]0 3rd recursion: 1111[11[1[0]0]1[0]0]11[1[0]0]1[0]0
  • 42. L-System: Example O At the end we add a semantic to each symbol. For instance: • 0: draw a line segment ending in a leaf • 1: draw a line segment • [: push position and angle, turn left 45 degrees • ]: pop position and angle, turn right 45 degrees 11[1[0]0]1[0]0TRY THIS
  • 43. L-System Use Case: PCG Buildings O L-Sys has been proven useful for PCG buildings. Müller, Pascal, et al. Procedural modeling of buildings. Vol. 25. No. 3. ACM, 2006. Use basic building block (L, H, U and T) and use grammars to generate complex shapes (rotation, splitting, scaling, roof selection and a lot of things).
  • 44. L-System Use Case: PCG Cities O L-Sys has been proven useful also for cities! Parish, Yoav IH, and Pascal Müller. "Procedural modeling of cities." Proceedings of the 28th annual conference on Computer graphics and interactive techniques. ACM, 2001.
  • 45. L-System Use Case: PCG Cities O Altitude Water Pop.Density Generated Output
  • 46. Diamond-square algorithm O Is a common implementation of the midpoint displacement algorithm. 1. Assign a height value to each corner of the rectangle (image). 2. Divide the rectangle into 4 subrectangles, and let their height values be the mean values of the corners of the parent rectangle. 3. When computing the middle height, one should add a small error that depends on the size of the rectangle (roughness) 4. Iterate and subdivide each rectangle into smaller ones. Eventually, they will be too small to produce a noticeable difference. When this occurs, stop the iteration, and render the pixel with the mean of the height values.
  • 47. Dungeons O There is an huge amount of techniques to generate dungeons. This can be a presentation by its own. :D
  • 48. Dungeons: Voronoi-Delaunay Triangulation O Dungeon Generators is another big field of PCG. A common technique to build dungeon-like artificial structures is given by the Voronoi-Delanuay Triangulation. Example: http://tinykeep.com/dungen/
  • 49. Rain-Drop Algorithm A rain drop algorithm is a method of modifying a height field by simulating rain drops falling onto the height field, and then moving from higher points to lower points. The rain drops are used to initially remove height from where they first appear, then deposit additional height at lower or lowest points they find. This emulates the process of erosion. T
  • 50. Other Teleological Algorithms • Fire Propagation: Diffusion of flames in dynamic environments. • Artificial Life: Simulate the environment through the creation of a lot of simple artificial life agents. • Fluid Dynamics: Dynamic of fluids like water and magma (e.g., in Dwarf Fortress the user can create “steam engines” using the in game fluid and thermodynamic simulation. • Reaction-Diffusion System: introduced in 1950 by Alan Turing to explain the morphogenesis of living creatures. T
  • 51. PCG Music O Procedurally generated music is usually implemented using Hidden Markov Models. http://hdl.handle.net/1802/1510 Funny Example: http://www.fakemusicgenerator.com/ Generates, album, artists, tracks and, obviously, generate MP3.