GroundCollapse

Image showing a large purple landscape of 2D cave-like tunnels, with the GroundCollapse logo.

Summary

A library, a tool, and a demo for creating infinite generative, tiled, 2D terrain (or levels), using constraint solving (clingo and Answer Set Programming), inspired by Wave Function Collapse. Learn more on the project website.

Research Topics

Level Generation | Design Tools | Mixed-Initiative Content Creation | PCG | Answer Set Programming | Wave Function Collapse

Contributors

Special thanks: Isaac Karth, Adam M. Smith, Mark J. Nelson

Description

Dreamlike, the landscape stretches forever in every direction. But stray too far, look back, and it's not how you remember. You can never return to what came before.

GroundCollapse is a library, a tool, and a demo for creating infinite generative, tiled, 2D terrain (or levels). It's open-source, with code available on GitLab.

It uses constraint solving (clingo and Answer Set Programming), inspired by Wave Function Collapse, to ensure that every generated tile will seamlessly fit in with its surroundings.

In a built-in, highly-configurable demo, you can explore a dreamlike landscape where, if you stray too far from a place, you will return to find it completely changed.

The underlying library, written in Python, provides a highly flexible framework for building generative terrain, with extensible constraints allowing for many possible styles and rules.

Integrate it with any game engine or art tool that can interface with a Python library (or run it as an external program), and you could visualize or save the resulting tiles in any number of ways.

The possibilities are endless with GroundCollapse.

Status

In Progress

References

Karth, Isaac, and Adam M. Smith. 2017. “WaveFunctionCollapse Is Constraint Solving in the Wild.” In Proceedings of the 12th International Conference on the Foundations of Digital Games, 68. ACM.
———. 2019. “Addressing the Fundamental Tension of PCGML with Discriminative Learning.” In Proceedings of the 14th International Conference on the Foundations of Digital Games, 89. ACM.
Nelson, Mark J., and Adam M. Smith. 2016. “ASP with Applications to Mazes and Levels.” In Procedural Content Generation in Games, 143–157. Springer.

Publications

Lee, Vivian, Nathan Partlan, and Seth Cooper. 2020. “Precomputing Player Movement in Platformers for Level Generation with Reachability Constraints.” In Proceedings of the Experimental AI and Games Workshop at AIIDE 2020, 8.