Skip to content

battower/WaveCollapse_

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random Dungeon Generation with Wave Form Collapse.

wizandsmog.mp4

Poor Wiz the Wizard. Forever chasing his dog Smog through a dungeon endlessly.

Using Djikstra flooding, and WFC, Smog, in his endless pursuit of strawberries, is being chased by his owner, a drunken Wiz the Wizard. The dungeon is remade with the current state of the dungeon in the target area acting as an intial condition for WFC.

The constraints are based on the Rooms constraints found in Maxim Gumin's WFC git hub.

For easyness, I import constraints as a tiled image. Such as this:

Rooms Constraints

crawler_constraints

There are technical difficulties with the approach I have taken and is thus a prototype of integrating WFC in pygame projects. Improving the time it takes to solve larger arrays may come from adding backjump to the backtrack algorithm. Or perhaps, allowing the pausing and resuming of a search. Using numpy arrays in the Wave class may help as well. And, I am curious how a different algorithm may work as suggested by BorisTheBrave and used by Debroglie.

The main problem of course is just what to do when an area fails to generate according to the constraints. Perhaps using Djikstra flooding to deal with the closest problem areas first, modifiying tile weights so 'walls' are more likely. Or expanding the tile set to include safe terminating tiles.

If you set the DEBUG to True, you can view the entire dungeon each generation cycle.

Numpy is Required.

Sources:

https://github.com/mxgmn/WaveFunctionCollapse

https://github.com/PhyM73/WaveFunctionCollapse_DASC_project

https://github.com/BorisTheBrave/DeBroglie

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages