Showing posts with label Covert Action. Show all posts
Showing posts with label Covert Action. Show all posts

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.

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.

Sunday, September 03, 2017

Project 16: Covert Action in Space

Sid Meyer has a rule, the Covert Action Rule. The Covert Action Rule basically says don’t make Covert Action.




So the next big thing I want to make is basically a recreation of Covert Action. Covert Action in Space.

In covert action you play a super spy (or super agent … or super counter-agent … or something). Each month you’re given a mission and some basic clues. Then you have to stop the bad guys from doing whatever they’re doing. If you succeed you get a clue about the current mastermind plotting the crimes. Once you’ve figured out who and where the mastermind is you can grab them and wrap up that crime spree. Then some other mastermind starts up again the next month.




Now, I’m trying to finish a PhD, so it’s a really stupid time to take up making a game, but that’s where the Covert Action Rule comes in. Basically the point behind the Covert Action Rule is that it’s hard for the player to remember what they’re doing when they have to keep switching between generally unrelated minigames, so make sure that your player always knows what they’re supposed to be doing (XCOM also falls into this territory).



My thought is that given limited time and attention, making a collection of interesting minigames, seems like a good idea. I can work on one minigame when I have time and I don’t have to worry too much about making the whole thing hang together. It should be good practice getting a game made without worrying too much about making the game good.

As for the “in Space” part. I have a sci-fi world sitting around in my head, with a few stories I’d been meaning to write (and a few I’ve managed to put up here). It seemed like a good way to modernize a game that had fallen into abandonware and give it an interesting spin. Rather than having to fight 1990s terrorist across Europe, you could fight space terrorist across the Terran Empire.

The original game had four main minigames; one where you infiltrate people’s offices, stealing their information and possibly arresting them, one where you drive through the city either trying to capture someone or avoiding your own capture, one where you have to swap chips out to trace a car or bug a landline, and one where you have to decrypt messages doing a simple substitution cypher.

I think there are a lot of fun things that could be done after to stretch the game and make it a little more playable than the original. Before that however I want build the original four minigames and get a skeleton basically. Of the four, I’d like to start with the infiltration minigame, and especially with a little bit of fun procedurally generating offices (possibly to do different things) and building up a guard AI.

Due to a mishearing, I accidentally created the mascot for this project. The Flurpin.

I’ve started a bit over the last few months and I have a rough system together that takes requirements for buildings and is able to generate a procedural room graph, that connects all the rooms, but doesn’t actually build a floor plan yet. My next short term goal is to finish creating the floorplans from the graphs. Given that I still have a PhD to finish and this is mostly a “watching TV with the laptop out” activity, I’m hoping to wrap up this the floor plan generation by October 15, 2017.

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...