1 of 19

Sp18 CS 61B Discussion 9

2 of 19

Welcome!

3 of 19

Announcements

  • MT2 approaching
  • HW2 released

4 of 19

Quiz Instructions

  • If you haven’t yet, please also neatly put your email address outside the name box if you want to be emailed!
  • Bubble number 41.

5 of 19

Aside

6 of 19

Procedural Generation: A History

  • Rogue (1980) and Elite (1984)
    • Pioneers of 2D PCG
  • Dwarf Fortress (2006) and Spore (2008)
    • Considered cutting edge 2D PCG
  • Minecraft (2011): First 3D PCG (but in block-form)

7 of 19

No Man’s Sky (2016)

  • A beautiful game (realistic texture) all in PCG
    • 256 procedurally generated universes, each with ~17 quintillion distinct planets
    • Each planet’s landscape automatically generated
    • Flora and fauna completely generated

8 of 19

9 of 19

10 of 19

11 of 19

12 of 19

13 of 19

14 of 19

15 of 19

Simple Terrain Generation Algorithm

  • Called the diamond-square algorithm.
  • Recursively divides a square into smaller squares with new vertices offset by a random height.
  • At each recursion level, maximum offset shrinks.
  • https://www.youtube.com/watch?v=9HJKrctqIJI

16 of 19

More Topics

  • Perlin noise algorithm (realistic landscapes)
  • Voronoi diagrams
  • Take lots of stats classes! (Distributions are important)

17 of 19

Moral of the Story

  • There’s more to CS than we can ever teach you!

18 of 19

References

19 of 19

Onto Discussion