SlideShare une entreprise Scribd logo
1  sur  17
Procedural
Generation at its
Elegance
Gregory Desrosiers
University ofWaterloo SE 2019
May 10, 2016 (Revision May 20 2016)
Outline
 What is procedural generation?
 Some technical aspects of procedural generation
 Why should we use it compared to predefined
data?
 Three examples of appropriate procedural
generation use:
 Music generation
 Texture / art generation
 Data object generation
 When not to use procedural generation?
 Two examples of predefined data instead of
procedural generation:
 Video games with unique elements
 Orchestrated music for quality purposes
2
What is
procedural
generation?
 Definition:
Using software algorithms to
generate data at runtime
instead of data before
execution [1]
 Different applications:
Video games, audio synthesis,
artwork / textures, simulations
(such as city growth [2])
 Different techniques can be
used to generate data: [3]
 Fractals
 Special programs such as
Terragen and SpeedTree
 Perlin Noise
 Psuedorandom number
generators
3
Photo Copyrights: © 2015-2016 AOL Inc. (Provided by Engadget.com, programmed by AOL Tech) [4]
Software Copyrights: Minecraft © 2009 – 2016 Mojang Synergies AB
Example of
Procedural
Generation
4
Photo Copyright: © Gregory Desrosiers [6]
Original Source Code: © Dave Pagurek van Mossel
JavaScript code for drawing a mountain range on an HTML 5 canvas
with a function for Perlin Noise. [5]
Why should
we use
procedural
generation
compared to
predefined
data?
 Number of possible outputs from one input set
 Similarities between the different outputs
generated by the same algorithm at a visual level
 Using the same base resources to generate
different outputs
 In large projects, reduce secondary storage
memory consumption
 Student projects: simply expanding
programming knowledge
5
Appropriate
Use of
Procedural
Generation
Example 1:
WolframTones
(Web
Application)
 Based off of Stephen
Wolfram’s 1980s
experiments involving
his cellular automata
patterns [7]
 Uses a swath of the
pattern turned on its
side [7]
 Mathematica algorithms
are performed to create
music notes out of the
swath [7]
6
Before music conversion:
After music conversion:
Photo Copyrights: © Wolfram Research [8][9]
Software Copyrights: © Wolfram Research
Appropriate
Use of
Procedural
Generation
Example 2:
Dave Pagurek
van Mossel’s
Website
 Uses Perlin noise to
give a natural look
and feel [5]
 Uses native drawing
algorithms to draw
the different shapes
[5]
 Tailors the output to
within defined
parameters [5]
7
Photo Copyrights: © Dave Pagurek van Mossel [10]
Software Copyrights: © 2015 Dave Pagurek van Mossel
Image Size: 109 KB
BackgroundGenerator Code Size
(through Google Chrome): 4.5 KB [5]
Appropriate
Use of
Procedural
Generation
Example 3:
Elite:
Dangerous
(PCGame)
 Planets, asteroids, and
interstellar clouds; all
elements of each
group have very similar
properties [11]
 Players can travel and
explore over 400 billion
star systems [12]
 Used a procedural
generation system
called the Stellar Forge
[12]
8
Photo Copyrights: © 2015 Control500.com / Control Magazine [13]
Software Copyrights: © 1984 – 2016 Frontier Developments Plc
When should
you not use
procedural
generation
and instead
use
predefined
data?
 The data representing objects or music do not
have similarities in between (uniqueness)
 Quality over quantity
 Time [14] and budget limits
 Explicitly-defined elements in software design
instead of creativity and possibilities
 Concerns on software performance
9
Predefined
Data instead
of Procedural
Generation
Example 1:
Splatoon
(NintendoWii
U)
 16 multiplayer
stages (from recent
update), 27 single
player stages, and
one central
environment as the
main menu [15]
 Only two properties
are common:
boundaries and land
area
 All environments
mostly have unique
elements
 Defining the models
explicitly ensures
quality
10
Photo Copyrights: Right Top and Right Bottom - © Gregory Desrosiers [16][18], Middle - © Nintendo [17]
Software Copyright: © 2015 Nintendo
Predefined
Data instead
of Procedural
Generation
Example 2:
Super Mario
Galaxy 2
(NintendoWii)
 Music composed by
Koji Kondo, Ryo
Nagamatsu and
MahitoYokota [19]
 Music done manually
instead of at runtime
for quality purposes
[20]
 Music performed by
an orchestra [20]
11
Photo Copyrights: © GameSpot (a division of CBS Interactive Inc.) [21]
Software Copyright: © 2010 Nintendo
Summary
Use procedural generation for:
 Creating textures, visual objects, and data objects such as
sound
 Outputting many different outcomes
 Learning more of a programming language
Do not use procedural generation for:
 Time sensitive, cost sensitive, or quality sensitive projects
 Data elements that are unique and where quantity is no
concern
 Projects that require exceptional performance
In the end, go out there and program an algorithm
to generate the data you want!
12
Bibliography
 [1] StackExchange.com, ‘What is “procedural generation”
and how is it done?,‘ May 1 2016.
http://gamedev.stackexchange.com/questions/756/what-is-
procedural-generation-and-how-is-it-done
 [2] Northwestern University, ‘Procedural Modeling of Cities,’
May 2 2016.
http://ccl.northwestern.edu/rp/cities/index.shtml
 [3] StackExchange.com, ‘How does one get started with
procedural generation?,’ May 1 2016.
http://stackoverflow.com/questions/155069/how-does-one-
get-started-with-procedural-generation
 [4] Fingas, Jon. (2015, Mar. 4). “minecraft-terrain-federico-
flickr.jpg” in ‘Here’s how ‘Minecraft’ creates its gigantic
worlds’ [Online]. Available:
http://www.engadget.com/2015/03/04/how-minecraft-
worlds-are-made/ [May 2 2016]
 [5] Dave Pagurek, ‘Frontier: Programming Generative Art, ’
May 3 2016.
http://www.davepagurek.com/programming/frontier
 [6] Desrosiers, Gregory. “Example of Procedural Generation
in Code.png” Waterloo: Software Eng. University of
Waterloo, Waterloo, ON, May 4 2016.
13
Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide)
Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee)
University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style
(https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
Bibliography
 [7]Wolfram Research, ‘WolframTones: How
WolframTones Works,’ May 2 2016.
http://tones.wolfram.com/about/how.html
 [8]Wolfram Research. (n.d.). “rule30slicesideways.gif”
in ‘WolframTones: HowWolframTones works’
[Online].Available:
http://tones.wolfram.com/about/how.html [May 2
2016]
 [9]Wolfram Research. (n.d.).
“/gen/GoqlMVIVFY45Zc042wLyelDEKbrXdeTdlM” in
‘WolframTones: How WolframTones works’ [Online].
Available: http://tones.wolfram.com/about/how.html
[May 2 2016]
 [10] Pagurek, Dave. (2015, Jun. 4). “night-
medium.jpg” in ‘Frontier: Programming Generative
Art’ [Online].Available:
http://www.davepagurek.com/programming/frontier
[May 2 2016]
 [11] Elite Dangerous. (2012, Nov. 15). Elite: Dangerous
– procedural generation. [YouTube video]. Available:
https://www.youtube.com/watch?v=iTBvpd3_Vqk.
Accessed May 1 2016.
14
Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide)
Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee)
University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style
(https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
Bibliography
 [12]Vox Media, Inc. (Polygon), ‘Elite: Dangerous
explores the limitless depths of space, and of human
cruelty (correction) | Polygon, ’May 2 2016.
http://www.polygon.com/2014/12/4/7333709/elite-
dangerous-milky-way-stellar-forge-human-cruelty
 [13] Braben, David. (n.d.). “Explosion.jpg” in ‘Our
Entire Galaxy Re-created In Elite:Dangerous –
CONTROL500’ [Online].Available:
http://ctrl500.com/tech/how-frontier-managed-to-re-
create-our-entire-galaxy-in-elite-dangerous/ [May 2
2016]
 [14] Richard Moss (Gamasutra), ‘Gamasutra – 7 uses of
procedural generation that all developers should
study,’ May 1 2016.
http://www.gamasutra.com/view/news/262869/7_use
s_of_procedural_generation_that_all_developers_sho
uld_study.php
 [15] Splatoon [Wii U Optical Disc]. USA: Nintendo,
2015
 [16] Desrosiers,Gregory. (2016, Apr. 15). “Splatoon -
Inkopolis Plaza.jpg” May 2 2016.
15
Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide)
Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee)
University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style
(https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
Bibliography
 [17] Nintendo. (n.d.).
“WUPP_AGM_3DbkgdCP04_R_ad.jpg,” in ‘What’s
New – Splatoon™ forWii U’ [Online].Available:
http://splatoon.nintendo.com/whats-new/ [May 2
2016]
 [18] Desrosiers,Gregory. (2016, Jan. 16). “Splatoon -
OctoValley.jpg” May 2 2016.
 [19] Blue Flame Labs, ‘Super Mario Galaxy 2 (2010) Wii
credits - MobyGames’, May 3 2016.
http://www.mobygames.com/game/wii/super-mario-
galaxy-2/credits
 [20] dudush31. (2010, Jul. 14). Super Mario Galaxy 2
OpeningTeam – Symphony Orchestra Recording.
[YouTube video] Available:
https://www.youtube.com/watch?v=iJMCaGyMHYs
Accessed May 7, 2016.
 [21] GameSpot. (2013, Aug. 30). “1509518-
960551_20100520_023.jpg” in ‘Super Mario Galaxy 2
Images - GameSpot’ [Online].Available:
http://www.gamespot.com/super-mario-galaxy-
2/images/ [May 3 2016]
16
Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide)
Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee)
University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style
(https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
Copyrights
This was originally a presentation conducted at the
University ofWaterloo. It has been created and
modified in compliance with the copyright guidelines
shown here: https://uwaterloo.ca/copyright-
guidelines/
All visuals, text, content, and any associated imagery
are trademarks and / or copyrighted material of their
respective owners.
© 2016 Gregory Desrosiers / University ofWaterloo.
All rights reserved.
17

Contenu connexe

Similaire à Procedural Generation at its Elegance (Software Development)

Cloud Computing - Govt. Women's College - Kumbakonam
Cloud Computing - Govt. Women's College - KumbakonamCloud Computing - Govt. Women's College - Kumbakonam
Cloud Computing - Govt. Women's College - Kumbakonam
Bala Venkatraman
 
Lies, Damned Lies and Software Analytics: Why Big Data Needs Rich Data
Lies, Damned Lies and Software Analytics:  Why Big Data Needs Rich DataLies, Damned Lies and Software Analytics:  Why Big Data Needs Rich Data
Lies, Damned Lies and Software Analytics: Why Big Data Needs Rich Data
Margaret-Anne Storey
 
Snapcrowd presentation
Snapcrowd presentationSnapcrowd presentation
Snapcrowd presentation
snapcrowd
 
Snapcrowd presentation
Snapcrowd presentationSnapcrowd presentation
Snapcrowd presentation
snapcrowd
 

Similaire à Procedural Generation at its Elegance (Software Development) (20)

SRCenabling application development for the internet of things
SRCenabling  application development for the internet of thingsSRCenabling  application development for the internet of things
SRCenabling application development for the internet of things
 
Motaz_CV
Motaz_CVMotaz_CV
Motaz_CV
 
[SiriusCon 2018] A Bird's Eye View on Eclipse Sirius
[SiriusCon 2018]  A Bird's Eye View on Eclipse Sirius[SiriusCon 2018]  A Bird's Eye View on Eclipse Sirius
[SiriusCon 2018] A Bird's Eye View on Eclipse Sirius
 
Visualization for Software Analytics
Visualization for Software AnalyticsVisualization for Software Analytics
Visualization for Software Analytics
 
Computer Science
Computer ScienceComputer Science
Computer Science
 
GAME TECHNOLOGIES USAGE FOR USERS ATTRACTION TO EDUCATIONAL RESOURCES
GAME TECHNOLOGIES USAGE FOR USERS ATTRACTION TO EDUCATIONAL RESOURCESGAME TECHNOLOGIES USAGE FOR USERS ATTRACTION TO EDUCATIONAL RESOURCES
GAME TECHNOLOGIES USAGE FOR USERS ATTRACTION TO EDUCATIONAL RESOURCES
 
MediaEval 2016 - COSMIR and the OpenMIC Challenge: A Plan for Sustainable Mus...
MediaEval 2016 - COSMIR and the OpenMIC Challenge: A Plan for Sustainable Mus...MediaEval 2016 - COSMIR and the OpenMIC Challenge: A Plan for Sustainable Mus...
MediaEval 2016 - COSMIR and the OpenMIC Challenge: A Plan for Sustainable Mus...
 
仕事ではじめる機械学習
仕事ではじめる機械学習仕事ではじめる機械学習
仕事ではじめる機械学習
 
Cloud Computing - Govt. Women's College - Kumbakonam
Cloud Computing - Govt. Women's College - KumbakonamCloud Computing - Govt. Women's College - Kumbakonam
Cloud Computing - Govt. Women's College - Kumbakonam
 
Digital Fabrication Studio.01 _Fabbing @ Aalto Media Factory
Digital Fabrication Studio.01 _Fabbing @ Aalto Media FactoryDigital Fabrication Studio.01 _Fabbing @ Aalto Media Factory
Digital Fabrication Studio.01 _Fabbing @ Aalto Media Factory
 
Better Software, Better Research
Better Software, Better ResearchBetter Software, Better Research
Better Software, Better Research
 
Se research update
Se research updateSe research update
Se research update
 
Lies, Damned Lies and Software Analytics: Why Big Data Needs Rich Data
Lies, Damned Lies and Software Analytics:  Why Big Data Needs Rich DataLies, Damned Lies and Software Analytics:  Why Big Data Needs Rich Data
Lies, Damned Lies and Software Analytics: Why Big Data Needs Rich Data
 
Building Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and SalesforceBuilding Social Enterprise with Ruby and Salesforce
Building Social Enterprise with Ruby and Salesforce
 
I want to be a Data DJ!
I want to be a Data DJ!I want to be a Data DJ!
I want to be a Data DJ!
 
File mirroring scenario
File mirroring scenarioFile mirroring scenario
File mirroring scenario
 
Open Hardware Summit 2014
Open Hardware Summit 2014Open Hardware Summit 2014
Open Hardware Summit 2014
 
Sample CS Senior Capstone Projects
Sample CS Senior Capstone ProjectsSample CS Senior Capstone Projects
Sample CS Senior Capstone Projects
 
Snapcrowd presentation
Snapcrowd presentationSnapcrowd presentation
Snapcrowd presentation
 
Snapcrowd presentation
Snapcrowd presentationSnapcrowd presentation
Snapcrowd presentation
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
anilsa9823
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Dernier (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

Procedural Generation at its Elegance (Software Development)

  • 1. Procedural Generation at its Elegance Gregory Desrosiers University ofWaterloo SE 2019 May 10, 2016 (Revision May 20 2016)
  • 2. Outline  What is procedural generation?  Some technical aspects of procedural generation  Why should we use it compared to predefined data?  Three examples of appropriate procedural generation use:  Music generation  Texture / art generation  Data object generation  When not to use procedural generation?  Two examples of predefined data instead of procedural generation:  Video games with unique elements  Orchestrated music for quality purposes 2
  • 3. What is procedural generation?  Definition: Using software algorithms to generate data at runtime instead of data before execution [1]  Different applications: Video games, audio synthesis, artwork / textures, simulations (such as city growth [2])  Different techniques can be used to generate data: [3]  Fractals  Special programs such as Terragen and SpeedTree  Perlin Noise  Psuedorandom number generators 3 Photo Copyrights: © 2015-2016 AOL Inc. (Provided by Engadget.com, programmed by AOL Tech) [4] Software Copyrights: Minecraft © 2009 – 2016 Mojang Synergies AB
  • 4. Example of Procedural Generation 4 Photo Copyright: © Gregory Desrosiers [6] Original Source Code: © Dave Pagurek van Mossel JavaScript code for drawing a mountain range on an HTML 5 canvas with a function for Perlin Noise. [5]
  • 5. Why should we use procedural generation compared to predefined data?  Number of possible outputs from one input set  Similarities between the different outputs generated by the same algorithm at a visual level  Using the same base resources to generate different outputs  In large projects, reduce secondary storage memory consumption  Student projects: simply expanding programming knowledge 5
  • 6. Appropriate Use of Procedural Generation Example 1: WolframTones (Web Application)  Based off of Stephen Wolfram’s 1980s experiments involving his cellular automata patterns [7]  Uses a swath of the pattern turned on its side [7]  Mathematica algorithms are performed to create music notes out of the swath [7] 6 Before music conversion: After music conversion: Photo Copyrights: © Wolfram Research [8][9] Software Copyrights: © Wolfram Research
  • 7. Appropriate Use of Procedural Generation Example 2: Dave Pagurek van Mossel’s Website  Uses Perlin noise to give a natural look and feel [5]  Uses native drawing algorithms to draw the different shapes [5]  Tailors the output to within defined parameters [5] 7 Photo Copyrights: © Dave Pagurek van Mossel [10] Software Copyrights: © 2015 Dave Pagurek van Mossel Image Size: 109 KB BackgroundGenerator Code Size (through Google Chrome): 4.5 KB [5]
  • 8. Appropriate Use of Procedural Generation Example 3: Elite: Dangerous (PCGame)  Planets, asteroids, and interstellar clouds; all elements of each group have very similar properties [11]  Players can travel and explore over 400 billion star systems [12]  Used a procedural generation system called the Stellar Forge [12] 8 Photo Copyrights: © 2015 Control500.com / Control Magazine [13] Software Copyrights: © 1984 – 2016 Frontier Developments Plc
  • 9. When should you not use procedural generation and instead use predefined data?  The data representing objects or music do not have similarities in between (uniqueness)  Quality over quantity  Time [14] and budget limits  Explicitly-defined elements in software design instead of creativity and possibilities  Concerns on software performance 9
  • 10. Predefined Data instead of Procedural Generation Example 1: Splatoon (NintendoWii U)  16 multiplayer stages (from recent update), 27 single player stages, and one central environment as the main menu [15]  Only two properties are common: boundaries and land area  All environments mostly have unique elements  Defining the models explicitly ensures quality 10 Photo Copyrights: Right Top and Right Bottom - © Gregory Desrosiers [16][18], Middle - © Nintendo [17] Software Copyright: © 2015 Nintendo
  • 11. Predefined Data instead of Procedural Generation Example 2: Super Mario Galaxy 2 (NintendoWii)  Music composed by Koji Kondo, Ryo Nagamatsu and MahitoYokota [19]  Music done manually instead of at runtime for quality purposes [20]  Music performed by an orchestra [20] 11 Photo Copyrights: © GameSpot (a division of CBS Interactive Inc.) [21] Software Copyright: © 2010 Nintendo
  • 12. Summary Use procedural generation for:  Creating textures, visual objects, and data objects such as sound  Outputting many different outcomes  Learning more of a programming language Do not use procedural generation for:  Time sensitive, cost sensitive, or quality sensitive projects  Data elements that are unique and where quantity is no concern  Projects that require exceptional performance In the end, go out there and program an algorithm to generate the data you want! 12
  • 13. Bibliography  [1] StackExchange.com, ‘What is “procedural generation” and how is it done?,‘ May 1 2016. http://gamedev.stackexchange.com/questions/756/what-is- procedural-generation-and-how-is-it-done  [2] Northwestern University, ‘Procedural Modeling of Cities,’ May 2 2016. http://ccl.northwestern.edu/rp/cities/index.shtml  [3] StackExchange.com, ‘How does one get started with procedural generation?,’ May 1 2016. http://stackoverflow.com/questions/155069/how-does-one- get-started-with-procedural-generation  [4] Fingas, Jon. (2015, Mar. 4). “minecraft-terrain-federico- flickr.jpg” in ‘Here’s how ‘Minecraft’ creates its gigantic worlds’ [Online]. Available: http://www.engadget.com/2015/03/04/how-minecraft- worlds-are-made/ [May 2 2016]  [5] Dave Pagurek, ‘Frontier: Programming Generative Art, ’ May 3 2016. http://www.davepagurek.com/programming/frontier  [6] Desrosiers, Gregory. “Example of Procedural Generation in Code.png” Waterloo: Software Eng. University of Waterloo, Waterloo, ON, May 4 2016. 13 Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide) Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee) University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style (https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
  • 14. Bibliography  [7]Wolfram Research, ‘WolframTones: How WolframTones Works,’ May 2 2016. http://tones.wolfram.com/about/how.html  [8]Wolfram Research. (n.d.). “rule30slicesideways.gif” in ‘WolframTones: HowWolframTones works’ [Online].Available: http://tones.wolfram.com/about/how.html [May 2 2016]  [9]Wolfram Research. (n.d.). “/gen/GoqlMVIVFY45Zc042wLyelDEKbrXdeTdlM” in ‘WolframTones: How WolframTones works’ [Online]. Available: http://tones.wolfram.com/about/how.html [May 2 2016]  [10] Pagurek, Dave. (2015, Jun. 4). “night- medium.jpg” in ‘Frontier: Programming Generative Art’ [Online].Available: http://www.davepagurek.com/programming/frontier [May 2 2016]  [11] Elite Dangerous. (2012, Nov. 15). Elite: Dangerous – procedural generation. [YouTube video]. Available: https://www.youtube.com/watch?v=iTBvpd3_Vqk. Accessed May 1 2016. 14 Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide) Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee) University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style (https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
  • 15. Bibliography  [12]Vox Media, Inc. (Polygon), ‘Elite: Dangerous explores the limitless depths of space, and of human cruelty (correction) | Polygon, ’May 2 2016. http://www.polygon.com/2014/12/4/7333709/elite- dangerous-milky-way-stellar-forge-human-cruelty  [13] Braben, David. (n.d.). “Explosion.jpg” in ‘Our Entire Galaxy Re-created In Elite:Dangerous – CONTROL500’ [Online].Available: http://ctrl500.com/tech/how-frontier-managed-to-re- create-our-entire-galaxy-in-elite-dangerous/ [May 2 2016]  [14] Richard Moss (Gamasutra), ‘Gamasutra – 7 uses of procedural generation that all developers should study,’ May 1 2016. http://www.gamasutra.com/view/news/262869/7_use s_of_procedural_generation_that_all_developers_sho uld_study.php  [15] Splatoon [Wii U Optical Disc]. USA: Nintendo, 2015  [16] Desrosiers,Gregory. (2016, Apr. 15). “Splatoon - Inkopolis Plaza.jpg” May 2 2016. 15 Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide) Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee) University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style (https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
  • 16. Bibliography  [17] Nintendo. (n.d.). “WUPP_AGM_3DbkgdCP04_R_ad.jpg,” in ‘What’s New – Splatoon™ forWii U’ [Online].Available: http://splatoon.nintendo.com/whats-new/ [May 2 2016]  [18] Desrosiers,Gregory. (2016, Jan. 16). “Splatoon - OctoValley.jpg” May 2 2016.  [19] Blue Flame Labs, ‘Super Mario Galaxy 2 (2010) Wii credits - MobyGames’, May 3 2016. http://www.mobygames.com/game/wii/super-mario- galaxy-2/credits  [20] dudush31. (2010, Jul. 14). Super Mario Galaxy 2 OpeningTeam – Symphony Orchestra Recording. [YouTube video] Available: https://www.youtube.com/watch?v=iJMCaGyMHYs Accessed May 7, 2016.  [21] GameSpot. (2013, Aug. 30). “1509518- 960551_20100520_023.jpg” in ‘Super Mario Galaxy 2 Images - GameSpot’ [Online].Available: http://www.gamespot.com/super-mario-galaxy- 2/images/ [May 3 2016] 16 Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide) Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee) University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style (https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
  • 17. Copyrights This was originally a presentation conducted at the University ofWaterloo. It has been created and modified in compliance with the copyright guidelines shown here: https://uwaterloo.ca/copyright- guidelines/ All visuals, text, content, and any associated imagery are trademarks and / or copyrighted material of their respective owners. © 2016 Gregory Desrosiers / University ofWaterloo. All rights reserved. 17