Saturday, September 30, 2017

Project 16: Covert Action in Space: Update 1

I spent quite a bit of time working on my first approach to procedurally generating spaces. I based a lot of what I did on [this paper] and ended up with a system that worked, but that ended up pretty complicated. It had a system for creating an arbitrary hierarchy of spaces, as well as an arbitrary rules engine, which provided systems for determining how rooms were connected to the outside and each other.

I had already finished that work when I first posted about the project and I thought I'd keep working with that system. I realized, though, that solution was overbuilt and over complicated. So I ended up spending a quick evening rewriting it. The arbitrary hierarchy was very difficult to maintain and creating rules that abstractly described space was frustrating, so I dropped all of that and went back to figure out what I needed to make a minimal viable product.

If my goal is to play with guard AI, then I need space for the guards to guard, furniture to play hide and seek in, graphics to see what's going on and some AI. Plus possibly an interface to play.

The new system was a little messy, but thanks to a timely beer with a friend who had just been reading Uncle Bob, I came out with a nice clean system. I now have:

  • A model which describes how to make a space:
    • Model rooms which include a room name and a probability that the room should be on the space. 
  • A space that includes:
    • A list of rooms and a map 
    • A constructor that builds a space based on a given model 

The first question I had was would it still be interesting. And I think (at least for limited test situations) it is. Using a basic model of a Hall (with probability 1.0), Office (0.75), Storage Room (0.6), Lounge (0.5) and Bathroom (0.25), it has provided an interesting set of rooms and connections that, I think, could each provide an interesting encounter in a game.


At this point, I’m just producing the text outputs of the system, but I think the above sampling produces something “interesting”. My evaluation for “interesting” right now is: Can I imagine how an interaction between my spy and a bad guy would go down in that space. For the samples above I think I can, and I think with more models, I can expand the interest of the space.

My system has a known bug right now in that it isn’t guaranteed to produce a fully connected graph of rooms. I think that’s a quick thing that I should fix in the near future. Other than that my next step is to put together a quick graph viewer to show how the rooms connect. Once that’s finished then it’s on to expanding the graphs to physical space.

No comments:

Post a Comment

Giant Bugs and Staying on Top of Things

Into the Breach, Subset Games, 2018   This is a mix of obvious video game tactics and their obvious implications for getting things done. I&...