Skip to main content

Automatic Generation of Game Levels Based on Controllable Wave Function Collapse Algorithm

  • Conference paper
  • First Online:
Entertainment Computing – ICEC 2020 (ICEC 2020)

Abstract

Procedural content generation automatically creates game content through methods such as pseudo-random numbers, which helps save labor or create games that can be played repeatedly and indefinitely. The wave function collapse algorithm is an effective procedural content generation algorithm newly proposed in recent years, but it has the problems of complicated rule writing and lack of non-local constraints. In this paper, based on the original wave function collapse algorithm, an automatic rule system is proposed, which can simplify the rule writing. Moreover, we use the three mechanisms, namely global constraint, multi-layer generation, and distance constraint, to establish non-local constraints. Through experiments, compared with the original wave function collapse algorithm, the results show that manual control has been enhanced, and the generated levels have a certain degree of similarity with human-designed levels. By making a real-time dynamic level game demo using this method, it turns out that the controllable wave function collapse algorithm we proposed has great potential in the game level generation field.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Shaker, N., Togelius, J., Nelson, M.J.: Procedural Content Generation in Games. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-42716-4

  2. Summerville, A., et al.: Procedural content generation via machine learning (PCGML). IEEE Trans. Games 10, 257–270 (2018). https://doi.org/10.1109/TG.2018.2846639

    Article  Google Scholar 

  3. Johnson, L., Yannakakis, G.N., Togelius, J.: Cellular automata for real-time generation of infinite cave levels. In: Proceedings of the 2010 Workshop on Procedural Content Generation in Games - PCGames 2010, Monterey, California, pp. 1–4. ACM Press (2010). https://doi.org/10.1145/1814256.1814266

  4. Frade, M., de Vega, F.F., Cotta, C.: Evolution of artificial terrains for video games based on accessibility. In: Di Chio, C., et al. (eds.) EvoApplications 2010. LNCS, vol. 6024, pp. 90–99. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-12239-2_10

    Chapter  Google Scholar 

  5. Dahlskog, S., Togelius, J., Nelson, M.J.: Linear levels through n-grams. In: Proceedings of the 18th International Academic MindTrek Conference on Media Business, Management, Content & Services - AcademicMindTrek 2014, Tampere, Finland, pp. 200–206. ACM Press (2014). https://doi.org/10.1145/2676467.2676506

  6. Summerville, A., Philip, S., Mateas, M.: MCMCTS PCG 4 SMB: monte carlo tree search to guide platformer level generation (2015)

    Google Scholar 

  7. Summerville, A., Mateas, M.: Super mario as a string: platformer level generation via LSTMs. arXiv:1603.00930 [cs]. (2016)

  8. Hoover, A.K., Togelius, J., Yannakis, G.N.: Composing video game levels with music metaphors through functional scaffolding (2015)

    Google Scholar 

  9. Snodgrass, S., Ontanon, S.: Learning to generate video game maps using Markov models. IEEE Trans. Comput. Intell. AI Games 9, 410–422 (2017). https://doi.org/10.1109/TCIAIG.2016.2623560

    Article  Google Scholar 

  10. Jain, R., Isaksen, A., Holmga, C., Togelius, J.: Autoencoders for level generation, repair, and recognition (2016)

    Google Scholar 

  11. Guzdial, M., Riedl, M.: Learning to blend computer game levels. arXiv:1603.02738 [cs]. (2016)

  12. Summerville, A.J., Snodgrass, S., Mateas, M., Ontañón, S.: The VGLC: the video game level corpus. arXiv:1606.07487 [cs]. (2016)

  13. Giacomello, E., Lanzi, P.L., Loiacono, D.: Searching the latent space of a generative adversarial network to generate DOOM levels. In: 2019 IEEE Conference on Games (CoG), London, United Kingdom, pp. 1–8. IEEE (2019). https://doi.org/10.1109/CIG.2019.8848011

  14. Volz, V., Schrum, J., Liu, J., Lucas, S.M., Smith, A., Risi, S.: Evolving mario levels in the latent space of a deep convolutional generative adversarial network. arXiv:1805.00728 [cs]. (2018)

  15. Togelius, J., Yannakakis, G.N., Stanley, K.O., Browne, C.: Search-based procedural content generation: a taxonomy and survey. IEEE Trans. Comput. Intell. AI Games 3, 172–186 (2011). https://doi.org/10.1109/TCIAIG.2011.2148116

    Article  Google Scholar 

  16. Russell, S.J., Norvig, P.: Artificial Intelligence: A Modern Approach. Prentice Hall, Englewood Cliffs (1995)

    MATH  Google Scholar 

  17. Karth, I., Smith, A.M.: WaveFunctionCollapse is constraint solving in the wild. In: Proceedings of the International Conference on the Foundations of Digital Games - FDG 2017, Hyannis, Massachusetts, pp. 1–10. ACM Press (2017). https://doi.org/10.1145/3102071.3110566

  18. Green, M.C., Khalifa, A., Alsoughayer, A., Surana, D., Liapis, A., Togelius, J.: Two-step constructive approaches for dungeon generation. arXiv:1906.04660 [cs]. (2019)

  19. Gaisbauer, W., Raffe, W.L., Garcia, J.A., Hlavacs, H.: Procedural generation of video game cities for specific video game genres using WaveFunctionCollapse (WFC). In: Extended Abstracts of the Annual Symposium on Computer-Human Interaction in Play Companion Extended Abstracts - CHI PLAY 2019 Extended Abstracts, Barcelona, Spain, pp. 397–404. ACM Press (2019). https://doi.org/10.1145/3341215.3356255

  20. Scurti, H., Verbrugge, C.: Generating Paths with WFC. arXiv:1808.04317 [cs]. (2018)

  21. Kim, H., Lee, S., Lee, H., Hahn, T., Kang, S.: Automatic Generation of Game Content using a Graph-based Wave Function Collapse Algorithm. In: 2019 IEEE Conference on Games (CoG), London, United Kingdom, pp. 1–4. IEEE (2019). https://doi.org/10.1109/CIG.2019.8848019

  22. Gumin, M.: Bitmap & tilemap generation from a single example by collapsing a wave function. https://github.com/mxgmn/WaveFunctionCollapse

  23. Sandhu, A., Chen, Z., McCoy, J.: Enhancing wave function collapse with design-level constraints. In: Proceedings of the 14th International Conference on the Foundations of Digital Games - FDG 2019, San Luis Obispo, California, pp. 1–9. ACM Press (2019). https://doi.org/10.1145/3337722.3337752

Download references

Acknowledgments

This work was supported by the Fundamental Research Funds for the Central Universities, and the National Key R&D Program of China (2018YFB1403900).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Honglei Han .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Cheng, D., Han, H., Fei, G. (2020). Automatic Generation of Game Levels Based on Controllable Wave Function Collapse Algorithm. In: Nunes, N.J., Ma, L., Wang, M., Correia, N., Pan, Z. (eds) Entertainment Computing – ICEC 2020. ICEC 2020. Lecture Notes in Computer Science(), vol 12523. Springer, Cham. https://doi.org/10.1007/978-3-030-65736-9_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-65736-9_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-65735-2

  • Online ISBN: 978-3-030-65736-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics