Archive for July, 2011

Diary Of A Madman #3

Friday, July 15th, 2011

In those rare occasions I go out to the streets, people ask me about the status of Asylum. Shady characters in dirty coats most of the time, lurking in the shadows and speaking in whispers. They could be a product of my imagination (after all I can never see their faces, provided they have one) but I always respond them for the sake of politeness. I mean, imaginary people deserve respect too. But I’m going to assume that you’re real and want to know about the status of… What was I was talking about?

Right, Asylum. As you can imagine, it’s been a very busy period for us, and there’s so much to tell that I wouldn’t know where to begin. Perhaps the most important news is that the game has gone semipublic and people had a chance to actually play it. In other words, it exists. More specifically, we featured an early build in a local fair and visitors were able to walk without restrictions around a sizable portion of the first floor of the Hanwell Institute. The reactions were very positive and, even though the mood is kind of lost when you’re in a big room with dozens of people and loud noise, they were all clearly impressed. The game was shown on two big HDTVs and graphics still looked sharp and detailed, so I’m not lying when I say that Asylum really, really is high-definition.

Here, I have a blurry and completely useless picture to prove it:

Asylum @ MICA

Anyway, back to the inner workings, last time I spoke about the video system that was finished, enabling us to populate Hanwell with dozens of lively videos. Since then we have completed the first floor, which is the biggest one and therefore a very important milestone for us. All the doors are now animated as well and, if you’re familiar with Scratches, you’ll know that represents a great deal of work. It’s almost fifty videos of doors opening in the first floor alone, along with beautiful animations of the ocean waving through some windows, faulty lights, moving trees, water in a fountain and inmates inside the cells of a truly sinister corridor. And we’re not even done yet. When put into perspective, the sheer amount of work makes me want to cry.

How do we manage with all this? Well, in the first place, loads of coffee and illegal drugs. It also helps, as I hinted before, that the scripting language of the engine is deceptively simple. I’ve already told you a bit about the process of creating nodes. Now, here’s a quick glimpse of the process to create what we call a “spot”. It’s not a “hotspot” because it may not be interactive:

door = Spot.new(WEST, {64, 424})

This means we create a spot object named “door” on the west face of the cubemap and we give it a set of coordinates, in this case just the origin. The vectors of coordinates can be of any length and shape, so it’s completely freeform (the engine itself makes sure it’s a closed region). And before you ask, we’re working on a tool to easily draw regions directly on the cubemap. But let’s stick to the basics for now. So, why do we give it a single pair of coordinates? Because of this:

door:attach(VIDEO, “vid_door_corridorb_hospital.ogv”)

We attach (and that really is the meaning of this action) a video file to the “door” object. The engine calculates the size of the video and resizes our previously created spot accordingly (with two coordinates, it was a single point). This saves us a bit of work as we only need to worry about placing the video properly. For now we support Theora for videos which is open source, lightweight and very fast. It has proven to be a powerful format (with a sucky API though). Overall, this is a very straightforward process to include videos in our nodes. But wait! Games need audio too… So:

door:attach(AUDIO, “sfx_door_large_open.ogg”)

Which I think speaks for itself. Suppose we want to make that spot interactive as well:

door:attach(CUSTOM, from_corridorb_to_hospital)

This links a custom action to this spot, effectively making it clickable. Now the only task left is to add this spot to one of our nodes. The entire chunk of code would look like this:

door = Spot.new(WEST, {64, 424})

door:attach(VIDEO, “vid_door_corridorb_hospital.ogv”)

door:attach(AUDIO, “sfx_door_large_open.ogg”)

door:attach(CUSTOM, from_corridorb_to_hospital)

corridorb1:addspot(door) — Our previously created node

Easy peasy. And the contents of that custom action (in reality a Lua function) could be as simple as this:

function from_corridorb_to_hospital()

door:play() — This plays both the video and audio attached

switch(hospital1)

end

Do you like the approach? Are you excited? Are you still awake? We think this is an equally intuitive and powerful method, combining many aspects of coding into one single concept: the spot and stuff you can attach to it. We’ll go over a few more options in future episodes of this exciting diary.

What next? We’re preparing a big update to our website in which we will finally reveal the new name of the engine, along with the first gameplay video of Asylum and “official” batch of screenshots. I’m committed to keep a good pace of updates from now on… Yes, I can be that naive.

Dear Deranged Ones…

Friday, July 8th, 2011

I’ve been trying to update the site for the past month but Evil Forces are working against me. I know I must level up to overcome them, it’s just that these things take time. I swear by my left tentacle that I’ll catch up the next week.

In the meantime, here’s a few modern (gasp!) movie recommendations for you. It’s been quite a successful streak!

Loft: A surprisingly good thriller from the Netherlands that beats Hollywood in its own game. Five married men sharing a risky secret end caught up in a twisty network of lies and deceptions (hey, I could write movie scripts). Make sure you watch the original before the inevitable crap remake.

The Adjustment Bureau: Featuring Matt Damon and Emily Blunt (who is downright gorgeous… when she isn’t wearing any makeup). I wasn’t expecting much honestly but the movie blew me away with a very intelligent mix of sci-fi and religious themes. I won’t say much but, trust me, this is one of the most clever plots I’ve seen in a while. It works. I was very pleased at the end and thinking how it was possible that no one came up with such an idea before, and then the credits revealed it was based on a Philip K. Dick story. Duh.

Limitless: Guy takes a drug that makes him supernaturally intelligent. Great pace and trippy scenes (especially an outstanding camera work). Not so relevant in the end but a seriously fun ride. The movie is based on The Dark Fields novel by Alan Glynn, who stole the plot from Ted Chiang (Understand) who in turn stole the idea from Daniel Keyes (Flowers For Algernon). Both recommended reads afterwards.

And that’s it! Stay tuned, I AM coming back. Someday.