Sunday, May 31, 2015

Using BSP Tree to generate random levels

Quick thing I wrote over the weekend. Previously I wrote a version inside Houdini that utilized stamping various shapes to see if they would fit inside a grid. Works great, but rather slow. This version is inspired by this tutorial, and uses the concept of a BSP tree to divide the space into smaller and smaller grids that will not overlap.

I've also tested this on mobile devices, however, it's excruciatingly slow. I need to figure out what's wrong. I wrote this as a recursive function, and there have been some blips on google about mobile platforms and small heap sizes, but nothing conclusive.


No comments: