During the past 50-someodd hours, I’ve had a grand total of approximately four hours of sleep. This was largely due to needing to wake up early for a lengthy international flight on which I was unable to sleep (obligatory screaming baby three seats to my left, and another two rows behind me), and now trying to adapt to a strange new time zone.
On the plane, I finally watched (amongst other things) the movie adaptation of Sweeny Todd: The Demon Barber of Fleet Street, by Tim Burton. When it was released in theaters I had been amused at reports of people who had been surprised to discover that the film was a musical, despite it being a film adaptation of a fairly high-profile Stephen Sondheim musical of the same name.
In the end, I was surprised to find that it wasn’t so much an adaptation as virtually a straight translation, maintaining even the incidental and transitional music from the stage show, just adding CG elements to fill out the world beyond what can realistically be done in most live theater. And making some surprising changes, where you’d least expect them.
At this point, I’ll confess to being a bit of a theater nerd. Below the fold, my comparisons between the movie and the stage play. While the comparisons are mostly spoiler-free, they won’t mean much to you unless you’ve seen one or the other of the productions. So those who have no interest in this sort of discussion probably want to skip this post. More game design discussions tomorrow, when I’ve had proper amounts of sleep, I promise.
Continue reading “On jets, and the lagging thereof”
So it’s been a bit since I released The Incomparable Deductions of Police Constable Sir Nicholas Spratt — The Early Years, and I think I’m ready to do the post-mortem.
What went right:
- Managed to pare down “randomly generated murder mystery” into a concept simple enough to actually be implemented in a week, but still with enough meat to be interesting.
- Actually stuck with a single gameplay concept for the whole week. None of the previous Game in a Week projects have done that; all the others were redesigned into completely different game genres midway through implementing their original designs.
- Last-minute hustle to get a front-end onto the game, even after posting that there wasn’t enough time to include one. (Most of the code was stolen from Muncher’s Labyrinth, except for the intro sequence which was stolen from ThunderStorm, and then slightly modified)
What went wrong:
- I lost a day due to a power outage caused by extreme weather conditions; it was going to be the first day of programming, too. There’s not really a lesson I can take from this, but it’s something that went wrong during the week.
- I wrote the game as a ‘coreGame’, which means that it starts up automatically when the game is launched. I do this on almost every Game in a Week, and have to switch it over into a ‘coreGameMode’ at the last moment, when I’m implementing the wrapper interface. I really need to start out implementing these things as game modes, rather than as games. Always costs me an hour or two, at the very last moment of development.
- The current murder generation scheme is basically to perform a simulation, with some basic AI for each participant, and with the murderer trying to evade detection. This is a legitimate approach, but sadly does sometimes yield murder mysteries which are unsolvable, as there aren’t enough clues. It would have been good to have a computerised solver, so that the game would detect if it had generated an unsolvable mystery, and automatically regenerate until it had a solvable one.
- The game also has a pacing problem, largely caused by the interface used; it really lets people page through data very quickly, whereas murder mysteries call for a slower, more deliberate pace. This would probably be fixed if the player had to move through the mansion to interview suspects.
- The game also basically requires the player to have a pad of paper nearby, to take notes. I really need to figure out a more useful way to present information to the player so that this isn’t necessary. I actually had a few ideas which I didn’t implement for the game, because they likely would have made the pacing problem even worse. Both this and the above would probably both need to be implemented at the same time, to even things out.
I’ve listed a lot of “What Went Wrong” elements, but I actually think that this was one of my more successful Game in a Weeks, in terms of trying out an experimental game concept which I haven’t ever seen before, and finding what bits work and what bits don’t work. I’m definitely going to return to this in the future to refine the game. But as I’ve noted earlier, it won’t be the very next thing I do.
I’ve actually been thinking about possibly doing a sequel to Muncher’s Labyrinth next. Or maybe I’ll split StarShot out into a standalone game, as I think it really would stand up rather well on its own, if I gave it a few more tracks and a nice menu interface. Or maybe I should implement a “Look, I have physics!” game, since I really haven’t gotten much value out of integrating Box2D into VectorStorm yet, and I’m starting to feel guilty about how many people are finding my site via Google searches for Box2D games. 
Well, as I’d warned, it’s not really as polished as most of the games that I put together, but that’s because there’s a whole lot more going on under the hood in this one! And I have to apologise in advance, but I’ve taken a sudden fancy to baroque game names, and so I’ve given one to this Game in a Week project; it’s named “The Incomparable Deductions of Police Constable Sir Nicholas Spratt : The Early Years”
I’m putting binary packages together now; they should be available for download within about an hour!
(Edit at 11:04pm: It’s up! Grab OS X or Win32 binaries, or build from source! The download link is here!)
So, with approximately twelve hours to go, here’s the state of play:
Stuff that works:
- Seven guests have dinner together in the mansion (staticly declared floorplan). The soon-to-be murder weapon is in the Study.
- The evening’s events are randomly generated. At some point during the night, someone takes and conceals the murder weapon, when they’re alone in the study. Later, they get one of the other guests alone, and kill them. Finally, even later, they try to hide the murder weapon (but the police find it when they arrive)
- The evening’s events are used to generate memories for all the surviving guests, including the murderer.
- The player can select guests and view their memories. These memories show the guest’s own location, who was there with them (and in the event of the victim, whether the victim was alive or dead), and whether or not the murder weapon was in the room.
Stuff that doesn’t work yet:
- The murderer does not yet lie about his memories. Need to come up with a clever method for the murderer to throw off suspicion; this means that it’s pretty easy to find the murderer right now, as the murderer is always the first one to see the victim dead. Once he stops immediately confessing, it’ll be a little more tricky.
- It is not yet guaranteed that someone will discover the body before the end of the evening. Need to add that as a constraint to the basic plot generation system.
- There is not yet a mechanism for the player to accuse a suspect, or for the game to reveal the true killer.
- Finally, I want a text blurb at the start of the game, which gives a brief text introduction and specifies the victim, the time at which the body was found, and where the murder weapon was found.
And I guess that a nicely atmospheric music track would be nice, too, but this is basically just a prototype of a gameplay mechanic (albeit an extremely complex one), so maybe that would only be distracting. I’m already getting the impression that this is a game which would play best with a piece of paper and a pencil at your side for notetaking, and that worries me a bit. Would that kill this as a casual game?
It’s not much of a screenshot, but I’m still quite pleased. (Although I’ve had to jump through some frightening hoops to get it to display in the new version of WordPress. Looking forward to them fixing this new “insert media” interface).
This is showing a replay of the events of the evening. The little bar at the top of the screen shows the current progress through the evening; right now, we’re looking at the very start of the evening (actually, the end of dinner; it’s at 8:00pm), and all the guests are sitting at the table, in the dining room. The white circle over in the northeastern room is the Unspecified Murder Weapon, which later in the evening, one of our guests will pick up and make use of. (Daisy picks it up and conceals it at 8:45pm, and uses it to kill Mr. Green in the Dining Room at 11:30pm. The corpse then isn’t noticed until 2am. I’m a little nervous at how often Daisy kills Mr. Green in these; that particular combination seems to come up about half the time. I’m going to need to check my random number generator!)
In practice, the game’s player will never actually get to look at the whole course of the murder like this; he’ll have to figure it out, by checking the events as recalled by each individual guest, and piecing together the truth from conflicting alternate accounts.
But I’m exhausted now, and am going to head to bed. It’s going to be a pretty rough ‘Game in a Week’ this week; I don’t think this one is going to have a nice front menu or anything, like the previous ones have. The project is just too big to actually complete and polish up in the limited time I’ve had. But I’m still pretty pleased with it; it’s one of the coolest things I’ve written in a long time, I think. It’ll be even better when I get a chance to plug in an algorithmically generated mansion, and start printing people’s names and room names and suchlike. 
I just spent the last five minutes tracking down a bug which resulted in a fresh corpse occasionally (about one time in three) wandering into another room after being killed.
Algorithmically generated content can be really tricky to get right, even when it’s as simple as this! 
It’s really weird, sitting here and writing code for simulating what’s essentially a rather old-fashioned ideal of an Agatha Christie-style dinner party murder mystery, while listening to an old radio show “Night Watch”, which is basically a 1950s version of “Cops”, on the radio.. in this episode, the police were interrogating a murder suspect. (Who in the end turned out to have done it, but in justifiable self defense)
Next up on the schedule, “Dragnet”. And I’m in the middle of writing code to make the murderer try to find somewhere to safely hide the murder weapon, after committing her crime (it’ll be found when the police turn up, but the other guests won’t see it in the meantime). It’s gonna be an odd evening. 
Apparently somebody has chosen to spoof my e-mail address to send spam. How do I know this? Well, my mailbox is bulging with “delivery failure” notifications; about a dozen in the last hour, and I’d be surprised if the rate doesn’t increase overnight. Not really what I wanted to be dealing with when I’m under a deadline, even self-imposed.
The spams advertise an online accessories shop, which has been registered on about half a dozen domains, all registered on March 31st, all by one person using a Chinese address.
In case anybody’s here because they want to complain about receiving one of these spams, it’s not my fault; I hate spam as much as anybody else; the criminals have just stolen my online identity to throw people off their track (and this can easily be verified by those who know how to inspect the spam’s e-mail headers).
For everyone else.. does anybody know of an effective way to avoid this problem in the future? Has anyone had success with things like SPF or Sender ID to actually keep spammers from spoofing your identity? For right now, all I can think to do is to set up a procmail rule to throw away the delivery failure mails, and wait for the spammer to move on to some other victim…
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. 
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. 