Introduction to Procedural Content Generation - Codemotion 29 Novembre 2014

32
Pier Luca Lanzi e Michele Pirovano – Codemotion Milan November 2014 Introduction to Procedural Content Generation

Transcript of Introduction to Procedural Content Generation - Codemotion 29 Novembre 2014

1. Pier Luca Lanzi e Michele Pirovano Codemotion Milan Introduction to Procedural Content Generation 2. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 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 3. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 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. 4. Pier Luca Lanzi e Michele Pirovano Codemotion Milanhttp://en.wikipedia.org/wiki/Rogue_(video_game)#mediaviewer/File:Rogue_Screen_Shot 5. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 6. Pier Luca Lanzi e Michele Pirovano Codemotion Milan BBC Micro 2 MHz MOS Technology 6502/6512 16-128 kB RAM 32-128 kB ROM 7. Pier Luca Lanzi e Michele Pirovano Codemotion Milanhttps://www.youtube.com/watch?v=ISR4ebdGlOk 8. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 9. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 10. Pier Luca Lanzi e Michele Pirovano Codemotion Milan What the ingredients? domain knowledge artificial intelligence structured randomness multi-layering filters, limits & restrictions specialized algorithms gameplay integration 11. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 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 12. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 13. Pier Luca Lanzi e Michele Pirovano Codemotion Milan ingredient #3 structured randomness things look like they have been randomly generated but it is not completely at random! 14. Pier Luca Lanzi e Michele Pirovano Codemotion Milan f(x) = sin(x) 15. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 16. Pier Luca Lanzi e Michele Pirovano Codemotion Milan they both look like noise but one of them feels like it has structure it is structured randomness 17. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 18. Pier Luca Lanzi e Michele Pirovano Codemotion Milan ingredient #4 multi-layering typically more layers of procedural content generation are applied in sequence 19. Pier Luca Lanzi e Michele Pirovano Codemotion Milan Warzone 2100 Heights & Cliffs Roads Textures Player Bases Local Features Civilization 4 Fractal Heightfield Plate Tectonics Tile Types Rivers and Lakes Map Bonuses 20. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 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 21. Pier Luca Lanzi e Michele Pirovano Codemotion Milan ingredient #6 specialized algorithms placing special items, requires special tricks this tricks must be encoded in the PCG 22. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 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. 23. Pier Luca Lanzi e Michele Pirovano Codemotion Milan ingredient #7 gameplay integration Is it fun to play? Is the progression adequate? 24. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 25. Pier Luca Lanzi e Michele Pirovano Codemotion Milan is this all there is? 26. Pier Luca Lanzi e Michele Pirovano Codemotion Milan 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? 27. Pier Luca Lanzi e Michele Pirovano Codemotion Milan we can do it, so can you! 28. Pier Luca Lanzi e Michele Pirovano Codemotion Milanhttp://trackgen.pierlucalanzi.net 29. Pier Luca Lanzi e Michele Pirovano Codemotion Milan http://www.youtube.com/watch?v=uIUYWzdMXog 30. Pier Luca Lanzi e Michele Pirovano Codemotion Milanhttp://www.michelepirovano.com/portfolio_swordgenerator.php 31. Pier Luca Lanzi e Michele Pirovano Codemotion Milanhttp://www.michelepirovano.com/portfolio_swordgenerator.php 32. Pier Luca Lanzi e Michele Pirovano Codemotion Milan http://www.polimigamecollective.org http://www.facebook.com/polimigamecollective http://www.youtube.com/PierLucaLanzi