SlideShare une entreprise Scribd logo
1  sur  51
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.

Contenu connexe

Tendances

NDC 2014 이은석 - 온라인 게임의 창발적 플레이 디자인
NDC 2014 이은석 - 온라인 게임의 창발적 플레이 디자인NDC 2014 이은석 - 온라인 게임의 창발적 플레이 디자인
NDC 2014 이은석 - 온라인 게임의 창발적 플레이 디자인Eunseok Yi
 
[IGC 2017] 넥슨코리아 심재근 - 시스템 기획자에 대한 기본 지식과 준비과정
[IGC 2017] 넥슨코리아 심재근 - 시스템 기획자에 대한 기본 지식과 준비과정[IGC 2017] 넥슨코리아 심재근 - 시스템 기획자에 대한 기본 지식과 준비과정
[IGC 2017] 넥슨코리아 심재근 - 시스템 기획자에 대한 기본 지식과 준비과정강 민우
 
게임 기획자의 생존 전략
게임 기획자의 생존 전략게임 기획자의 생존 전략
게임 기획자의 생존 전략태성 이
 
Art Direction for Uncharted 2: Among Thieves
Art Direction for Uncharted 2: Among ThievesArt Direction for Uncharted 2: Among Thieves
Art Direction for Uncharted 2: Among ThievesNaughty Dog
 
게임제작개론 : #6 게임 시스템 구조에 대한 이해
게임제작개론 : #6 게임 시스템 구조에 대한 이해게임제작개론 : #6 게임 시스템 구조에 대한 이해
게임제작개론 : #6 게임 시스템 구조에 대한 이해Seungmo Koo
 
게임제작개론 : #4 게임 밸런싱
게임제작개론 : #4 게임 밸런싱게임제작개론 : #4 게임 밸런싱
게임제작개론 : #4 게임 밸런싱Seungmo Koo
 
The Principles of Game Design
The Principles of Game DesignThe Principles of Game Design
The Principles of Game DesignInstantTechInfo
 
GDC 2016 End-to-End Approach to Physically Based Rendering
GDC 2016 End-to-End Approach to Physically Based RenderingGDC 2016 End-to-End Approach to Physically Based Rendering
GDC 2016 End-to-End Approach to Physically Based RenderingWes McDermott
 
이원, MMORPG 스토리텔링의 금기들, NDC2010
이원, MMORPG 스토리텔링의 금기들, NDC2010이원, MMORPG 스토리텔링의 금기들, NDC2010
이원, MMORPG 스토리텔링의 금기들, NDC2010devCAT Studio, NEXON
 
Cerny method
Cerny methodCerny method
Cerny methodTim Holt
 
Game engines and Their Influence in Game Design
Game engines and Their Influence in Game DesignGame engines and Their Influence in Game Design
Game engines and Their Influence in Game DesignPrashant Warrier
 
게임제작개론: #1 게임 구성 요소의 이해
게임제작개론: #1 게임 구성 요소의 이해게임제작개론: #1 게임 구성 요소의 이해
게임제작개론: #1 게임 구성 요소의 이해Seungmo Koo
 
멀티플레이 레벨 디자인의 10가지 팁
멀티플레이 레벨 디자인의 10가지 팁멀티플레이 레벨 디자인의 10가지 팁
멀티플레이 레벨 디자인의 10가지 팁용태 이
 
Game Design Fundamentals
Game Design FundamentalsGame Design Fundamentals
Game Design FundamentalsIntelligent_ly
 
게임제작개론: #2 세부 디자인 요소
게임제작개론: #2 세부 디자인 요소게임제작개론: #2 세부 디자인 요소
게임제작개론: #2 세부 디자인 요소Seungmo Koo
 
게임 기획 튜토리얼 (2015 개정판)
게임 기획 튜토리얼 (2015 개정판)게임 기획 튜토리얼 (2015 개정판)
게임 기획 튜토리얼 (2015 개정판)Lee Sangkyoon (Kay)
 
NDC 2015. 한 그루 한 그루 심지 않아도 돼요. 생태학에 기반한 [야생의 땅: 듀랑고]의 절차적 생성 생태계
NDC 2015. 한 그루 한 그루 심지 않아도 돼요. 생태학에 기반한 [야생의 땅: 듀랑고]의 절차적 생성 생태계NDC 2015. 한 그루 한 그루 심지 않아도 돼요. 생태학에 기반한 [야생의 땅: 듀랑고]의 절차적 생성 생태계
NDC 2015. 한 그루 한 그루 심지 않아도 돼요. 생태학에 기반한 [야생의 땅: 듀랑고]의 절차적 생성 생태계Imseong Kang
 
[IGC2018] 왓스튜디오 방영훈 - 놀면서공부하기
[IGC2018] 왓스튜디오 방영훈 - 놀면서공부하기[IGC2018] 왓스튜디오 방영훈 - 놀면서공부하기
[IGC2018] 왓스튜디오 방영훈 - 놀면서공부하기강 민우
 
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해Seungmo Koo
 
레벨 디자인의 구성
레벨 디자인의 구성레벨 디자인의 구성
레벨 디자인의 구성준태 김
 

Tendances (20)

NDC 2014 이은석 - 온라인 게임의 창발적 플레이 디자인
NDC 2014 이은석 - 온라인 게임의 창발적 플레이 디자인NDC 2014 이은석 - 온라인 게임의 창발적 플레이 디자인
NDC 2014 이은석 - 온라인 게임의 창발적 플레이 디자인
 
[IGC 2017] 넥슨코리아 심재근 - 시스템 기획자에 대한 기본 지식과 준비과정
[IGC 2017] 넥슨코리아 심재근 - 시스템 기획자에 대한 기본 지식과 준비과정[IGC 2017] 넥슨코리아 심재근 - 시스템 기획자에 대한 기본 지식과 준비과정
[IGC 2017] 넥슨코리아 심재근 - 시스템 기획자에 대한 기본 지식과 준비과정
 
게임 기획자의 생존 전략
게임 기획자의 생존 전략게임 기획자의 생존 전략
게임 기획자의 생존 전략
 
Art Direction for Uncharted 2: Among Thieves
Art Direction for Uncharted 2: Among ThievesArt Direction for Uncharted 2: Among Thieves
Art Direction for Uncharted 2: Among Thieves
 
게임제작개론 : #6 게임 시스템 구조에 대한 이해
게임제작개론 : #6 게임 시스템 구조에 대한 이해게임제작개론 : #6 게임 시스템 구조에 대한 이해
게임제작개론 : #6 게임 시스템 구조에 대한 이해
 
게임제작개론 : #4 게임 밸런싱
게임제작개론 : #4 게임 밸런싱게임제작개론 : #4 게임 밸런싱
게임제작개론 : #4 게임 밸런싱
 
The Principles of Game Design
The Principles of Game DesignThe Principles of Game Design
The Principles of Game Design
 
GDC 2016 End-to-End Approach to Physically Based Rendering
GDC 2016 End-to-End Approach to Physically Based RenderingGDC 2016 End-to-End Approach to Physically Based Rendering
GDC 2016 End-to-End Approach to Physically Based Rendering
 
이원, MMORPG 스토리텔링의 금기들, NDC2010
이원, MMORPG 스토리텔링의 금기들, NDC2010이원, MMORPG 스토리텔링의 금기들, NDC2010
이원, MMORPG 스토리텔링의 금기들, NDC2010
 
Cerny method
Cerny methodCerny method
Cerny method
 
Game engines and Their Influence in Game Design
Game engines and Their Influence in Game DesignGame engines and Their Influence in Game Design
Game engines and Their Influence in Game Design
 
게임제작개론: #1 게임 구성 요소의 이해
게임제작개론: #1 게임 구성 요소의 이해게임제작개론: #1 게임 구성 요소의 이해
게임제작개론: #1 게임 구성 요소의 이해
 
멀티플레이 레벨 디자인의 10가지 팁
멀티플레이 레벨 디자인의 10가지 팁멀티플레이 레벨 디자인의 10가지 팁
멀티플레이 레벨 디자인의 10가지 팁
 
Game Design Fundamentals
Game Design FundamentalsGame Design Fundamentals
Game Design Fundamentals
 
게임제작개론: #2 세부 디자인 요소
게임제작개론: #2 세부 디자인 요소게임제작개론: #2 세부 디자인 요소
게임제작개론: #2 세부 디자인 요소
 
게임 기획 튜토리얼 (2015 개정판)
게임 기획 튜토리얼 (2015 개정판)게임 기획 튜토리얼 (2015 개정판)
게임 기획 튜토리얼 (2015 개정판)
 
NDC 2015. 한 그루 한 그루 심지 않아도 돼요. 생태학에 기반한 [야생의 땅: 듀랑고]의 절차적 생성 생태계
NDC 2015. 한 그루 한 그루 심지 않아도 돼요. 생태학에 기반한 [야생의 땅: 듀랑고]의 절차적 생성 생태계NDC 2015. 한 그루 한 그루 심지 않아도 돼요. 생태학에 기반한 [야생의 땅: 듀랑고]의 절차적 생성 생태계
NDC 2015. 한 그루 한 그루 심지 않아도 돼요. 생태학에 기반한 [야생의 땅: 듀랑고]의 절차적 생성 생태계
 
[IGC2018] 왓스튜디오 방영훈 - 놀면서공부하기
[IGC2018] 왓스튜디오 방영훈 - 놀면서공부하기[IGC2018] 왓스튜디오 방영훈 - 놀면서공부하기
[IGC2018] 왓스튜디오 방영훈 - 놀면서공부하기
 
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
 
레벨 디자인의 구성
레벨 디자인의 구성레벨 디자인의 구성
레벨 디자인의 구성
 

Similaire à 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 AITAIT_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 GamesChristoph 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 perfectionistFelipe Prado
 
Building a Holodeck
Building a HolodeckBuilding a Holodeck
Building a HolodeckJon Radoff
 
Web3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCIWeb3D - Semantic standards, WebGL, HCI
Web3D - Semantic standards, WebGL, HCIVictor 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 MachinesMichael Scovetta
 
Cross-Platform Game Engine
Cross-Platform Game EngineCross-Platform Game Engine
Cross-Platform Game EngineKiyoung Moon
 
Confrontation Pipeline and SCons
Confrontation Pipeline and SConsConfrontation Pipeline and SCons
Confrontation Pipeline and SConsslantsixgames
 
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 videogameMarco Parenzan
 
Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”Овчаренко Євген “Відеоігри це ефективність”
Овчаренко Євген “Відеоігри це ефективність”Lviv Startup Club
 
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
 
AI and Interactive Narrative
AI and Interactive NarrativeAI and Interactive Narrative
AI and Interactive NarrativeMirjam 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 developmentDavid Galeano
 
Optimizing Unity games for mobile devices
Optimizing Unity games for mobile devicesOptimizing Unity games for mobile devices
Optimizing Unity games for mobile devicesBruno 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 PascalMichalis Kamburelis
 
SAIG Overview March 2011
SAIG Overview March 2011SAIG Overview March 2011
SAIG Overview March 2011Luke Dicken
 
ARG Panel at VWLondon
ARG Panel at VWLondonARG Panel at VWLondon
ARG Panel at VWLondonRoo 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/14gouldjw13
 

Similaire à 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 in 2019
AI and Interactive Narrative in 2019 AI and Interactive Narrative in 2019
AI and Interactive Narrative in 2019
 
AI and Interactive Narrative
AI and Interactive NarrativeAI and Interactive Narrative
AI and Interactive Narrative
 
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
 

Dernier

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 

Dernier (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

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.