An Introduction to Procedural Content Generation
-
Upload
codemotion -
Category
Technology
-
view
170 -
download
0
description
Transcript of An Introduction to Procedural Content Generation
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Introduction to Procedural
Content Generation
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
What is Procedural Content Generation?
Procedural Generation
with no or limited human intervention, algorithmically
of Content
of “things that affect the gameplay”, not non-player
character behavior, not the game engine
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
so what exactly is procedurally generated?
levels, tracks, maps, terrains, dungeons, puzzles,
buildings, trees, grass, fire, plots, descriptions,
scenarios, dialogues, quests, characters, rules,
boards, parameters, camera viewpoint, dynamics,
weapons, clothing, vehicles, personalities, etc.
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
http://en.wikipedia.org/wiki/Rogue_(video_game)#mediaviewer/File:Rogue_Screen_Shot
_CAR.PNG
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
BBC Micro – 2 MHz MOS Technology 6502/6512
16-128 kB RAM 32-128 kB ROM
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
https://www.youtube.com/watch?v=ISR4ebdGlOk
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
What the ingredients?
domain knowledge
artificial intelligence
structured randomness
multi-layering
filters, limits & restrictions
specialized algorithms
gameplay integration
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Ingredients #1 & #2
Domain Knowledge & Artificial
Intelligence• Domain Knowledge
To generate something you need to know it
PCG typically aims at building an artificial level
designer, usually needs domain knowledge
about level design
• Artificial Intelligence
Need algorithms that can work on complex
knowledge and generate plausible content
Search-based methods, L-systems, evolutionary
computation, fractals, cellular automata,
agent-based methods, planning, etc.
11
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
ingredient #3
structured randomness
things look like they have been randomly
generated but it is not completely at
random!
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
f(x) = sin(x)
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
they both look like “noise”
but one of them feels like it has structure…
it is structured randomness
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
ingredient #4
multi-layering
typically more layers of procedural
content generation are applied in sequence
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
• Warzone 2100
Heights &
Cliffs
Roads
Textures
Player Bases
Local
Features• Civilization 4
Fractal
Heightfield
Plate Tectonics
Tile Types
Rivers and Lakes
Map Bonuses
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
ingredient #5
Filters, Limits & Restrictions
“In Civ3 I would say we even shipped with a sub-standard
resource
placement algorithm where all the iron could be
concentrated in just
a few small locations on the map, and for one player there
may be literally no way for them to build swordsmen.”
– Soren Johnson
"With Civ4 we instituted randomness with limitations.
There
always has to be a minimum distance between each
element of
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
ingredient #6
specialized algorithms
placing special items, requires special
tricks
this tricks must be encoded in the PCG
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
1. Connect all bases, the
resources,
pick three random points and
connect them
2. Apply a customize A* heuristic
and reuse roads!
3. Customize A* heuristic with
randomize cost of non-road
grid cells.
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
ingredient #7
gameplay integration
Is it fun to play? Is the progression
adequate?
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
is this all there is?
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
PC
G
Is it done online?
Or offline?
Is it necessary
content? Or
optional?
Do you use random
seeds or parameter
vectors?
Is it stochastic?
Or deterministic?
Generate and test?Constructive?
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
we can do it, so can you!
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
http://trackgen.pierlucalanzi.net
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
http://www.youtube.com/watch?v=uIUYWzdMXog
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
http://www.michelepirovano.com/portfolio_swordgenerator.php
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
http://www.michelepirovano.com/portfolio_swordgenerator.php
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan
November 2014
http://www.polimigamecollective.org
http://www.facebook.com/polimigamecollective
http://www.youtube.com/PierLucaLanzi