BSP

So it turns out trying a BSP method of generating maps just gave me a headache for most of the day. New code file is up there showing it attempting to break the map into regions. Now normally I’d use a 70×70 sized grid instead of 20×20, but at 20×20 its easy to see some problems:

Python guesses really badly at where things should go. 90% of the problems I keep encountering are where to put a dividing line to separate 2 regions. Using int(30%-60% length of the room), python guesses where to put the divider. At smaller regions (which will occur anyway was the number of split()’s occur and rooms get smaller), this means that in a 4×4 sized region, it will lowball .30*4 = 1.something, so it puts the divider at 1. I suppose decreasing the tolerances will solve this problem, but I feel like a better solution is out there…

**scratch that, it really was just a matter of playing with tolerances. Now it comes out relatively nice on larger sizes. I wonder how many rooms a dungeon should have…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: