Apr 05 2008

The very first murder

Well, the code’s finally to the point where the game can actually randomly generate a murder timeline. As it turns out, Bill killed Sam at approximately 12:15 AM, in the bathroom. Unsurprisingly, he used the Nondescript Murder Weapon(tm) to perform the dastardly deed. (When oh when will they learn that Nondescript Murder Weapons can be dangerous, and should be kept locked up? :) )

Now I just need to fill out each individual guest’s memories of the night (as opposed to the factual, actual events of the night), and then.. you know.. put in some sort of interface for the user to actually play the game, rather than analysing the events of the night by inspecting variables in a debugger. :)


Apr 04 2008

And still no screenshot

I’m finding myself growing more and more surprised at just how much code needs to be written for this mystery game, even as I continue to pare it back to make it achievable in the time limit, and just how little of the code actually puts anything visible up on screen.

Here’s the current state of play:

I’m planning for this game to be the first of two “Games in a Week”;  the second will build on the first one, to make a more well-rounded game, but the first one will be a fully playable game in its own right.

This first game (as yet unnamed) uses a static, fixed mansion layout, currently seven rooms.  There
are also a fixed set of seven “guests” at the mansion.  The events of the evening, however, will be generated randomly.  The player gets the opportunity to replay the events of the evening from each surviving guest’s point of view by using an “interview guest” interface, but guests may have faulty memories or may be lying (due to being the murderer).  In this interface, the player will see the guest’s memories of his movements through the mansion on the evening, along with where they saw other guests, and where they saw the murder weapon.  Once the player has compared the memories of the guests, he will have the opportunity to accuse one of the guests of being the murderer, and optionally to nominate the time at which the murder took place.  Get the murderer right, and you win.  Get the time of the murder right for bonus points.

As you’ve probably noticed, this first game entirely abstracts away the concept of motives, and of determining a murder weapon.  It also removes navigation (as characters can move instantly from any room to any other room;  the hallways are not counted as locations), and theplayer never moves around the house himself;  the game is entirely driven by menus and other interfaces, rather than giving the player a direct avatar within the world.  I’d like to add all of these things into the second game.  But trying to randomly generate a solvable puzzle is turning out to be a big enough task without also worrying about collision detection and pathfinding.  ;)


Apr 03 2008

Ever lose a day?

Big weather here, the last twenty-four hours. Downed trees, cancelled public transport, and total lack of power.

Which pretty much removed a day of development time on the Game in a Week. The power’s back now, though, and I’m back onto it!  With any luck, I’ll have some interesting screenshots soon!


Mar 31 2008

Twisty Little Passages

And now for the bit that I didn’t have time to type out last night. :)

Twisty Little Passages is a neat history of interactive fiction; the genre that has grown out of text adventures. I bought my hardback copy from a bookshop stall at GDC in 2005, and have to confess that I still haven’t read the whole thing; it’s been on my “to be finished the next time I take a flight somewhere” list for ages, but keeps being passed over at the last moment, since it’s a reasonably sizable hardback book. In any case, the book is copyright 2003, and is published by The MIT Press.

I used to be heavily into interactive fiction, to the point that I had a few games of my own in progress, one of which was a tiny little experimental game entitled “The Jaws of Victory”, which I’d intended to finish up and enter in three different IFComp competitions, but was completely stuck for a satisfying endgame sequence. Oh well. But I do still play the IFComp entries each year, though often not in time for the voting deadline.

Since it was mentioned in the quote providing the theme for the GiaW, I spent some time looking at Mystery House today, as well as a few of the revamps and spoofs over at Mystery House Taken Over. I’d not seen the game before, and as it turns out, it’s really an interesting piece of gaming history. I’m going to need to make a few nods to it in my game. :)

Anyhow. My plan now is to start prototyping the basic gameplay using a static set of data, both level geometry and events. Once I have a basic gameplay prototype, I’ll return to random generation of the game data, to make it play differently each time. Hopefully I’ll have a few concept screenshots within a day or two.


Mar 30 2008

Game in a Week #4 begins

Going to be a very quick post, today.

Nobody’s going to believe this quote, but it’s true. The book is “Twisty Little Passages,” by Nick Montfort (hardback), the randomly selected page is 170, and the first complete sentence on the page is: “In the first room of Mystery House, seven people are initially seen.”

The quote is so perfect for the murder mystery game I’ve been contemplating, that I’d feel silly not to use it for this. But I don’t know whether I actually have enough time to implement such a large project in just a week. Maybe I need to simplify it for the GiaW, and perhaps use a static mansion layout or something.

Or maybe I’ll just make a game about “people”, or the number seven. But that’d feel like wimping out. Anyhow, GiaW4 starts tomorrow! :)


Mar 23 2008

On the Construction of Mansions

So in my last post, I rhetorically asked when would be a better time to post game design thoughts than after working a twelve hour day on a weekend while feeling vaguely ill. Well, I have an answer for myself.

I’ve managed to get about two hours of sleep since then, as my brain just wouldn’t settle down to let me fall asleep (it was stuck in a little loop of trying to debug an issue that doesn’t actually exist; and no matter how much I told myself that the issue didn’t exist, my brain refused to stop obsessing over how to debug it). Plus, I’m quite definitely ill. So I’m trying to take it very easy for the next few days.

But even so, I’m also going to continue writing about procedurally generated murder mysteries (although it’d probably be better for all involved if I didn’t try to write any code right now). I want to start by stating that everything I’ve been writing thus far are guidelines; they’re intended as sign-posts and touchstones during the development of the game, which are returned to to help in making the hundreds of tiny decisions that need to be made during the construction of any game, in order to keep the game on track.

So with that caveat out of the way, I’d like to talk about my current thinking about how our randomly generated mansion will be generated.

The key thing that distinguishes the construction of a house or mansion from (for example) a network of caverns as seen in randomly generated games such as NetHack, is that its living areas are tightly packed together, with very little wasted space between rooms, so it’s important that our construction algorithm pack rooms very closely together.

As a starting point, we’ll assume that our mansion is a single story. Our mansion will be built on a grid; the precise dimensions of the grid don’t matter. There are two types of rooms that we can place on the grid. The first are regular “rooms”, which are a minimum of 3×3 in size, but may be anything up to about 5×6. The second type are “hallways”, which are always either two or three grid squares wide, and will be at least twice that in length (but can be longer than that).

When building the mansion, the first room placed is always at one of the edges of the grid, and is labelled as the Entrance Hall.

After placing the entrance hall, the mansion construction approach works this way: First, we search the grid for unused grid squares which border two used grid squares. If we find any, then we randomly select one of these to begin placing our next room or hall. If not, then we randomly select any unused grid square bordering one used grid square.

We then try to place a new room, starting from the selected grid square. If we can’t fit one (it’s conceivable that we could have a 2×2 dead space which can’t contain either a room or a hallway, for example), then we just select a new unused grid square and try again. Eventually we’ll reach the desired number of rooms, and will be able to stop.

This gives us our base floorplan. Once we have rooms and hallways placed, we start placing doors. The general rule of thumb is that every room that borders a hallway will get a doorway to the hall. Any room that touches another room has a 50% chance of having a door to that other room.

Once we’ve placed the doors, we’re almost done; just do one more pass over the map to make sure that every room is reachable from every other room (that is, that there are no little groups of rooms entirely cut off and inaccessible from the rest of the mansion) , and add extra doors as required until that condition is fulfilled.

Or at least, that’s my initial idea. I’m sure that once I eventually get around to implementing it, I’ll find problems with the approach. I’m particularly worried about whether in practice, the “select a random grid square that borders two used grid squares” heuristic will actually produce tightly packed floorplans the way that I hope it will, without moving to a more complicated and intelligent room selection mechanic.

I might actually have a go at implementing this, tonight. See whether I can get something working as a proof of concept, despite my fever. :)


Feb 25 2008

ThunderStorm Post-Mortem

Tag: #3: ThunderStorm, Game in a Weektrevor @ 9:36 pm

(I’ve uploaded updated builds of ThunderStorm, which allow users to remap their gamepads’ right analog stick. I encountered a gamepad today which had mapped the right analog stick to axes 4 and 5, bizarrely enough. If you’re having this sort of trouble with your gamepad, you might want to download 1.0.2. If not, there’s nothing new in the build.)

So that’s another Game in a Week in the bag. For a while on Sunday, I was seriously contemplating what I’d do when I missed the deadline; whether I’d relabel it as a “Game in Another Week” and work on it for a second week, or whether I’d release what I had and put it in a different category.. perhaps “The Space Under the Stairs”, or some such. Thankfully, I don’t have to figure that eventuality out yet. And with any luck, the things I’ve learned will help keep me from coming as close as I came on ThunderStorm.

What I did right:

  • Last-minute hustle to put the game together, when I did finally stumble onto a viable game design.
  • Willingness to step away from the computer, even late on Sunday, when I needed to think about design issues. Being close to the computer makes design issues feel like they can be solved by more physics, when they really can’t.
  • Having the online commitment to actually produce a game within the week is what made it happen in the end. If I hadn’t been posting and blogging about it all week, I’d have given up and gone to watch television. If you want to do something that requires creativity and a lot of work, I can testify that the best way to force yourself to get it done is to post a deadline for yourself online, and make sure all your friends know about it.

What I did wrong:

  • By far the biggest mistake I made was that when I selected the “cloud” theme, I didn’t brainstorm about the right things; I brainstormed about situations I could put clouds into, and about ways that I could use Box2D, and about ways that I could use the work I did on VectorPhysics in a cloud-based game. This lead me into a lot of interesting physics ideas which turned out not to be fun in an actual game.
  • What I should have done is follow the tenets of experimental gameplay programming; I should have started by brainstorming about the properties of clouds. Once I started in that direction (in desperation on Sunday afternoon), it was actually pretty quick to reach the basics of ThunderStorm.
  • Didn’t step away from the computer often enough. Those who have looked at the source code will have seen how much stuff I did that never got used. There’s VectorPhysics-like drawing of objects, there’s a run & jump control scheme, there’s a grappling hook, there’s all sorts of stuff that I was desperately making when I was searching for a design. That was all wasted time that I should have spent thinking about a correct design, instead of straining my brain trying to use technology as a replacement for design.
  • In retrospect, I’m not sure what I think of the graphic style. It looks a little like a really cheap Flash game. I’m certainly not getting much value for the graphic engine under the hood. I suspect I may have strayed a bit too far from the core “vector graphics” look that I’ve generally been going for. But I’ll admit that it’s nice to finally have something that doesn’t have a flat black background, at least.

In retrospect, I’m quite happy with how ThunderStorm turned out. I’ve had some fun with a co-worker, trying to work out an optimal play strategy (Our favourite strategy involves getting all your thunderclouds lined up on one edge of the screen, and firing as fast as you can toward the opposite side of the playfield. It’s pretty effective, but very dangerous, as if a single happy cloud makes it through, the happiness will spread almost instantly through your closely-packed thunderclouds), and another tried to convince me to continue development on the core “controlling multiple agents simultaneously” idea behind ThunderStorm. And I may do that.

But probably not until after I revisit Muncher’s Labyrinth. And I’m not planning on doing that any time soon, either. :)


Feb 24 2008

ThunderStorm, finished!

Tag: #3: ThunderStorm, Game in a Weektrevor @ 9:42 pm

Wow. Who’d have thought that I’d go from design to fully playable game, including intro sequence, title screen, instructions, and credits scroll in just over seven hours?

Granted, there’s an awful lot of code copy and pasted from elsewhere, but still.

I’m making binary builds now; should have them up and ready for download within about an hour. Will post when they’re ready.

Update:  Binary builds for Win32 and OSX are now available from the “ThunderStorm”  page in the sidebar!  Please leave comments on the static ThunderStorm page.  :)


Feb 24 2008

First playable

Tag: #3: ThunderStorm, Game in a Weektrevor @ 5:04 pm

ThunderStorm first playableThere probably won’t be a second playable (owing to a total lack of time), but here it is.  I’m currently calling it “ThunderStorm”, and it’s a somewhat wild and madcap shooter, which is probably way too generous to the player (total death comes quickly and unexpectedly, but very, very infrequently.  There is likely to be an optimum strategy which would lead to infinite playtime.  But that never stopped E4, so who am I to complain, as long as the game’s fun?)

But honestly, at this stage, I’m just happy to have something that makes me smile when I play it.  :)

Now I just need to fit in an initial menu screen, instructions, and maybe find some sound and music.

And I need to implement a control scheme that doesn’t require a two-analog-stick controller.  Probably using the mouse.


Feb 24 2008

A last-minute change of direction

Tag: #3: ThunderStorm, Game in a Weektrevor @ 2:42 pm

U TurnNote the time.

And yes, I’m insane.


« Previous PageNext Page »