Posts Tagged Computer

Shift Happens

I’ve mentioned my video card struggles before.  It’s been a constant source of low-grade annoyance that I haven’t been able to use my card to its full capacity, but at least I found a way to allow myself to play.  Last night, though, even with underclocking I still had restarts just looking at the main menu screen in Starcraft 2.

Let’s not get off on the subject of why I was playing Starcraft 2 rather than working on my interactive fiction game — I’m saving that for a self-flagellating post later.  But once this problem started happening, I really wanted to figure out what the deal was, so I hit up Google and started browsing.

Some people had power issues, and that seemed plausible.  After all, it required some gyrations to get the card up and running in the first place.  Some people blamed heat, but when checking the card temps it just didn’t seem that high.  But then I found another article that finally got me looking in the right direction.

Apparently my model of video card has a feature where it automatically shifts the clock speed of the card between 500 MHz and 750 MHz depending on what you’re trying to do with it.  I don’t know all the details, but apparently 3D games under Windows 7 can confuse the card and get it to try to shift modes back and forth repeatedly, which causes the fan to go nuts and the card to eventually trigger a system shutdown.

The suggested fix for this was to lock the GPU to 750 MHz using an overclocking tool.  I downloaded RivaTune, followed the simple instructions for setting this up, and was rewarded with a card that runs stably (and quietly) at full rated clock speed.  Sure, it probably eats a bit more power just idling at the desktop, but it’s worth it to not have to worry about random reboots any more!

Tags:

Upgrading to Inform 7 6E72

With the recent releases of both the in-browser Glulx interpreter Quixe, and the newest Inform 7 Build 6E72, it was pretty obvious that I’d have to upgrade.  Sure, theoretically it would be possible to stick with the last version of Inform and manually roll out a playable website for my WIP.  But why turn down all the labor-saving power of the new “release along with an interpreter” option?  It automatically builds you a nice website, converts the Glulx file to Javascript for you, and packages it neatly up for release.  I’d also modified my source to remove the very few procedural rules I’d previously used, since I’d heard I7 is deprecating them, so I figured getting my WIP up and running wouldn’t be too arduous.

Happily, I was right!  I did run into about a dozen errors, which fell into two broad categories:

  1. Errors due to more strict syntax checking in the new build.  These were easy to find and fix — I spent maybe 5 minutes on these.
  2. Errors due to changes in the extensions I use.  My WIP uses a lot of extensions, and I hack some of them up a bit as well with overrides.  So pulling down the newest versions of all these extensions caused me a bit of worry.  Of them all, however, the only one that gave me any more than the most ephemeral trouble was the new version of Jon Ingold’s Flexible Windows.  Instead of a single drawing rule, it now uses an object-based rulebook, which required a couple of minor changes (as he points out in the changelog, I should note).  Actually making the code changes was easy; finding out exactly what needed to change was the trick.  Even this, though, didn’t take me more than about 15 minutes.

So the first thing I did now that I could get up and running in the new I7 was to set up Quixe and try a test release using it.  I was pleasantly surprised by the nice CSS defaults for the web pages.  The result isn’t quite up to the level of typography you can get with Gargoyle, of course, but for a literally no-effort setup it’s more than serviceable.  The only thing I ended up doing to the generated pages was to modify the User1 and User2 styles so that they reflected the colored text defaults that I start with, and I was off and running.

I have noticed that I7 is a touch slower to compile now than it was before, and generates a larger story file as well.  Before the upgrade I was running at just over 800 KB, and after the upgrade I’m up over 1 MB.  All the changes and improvements in the I7 release probably contribute to this, but I was pretty surprised to see the size of the generated file increase by 20%.  What this really means, I guess, is that it’s a good thing Quixe came out when it did, since the new I7 has pretty well priced itself out of the Z-machine’s range for all but the most trivial stories.

One thing I hope people continue to look at is the performance of Quixe.  The speed difference when running under Gargoyle vs. when running under Quixe is shocking — Quixe is at least an order of magnitude slower than standalone compiled interpreters, and I suspect more can be done to optimize Quixe given how brand-new the implementation is.  My fairly large WIP is certainly playable, but the slow response time is jarring.  Until speed improves I’ll still be playing most games through a standalone interpreter.

Now the only trick remaining is for me to work out how to support the dynamic color shifting for user styles that the standalone interpreters can use.  I have an extra window created below the status line that should be able to display one of four choices of colored text depending on what the user wants.  I’m thinking that with some judicious changes to the standard styles for that window, along with some minor changes to the code that displays the text, that I can support the appropriate choices in Quixe with a single set of CSS.  If I can’t, I guess I can create alternate windows with different color settings in their specific CSS sections and swap them in appropriately.  I’ll just have to ensure that whatever I end up doing for Quixe doesn’t break the solution I’m using for other interpreters.

Tags: , , ,

Andrew Plotkin’s Quixe Beta: Glulx Games Directly In-Browser!

In a surge of holiday-weekend coding, Andrew Plotkin (Zarf) has progressed his Quixe project to the beta stage and released it for evaluation.  If you’re very familiar with the excellent Parchment project, you’ll know that Parchment provides a Javascript implementation of the Z-machine, which is one of the major virtual machines used in the interactive fiction community.  When you play a game via Parchment, you don’t need plugins or standalone interpreter software at all — you play directly and natively in the browser.  This has obvious advantages for outreach — many people are leery of downloading unknown executable files at all.  And unless your game runs in Flash, convincing someone to install a browser plugin can be almost as hard a sell.  So Parchment has been a great mechanism to make Z-machine games available to not just a wider audience, but to a wide variety of devices as well.  Almost any device that supports a Javascript-enabled web browser can access interactive fiction through Parchment.

But until now, Glulx games were left in the cold.  Glulx is an alternate virtual machine developed by Andrew Plotkin to address some of the limitations of the Z-machine.  There’s more addressable memory as well as support for multiple windows, graphics, and sound, among other improvements.  Inform 7 gives you a choice of using Glulx or one of the Z-machine formats when you compile a game.

Unfortunately, using Inform 7 for a game of any complexity almost forces you into using Glulx, whether you are making use of its enhanced capabilities or not.  Inform 7 generates large game files that easily push past the Z-machine limits.  Particularly if you make use of the growing extension libraries you are likely to inflate yourself right past even the Z8 format’s cap on size.

So Inform 7 developers have (for the most part) found themselves unable to enjoy the same advantages of accessibility and ubiquity that Parchment gives Z-machine authors.

Enter Quixe.  Quixe provides a native Javascript implementation of the Glulx VM.  When combined with a suitable output layer (in this case I believe Zarf is using his own GlkOte implementation) it enables the same type of direct-in-browser play for Glulx-based games that Parchment enables for the Z-machine.

He’s currently got five games up on his page, but authors are able to convert any existing Glulx games using the zcode2js tool, and run them via his engine.  If you do this, you’ll notice that not everything is functional yet.  In particular, if you play the conversion of Rover’s Day Out you’ll miss much of the text formatting and screen effects that are visible in the game when played via a standalone interpreter.  Also, Internet Explorer does not currently work (!) Presumably these problems will be fixed and capabilities will be added in as development proceeds.  I expect we’ll also see the new style model that Zarf has been discussing over the past few months.

And of course, I had to run a conversion of my own Glulx game, Grounded in Space!  Despite not being very long or complex, I had to use Glulx for this game due the need for fairly high-precision floating-point math for one of the puzzles.  I haven’t gone through it in detail yet, but it seems to have converted correctly.  It doesn’t use any odd tricks that should prevent it from being playable, although the geometry puzzle might be even less comprehensible due to style and font issues.  At any rate, it’s very cool to have this capability, and I hope by the time this year’s Comp rolls around we’ll have a much larger number of games able to be played online due to Quixe!

Tags: , , ,

Who Moved Robin’s Cheese?

The upgrade to Windows 7 has been mostly straightforward, but while getting rained on at Thomas’s soccer game on Saturday I got a text message from Robin:

I HATE THIS NEW OPERATING SYSTEM!

It seems that in the process of installing Windows 7 and reinstalling iTunes that her music files got moved around to various unintuitive locations.  While I feel that iTunes and, frankly, myself deserve as big a share of the ire as Windows 7, it was Windows’s overintelligent search algorithm that actually drove Robin off the edge.

She was trying to set up a Gmail account for Thomas, not realizing that he was too young to qualify.  After attempting and failing to set up the account, she found herself locked out of several pieces of Google functionality, so she thought Google had dumped a cookie on our machine that was blocking functionality.  She tried to search for “cookie” on the Start Menu search field, and although it searched within Outlook for every cookie recipe email we’d ever received, and gave her an option to clear all cookies, it didn’t actually show her any individual cookies.  It took me about 5 minutes of trolling through 3rd level menus in IE8 to finally locate them and confirm that there wasn’t a rogue cookie.

I’m firmly of the opinion that Windows 7 is the best O/S Microsoft has come out with, and I think it’s great, but I think I’ve got some work to do yet to clean up and relocate some files before Robin gets truly comfortable with it.

Tags: ,

Lost Domain

Due to a SNAFU with Namecheap, I lost my domain for a day.  Combined with a power outage due to a storm here, we were left with no webpage, and when I got the computer back up, still no webpage and no mail forwarding.  So I quickly re-upped the registration and got everything set up, but I had lost the post I’d sent to my email account.  I should be able to retrieve it tomorrow.

Tags: ,

New Inform 7 Release Imminent

Great news from vaporware’s post on rec.arts.int-fiction!  Inform 7 will have a new release on or shortly after April 28th!

Items slated for the new build will include:

  • Tidier user interface
  • Easily publish Inform works to the web, including a release mode
    that creates a playable web site using Parchment
  • Many language restrictions removed, and more expressiveness in
    talking about kinds, phrases, relations, etc.
  • Many Standard Rules actions changed to provide default behavior
    closer to what modern authors tend to want (automatically opening
    doors, handling TAKE ALL more naturally, and so on)
  • More than 250 bug reports resolved

Can’t wait!

Tags: , , ,

Game Review — Left 4 Dead 2

While gearing back up for some more interactive fiction development after my two-and-a-half-month detour through Dragon Age, I made a comment on rec.arts.int-fiction to the effect that the Drama Manager in Blue Lacuna, Aaron Reed’s XYZZY Award-winning interactive fiction title, was unique in my knowledge in terms of providing an auto-adapting pacing mechanism for gameplay.

Zarf (Andrew Plotkin) responded with a link to a design postmortem presentation for the game “Left 4 Dead“, by Valve Software, which talked about their use of procedurally-generated content to provide dramatic pacing for that game.  Now, Left 4 Dead is substantially different from an interactive fiction title, but I like a good FPS as much as the next guy, and was intrigued by the paper.  In a coincidence that was happy for my wallet but not for my productivity, Valve was having a half-price sale for Left 4 Dead 2 right after this exchange, so I was able to pick up the game for just $25 and give it a spin.

The premise of the L4D series is that there’s been some sort of contagious infection that is turning people into zombies.  You play one of the four Survivors, humans that have proven immune to the contagion.  The goal is simple — escape the zombie hordes before your brains are eaten.  To do this, you have to work together to protect each other and carve a path through the ravening hordes of zombies to reach an extraction point at the end of the level.

It’s a cooperative first-person shooter game — even if you play alone, the game spawns three “bot” players to help you.  And it’s a good thing it does, because the gameplay depends on close cooperation between players.  If one person gets separated from the group, it’s very likely they’re going to get killed before too long, because certain of the enemies — the “special Infected” — can pin or otherwise incapacitate lone Survivors.  If one of your friends doesn’t quickly kill whatever’s on you, you’ll watch helplessly as the zombie rips you apart.

A big chunk of the magic of this game, as the paper I read indicated, is in the pacing.  L4D2 generates loot and enemies procedurally, depending on where you are and what your calculated level of “emotional intensity” is.  If you’ve been fighting hard, with lots of zombies on you, the game will hold at that level of intensity for a little bit and then back off to give you a breather.  If you’ve had some downtime, the game will slowly start spinning up more enemies and eventually subject you to a “horde”, where a mob of common Infected rush you, trying to overwhelm you with a human wave attack.  And every so often you get a special Infected or boss Infected thrown into the mix.

These special Infected are by far the toughest part of the game.  Each of the specials has a powerful ability it can use to wreak havoc on a team of Survivors.  Spitters can spit globs of caustic saliva, causing damage and potentially cutting off escape routes.  Chargers can sprint into a group, grab someone, and carry them along in a straight line until they reach a wall, both damaging and separating them from the group.  Jockeys can jump on your shoulders and force you to run away from your friends, and can even force you off ledges.  The dreaded Tank can absorb a ridiculous amount of firepower, and does amazing damage and knockback if you are foolish enough to let it close to melee range.

The complement to the dynamic pacing is the atmosphere.  Level design is excellent, with decaying architecture, weather effects, low-light areas, and close quarters all serving to keep the tension heightened.  The music used on each level is different, and thematically matched to the play environments.  Hordes and bosses all have special theme music, which is again different depending on the level you’re playing, and it wasn’t uncommon for me to start getting twitchy and panicky when I heard that horde theme start up again while I was stuck hip-deep in swampwater.

Your fellow survivors have a great deal of scripted conversation that is triggered in certain circumstances; you definitely get to know their personalities as the game goes by.  In addition to the level-specific dialogue, there are a lot of coordination comments they use, from alerting you to weapons nearby to reporting their imminent death.

I guess a good illustration of the intensity of the gameplay is my reaction to the weapons available on each level.  You always start a level in a “safehouse” — an impregnable room with a selection of health packs, weapons, and ammunition.  You can choose a single heavy weapon (such as a rifle or shotgun) to take with you, and you can’t change it until you find either another safehouse or a hidden stockpile of guns somewhere in the level.  And since the levels are procedurally generated, you don’t always get the same selection of guns on every playthrough.

In most first-person shooters I have weapon preferences — in Half-Life I’m a pretty big fan of the shotgun (if I don’t have the gravity gun) — but if I can’t get my weapon of choice, or if I’m out of ammo, it’s not a big deal.  I’ll just use one of the other ones.

In L4D2, if I don’t get either the AK-47 or the M-16 (on levels where that tier of weapon is an option) I feel naked and exposed.  It’s very uncomfortable not to have the precise weapon I’m most skilled with, and it’s just nervewracking and not very fun to play the game until I find an acceptable gun.  I think this more than anything else is the triumph of the Left 4 Dead series — that they can control pacing and atmosphere to such a degree that they can give you that “character in a horror movie” feel, just from your expectation of what’s coming next.

I’ve really only played the single-player campaign, so I don’t have the experience of going out and playing with three other guys using voice chat.  They do have several player-vs-player variants, including a very fun one where two teams of four alternate being the Survivors and the special Infected and then see which team can make it farthest through one of the levels.  It seems there’s a lot of replayability here, and I’m looking forward to giving some of those other modes a shot.

Even the single-player experience, however, was well worth the $25.  As an illustration of how procedural, dynamic content can serve the gaming experience, and as a darn good FPS game itself, L4D2 is well-worth playing if you have any taste for first person shooters — or zombie movies.

Tags: ,

Service Broker Update

I’m finally finishing up the Service Broker RPC implementation at work.  I’m not 100% done, but I can see the light at the end of the tunnel finally.  As usual, setting up the initial implementation isn’t that bad — it’s linking it into every other aspect of the system where you start to see problems.

The devil is truly in the details.  Now I’m exhausted from two straight weeks of fighting this fire, and I’m sure I’ll be right back at it Monday, trying to finish the last hanging details.

Wish me luck!

Tags: ,

So I Rewired It…

One of Katherine’s more annoying recent habits is to flip off the light switch in our office.  That wouldn’t be so bad, except that the switch is a half-hot that controls some, but not all, of the outlets in the room.  My webserver and my own computer are not on it (although the monitor is) but the main email computer and the one Robin uses for her work are on it.

So after about the fifth time Katherine killed power to Robin’s computer this past week I decided to rewire the switch to a flat plate and remove the control over the outlets.  This was a pretty trivial change compared to some of the work I’ve done in our basement over the past couple of years, but it was pretty satisfying.

So far Katherine hasn’t made any comments about the lack of the switch — we were out of the house enough yesterday that I’m not sure she noticed.  I’ll be interested to see her reaction when she finally figures it out — I hope it won’t be to go over and shut down the computers manually…

Tags: ,

Keyword Interface for Conversation Package

Following up on my previous articles on integrating Aaron Reed’s Keyword Interface extension with Eric Eve’s Conversation Package system for conversations (part 1 and part 2), I’ve packaged up the interface code as an extension and submitted it to the archive, so it should be showing up there shortly.

The code is a bit different from what was presented in the articles, due to some changes required because of minor issues with new versions of the extensions it builds upon.  The extension should support both Glulx and Z-code text coloring.

Thanks to Strainer for providing me the kick in the pants I needed to get this done!

Edit:  Due to an apparent bug with the OS/X version of Inform where it perhaps adds the author’s name and the extension name together before comparing against the 51-character limit, I’ve changed the name to “Keywords for Conversation Package”.

Tags: , ,

The Quern is Digg proof thanks to caching by WP Super Cache