At Christmas last year, I kinda forced my loved ones to all exchange books. Which I think mostly worked out for the good. I especially enjoyed getting A View From the Cheap Seats (the hardcover is beautiful). Neil's writing is engaging and warm and funny and the only problem with the book its it contains a lot of introductions to other books, so now my reading list is longer than when I started.
I also made it to 12 books in 12 Weeks. Mostly Audiobooks, but I'm quite happy. I'm going to keep going and see how many books I can read in the remainder of the year.
Saturday, October 07, 2017
Friday, October 06, 2017
Project 16: Covert Action in Space: Update 2
I've been working on my Covert Action in Space project and reached the point where I wanted to be able to see a graph of the spaces I'm generating. Particularly, when I was working on my first system, it was difficult to get a feeling for how the spaces work (or if they worked). At first I had been thinking that I’d look and find a simple algorithm to draw a graph and then implement that in something simple like Processing. Fortunately, poor google-fu prevented me from finding a good algorithm and instead I found GraphViz.
I'm not sure I want to work here, but I'd look for their industrial secrets. |
Despite that tweet, I managed to keep my wits about me and realize that I don’t need to create my own graphing system, I just want to see a graph of the space layout. So instead of spending time learning a graphing algorithm and dealing with all of the problems that’s likely to create, now I just need to output a simple text file and let the magic happen.
GraphViz is great. It’s capable of doing a lot of stuff of which I only need it to do a little bit. To output, I need to make a list of all room connections and put it in GraphViz’s dot format. Internally I’m keeping this information in a map so that each entry has all of the rooms that a room connects to. This produces duplicates in the list, but using the strict keyword GraphViz automatically ignores those.
The code to generate the dot file works out to be quite simple. |
And the dot file for the graph up top. Again I'm not particularly stressing GraphViz. |
As I said, this makes it really easy to look at how spaces are connected and how those spaces work. I’m really glad I was able to get this working without needing to spend too much time on it.
The next job from here is to start laying out an actual floor plan based on the given space. I have a rough plan, basically starting with a default shape for each room and then expanding them to fit together. I can probably come up with something more complex, but as with the space generation, I’d like to start simple.
Monday, October 02, 2017
Blog: Video Games of September 2017
Well, it finally happened. I played something more than Breath of the Wild. Generally nothing grabbed me too much again in September so I tended to default to some basic choices. I did try to keep my streaks up in Pokemon Go, but other than that I didn't feel too attached to anything.
My top five games (by play time) for September were:
- Civilization 6 - I figured at some point I'd sit down and spend more time with this game. As I think I've commented before, much as I like strategy games I'm never that good at them. I feel like Civ 6 is a bit more open to how you play, although it remains a little bit bland if I set the difficulty low enough to play well. And of course much as I did enjoy it, it managed to get to the top of the list through a couple of "just one more turn" nights.
I am the mightiest (and only) navel power in the world and yet I can't keep the barbarians off my shores. - The Legend of Zelda: Breath of the Wild - Still awesome. I'm still discovering new things. I'm still having fun. I'd like a little bit more story at this point, but I guess we'll be getting that before too long now.
I was just standing here and then suddenly realized how beautiful this looked.
- Kingdom Rush HD - My love of strategy games has a strong component of loving tower defense. Kingdom Rush is one of the best although (as noted above) I suck at it more than I probably should for how much I play it.
The standard state of any Kingdom Rush game for me. - Pokemon Go - A few minutes a day keeps a game up on the list. Sadly I didn't really get time to deep dive too much on PoGo, but keeping my streaks alive was enough to get me logged in most days.
His name is Tiny.
- Cities:Skylines - I do like city building. But, I also like pretty pictures of video games. I keep a rotating selection as my desktop, and, more than anything else looking at those pictures makes me play Cities:Skylines so I can go get more pictures.
The roads are quiet this late at night.
Here's my total play time chart for September:
And here's a chart of how much I've played over the month:
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:
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.
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.
Subscribe to:
Posts (Atom)
The Books I Read - November 2024
November was a bit weird. The Hands of the Emperor is long, but excedingly good. I'm continuing to find Anna Lee Huber a very engagin...
-
A quick note, I've updated this project ! I don't usually go for having a lot of stuff on your desk, but my recent success makin...
-
This volume of my favorite YouTube videos is a bit of a testament to the cool things people can make. So have I mentioned that George Wa...
-
One of my first memories in our house, about 7 years ago now, is sitting at the dinning room table and thinking the fridge was about to expl...