Archive for category Computer

More Shift

OK, so I didn’t have the issues with my video card quite as under control as I thought I did.  RivaTuner established the overclocking profile, but at certain places in Starcraft 2′s cinematics I still got the black-screen reboots.  Every time.

So I got fed up and decided to replace the card.  Having been burned out a bit by ATI, I checked into the recent nVidia cards, but didn’t find one that hit the graphics horsepower levels I wanted with low power consumption at a decent price point.  Continuing to look around, I discovered the Radeon 5770 card, which very closely matches my old 4870 for pixel-pushing power, but is built on a 40 nm process so it runs at much lower power.  The price was great and reviews were positive, and the kicker was that the card only takes one PCI power cable, so I’m confident my PSU can handle the load.

There are several manufacturers of ATI-based graphics cards, so the next choice was which company to pick.  Sapphire was off the table from the get-go — I don’t know if the issues I had with the 4870 were power-related or card-related, but I wasn’t going to risk another round of video card instability if I could help it.  In the end, I decided to go with the MSI board, which cost about $20 more, but has uniformly high reviews for performance, form factor, low temperatures, and overclockability.

I ordered the card from Newegg and got it in Wednesday.  I didn’t install it until last night, partly to try to keep myself focused on writing.  But once I did, the install was simple and clean.  The old card came out and went back into its box, ready for one of my friends to buy it used, and the new card went in.  Drivers were uninstalled, swept, and reinstalled, and the card came up perfectly and ready to go.

Except that it makes no noise at all.  Even under load, this card is quiet, and at idle you’d never know it was there.  It idles at 37 C, which is absurdly low for a video card.  I guess I shouldn’t complain about it being quiet, but it really is spooky knowing that the card is cranking away and the fans are barely running.  I keep expecting the computer to catch fire.

So welcome to the component family, MSI 5770 Hawk.  May you have a happy, healthy, and long life.

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:

Slow Update Frequency

I’ll probably be dropping down to one post per week until the end of September.  There are a couple of different reasons for this, but the main one is that I’m trying to finish up my entry for IFComp 2010.  There’s a lot of work left to do, and I’m really needing to use as much of my time as possible on this to ensure it’s a top-quality entry this year.

Once that’s been released I’ll try to pick the pace back up again.

Tags:

Interactive Fiction WIP Progress Report

I’m working on a project for this year’s Interactive Fiction Competition (IFComp 2010).  It’s one that I started as kind of a small palate-cleanser after last year’s Comp, intended to be a quickie adventure for my son.  As I worked through the idea and setting, however, I realized that there was more there than I was planning on implementing, and I reevaluated the scale of the project.

The result is my current work in progress (still nameless for now).  I’ve been working on it almost since I submitted last year’s entry, aside from a couple of breaks, and I’m happy to report that I’ve completed implementation of the last puzzles and the ending sequence, at least in skeletal form.  Much of the early game is more completely implemented, but getting the “bones” of the rest of the game laid down means that I don’t have to worry too much about infrastructural issues any more, and can concentrate on finishing the writing and improving the polish.

I’m very relieved to be at this stage; I pushed hard to get here over the past month and am happy that I achieved this.  I can hear you saying “But Matt, it’s the middle of July!  Why are you worked up about completing your game when you have two and a half months left until the Comp submission deadline?!?”

Well, there are several reasons.  First, with a baby in the house that’s almost exactly as old as my WIP, plus two other young kids and a wife I enjoy spending time with, getting time to work on the project is not easy.  I’ve used almost the entire amount of my free time since the last Comp (except for a Dragon Age break) to get here, and I’ve needed it.  I know that finishing the rest of the game in time is still going to require focused effort, especially when school starts back up in the fall.

Second, I have a much better idea of what goes into creating a finished, polished game than I did last year.  For Grounded in Space, I didn’t give myself enough time for development, for learning the tools, or (most importantly) for testing.  This year, even with the game scaffolding implemented end-to-end, I still have the following left to do (in roughly the order they need to be accomplished):

  • Enhancing the in-game tutorial
  • Fixing some known game-derailing bugs
  • Write out the ending sequences in full
  • Test and enhance the default message modifications
  • Implement some additional short scenes and interactive dialogue
  • Review my keyword implementation to ensure it’s consistent and useful
  • Perform object testing a la Juhana’s Object Response Tests
  • Alpha testing
  • Revise my writing
  • Test compatibility on various interpreters and platforms
  • Set up Quixe-specific modifications required for proper keywording and exit-lister display
  • Do cover art and a blurb
  • Beta testing and bug fixing

So no, I’m not resting on my laurels having gotten to this point.  If anything, getting this far has only permitted me to lift my head up and see how far away the finish line still is.

Wish me luck — I’m going to need it!  And for all the other authors this year – both returnees and first-timers — I wish you the best of success with your stories!

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: , , ,

Here Goes Nothing

WordPress 3.0 has been out long enough that I’m feeling guardedly optimistic that all the major upgrade issues have been found. So I’m going to upgrade immediately after posting this!

With luck, you won’t notice any differences. I’ll edit this post with my impressions of the new upgrade…

… and yeah, no visible differences in the theme (as it should be) and really not that much different on the admin pages either.  The upgrade was clean and fast; another good rollout by the WP team.

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: ,

Inform 7 Tips — Syntax Options for Action Responses

There are several ways to approach writing complex behavior in Inform 7.  Two common ones are what I’ll call “action oriented” and “subject oriented”.  It might make more sense to use “object oriented”, but that term already has enough associated connotation and confusion.

The “action oriented” style seems to be the one used most consistently in the Inform 7 documentation, and as you would expect it’s very useful and readable.  An example is something like this:

Instead of examining something in the presence of Dan when Dan is bored:
	say "'Quit gawking at the scenery and entertain me!'";

Note that this code applies to the player whenever he or she examines anything.  Although there are additional qualifiers attached that limit the scope of the rule, and we could certainly add more, it fundamentally works as a modifier (or in this case, a replacement) for a single action against a range of possible objects.

But it’s often the case that you want specialized responses for a number of different actions performed in certain circumstances.  You can achieve this using a more “subject oriented” style:

Instead of doing something to the teak table in the presence of Dan when Dan is bored:
	say "'Quit screwing around with the table and entertain me!'";

We now have a rule that makes anything you do — to the table, and the table only — trigger a generic complaint message.

All this is great as far as it goes, but what if we want to get more ambitious yet?  Let’s say Dan mocks you when he’s bored, and you’d like him to have something different to say depending on what you happen to be doing.  How would we express this?

If we went by the book we could make a bunch of “action oriented” rules, arrange them in a rulebook, and run that rulebook when the proper conditions apply.  If we did that, we’d have something that looked like this (code changed due to Andrew Plotkin pointing out that the Report rulebook doesn’t have a generic version):

The block singing rule is not listed in any rulebook.

After doing something in the presence of Dan when Dan is bored:
	consider the mockery rulebook;

A mockery rule when examining:
	say "'Ooooh, look at me!  I'm wasting time looking at something completely irrelevant!'";

A mockery rule when singing:
	say "'Hold on there, pal!  Ryan Seacrest is holding on line one!  He wants you to be the next audition reject on American Idol!'";

etc.

This works, and works well.  In the case where you want to do anything dynamic to the rules on the fly, this is definitely the way to go.

But there’s another syntax that allows expressing these kinds of constructs in a more straightforward manner, particularly if you don’t need the full power of a rulebook.  The Inform 7 documentation hints at this, but doesn’t always give you full examples of the syntax.  Here are the above rules expressed in this other format:

The block singing rule is not listed in any rulebook.

After doing something in the presence of Dan when Dan is bored:
	if examining:
		say "'Ooooh, look at me!  I'm wasting time looking at something completely irrelevant!'";
	otherwise if singing:
		say "'Hold on there, pal!  Ryan Seacrest is holding on line one!  He wants you to be the next audition reject on American Idol!'";

This is good — I like it because it groups together all the special responses when a particular condition obtains — but often we might want to specify an action that can involve multiple nouns.  In that case, you can use the following syntax (if you have a filling action defined):

...
	otherwise if filling something with something:
		say "'You're wasting your time with that...'";

and, of course, you can specify either or both of the nouns as well:

	otherwise if attacking Dan:
		say "He easily dodges.  'C'mon, wimp!  You'll need to do better than that!'";

It would be nice, as long as we’re valuing brevity, to be able to use the “switch/case” syntax for this — something like:

The block singing rule is not listed in any rulebook.

After doing something in the presence of Dan when Dan is bored:
	if the current action is:
		-- examining:
			say "'Ooooh, look at me!  I'm wasting time looking at something completely irrelevant!'";
		-- singing:
			say "'Hold on there, pal!  Ryan Seacrest is holding on line one!  He wants you to be the next audition reject on American Idol!'";

… but I haven’t been able to find a variant of this syntax that works properly.  Perhaps the new version of Inform 7, scheduled to be released today, will allow this.

At any rate, I hope this was useful.  Rulebooks are exceptionally powerful and many times they are the proper solution to your design issues, but don’t underestimate the power of the “subject oriented” approach.  By keeping your related actions in close proximity like this, you can keep your code clean, readable, and well-organized.

Tags: ,

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