Tuesday, July 31, 2012

Adventure of the Week: Space Quest V - The Next Mutation (1993)

I've been slowly working my way through this long-running Sierra On-Line 3-D Adventure series, and we're up to Space Quest V: The Next Mutation, published in 1993.

I hadn't played this one before -- somehow I lost track of the Space Quest series around the time of its release, so I'm glad to be coming back to it.  It's not voiced, which surprised me as entries IV and 6 were both given the "talkie" treatment.  The art style is more comic-bookish, with more detailed artwork and lots of facial closeups, though still presented in 320 x 200 256-color VGA.  The standard display font is also smaller, to fit more text onscreen; this one was developed by Dynamix using Sierra's SCI technology, its origins hinted at by coffee cups in the background and the logo for the fictional in-game company Genetix.  It was also not developed by the Two Guys from Andromeda (recently reunited for a new not-exactly-Space Quest project, thanks to Kickstarter) -- only Mark Crowe worked on this game.

I always encourage interested readers to play these games before reading my commentary, because in the interest of documenting this one, I will have no qualms about describing the plot and puzzles in detail.  This one's easy to track down, as it's still available as a retail package, and half the fun of adventuring is discovering things for oneself.  Be advised that beyond this point there lie...

***** SPACE SPOILERS! *****

The game continues a longstanding Space Quest tradition by opening with a Star Trek-inspired credits sequence, borrowing the musical style from the classic TV series.  Fleet Admiral Roger Wilco is investigating the disappearance of several ships in an uncharted region of space known as the "Menudo Triangle."  He is haunted by memories of meeting his son in the future (in Space Quest XII as portrayed in Space Quest IV), and the image of Roger's beautiful future/past wife, Beatrice.  A full CD-ROM production is sorely missed here, as the parody is weakened by the lack of voiceover -- the intro is mostly text, in the form of a captain's log entry that... borrows... rather heavily from Star Trek.

Suddenly, Admiral Wilco's ship is under attack!  And... then...

His reverie is broken by Captain Quirk, who admonishes Cadet Wilco for using the bridge simulator without permission as lights come up on Wilco's current struggles to get through the Academy.  The training sim, following another series tradition, looks a lot like the Millennium Falcon.

The school's holomap isn't working at the moment, so Roger has to walk around the facility to see what's going on.  Ambassador Beatrice Wankmeister is visiting the school, and we can see her ship docked outside through a viewport -- hmmm, wasn't that Roger's future wife's name?

In the central rotunda, the Starcon crest looks like it could use a good scrubbing.  But we weren't allowed to muck about in the janitor's closet earlier.  There are some areas requiring Security Clearance Alpha, which Roger clearly does not have.  (And one of the sentries is clearly playing Missile Command!)  One viewport window has a used ship for sale by good old Fester Blats.

Entering a classroom, Roger learns that the Starcon Aptitude Test is being given today, and of course, he is unprepared.  It's multiple-choice, fortunately, and we can guess at some of the correct answers (and there's also no requirement that we do well on the test, as will become clear later.)  But Roger was late for class, so he has to scrub the Starcon Crest, and can now access the janitor closet.  Its contents spill out, of course; Roger can grab the Scrub-O-Matic and some Safety Cones.  We can set the cones out and then maneuver Roger around to scrub the floor using the mouse -- when it's been thoroughly cleaned, Captain Quirk and Ambassador Wankmeister arrive.

Beatrice is aware of Roger's work on the Sarien Encounter, and he finds her beautiful, of course.  Then Quirk slips on the freshly-scrubbed floor -- he loses his toupee in the process, the embarrassment earning Roger Double Secret Probation, in yet another pop culture nod to National Lampoon's Animal House.

A creature invades the school's computer systems just as Roger's SAT is being graded.  There are apparently Sludge Bandits dumping toxic waste all over the galaxy, and Ambassador Wankmeister seeks the academy's help.  She is none too impressed with Roger at this point, despite his record, having seen him doing menial labor, so if they're ever going to hook up Roger is going to have to climb a few rungs in her estimation.

Thanks to the computer glitch, Roger has "earned" a perfect score on his SAT.  He undergoes intensive captain's training before receiving his first, eminently suitable assignment -- piloting a garbage scow named the Eureka.  Captain Wilco has two people on his bridge crew, aliens named Flo and Droole... and hey!  This game actually has conversation options, a true rarity for Sierra's adventures and always a help when it comes to character development.  We can learn something about Roger's crew, but not very much.  Droole is close to retirement and just wants to finish out his unsuccessful career in peace.  Flo has issues with male authority figures.  There's also a Scotty-esque engineer named Cliffy who hangs out in the engine room and lab areas, trying to keep the aging ship running.


Roger can't access the ship's computer systems himself, and must rely on his semi-loyal crew.  The docking bay doors appear to be closed, so our first order of business should be to get them open.  Ah -- there's a conversation icon AND a command icon, which allows Roger to issue orders to his crew.  Hailing Starcon via Flo provides our initial orders, to pick up refuse in three sectors.

We need to reference the manual (provided in PDF form with the most recent release) to get the navigation codes for the three sectors in question -- Peeyu, Kiz Urazgubi and (I think) Gangularis.  Yes, we can confirm our orders with Flo by asking her for Status.  As we leave the academy, a ship materializes, bearing a female version of the Terminator droid who pursued Roger in Space Quest III.

I always enjoy naturalistic (if simple in this case) learning exercises in adventure games.  We figure out that we have to drop from lite speed to normal speed before we can orbit a planet, and then activitate the ship's refuse collection beam.  Except it seems we have arrived at Gingivitis, not Gangularis? Ahem... this would be because I input the wrong code number.

Of course, we pick up the trash, and then our systems detect a life form in the waste containment system.  It's a face-hugger -- but a cute little one that Roger decides to name Spike, and keep as a pet onboard the ship.  It starts burning holes in the deck with its highly acidic waste, making Cliffy none too happy, so we will need to fix that if Spike is going to stick around.

The ship's science lab-slash-transporter room has a Habitube lifeform container; it's not portable, though, so we'll probably have to bring little Spike back here.  Fortunately, the creature wanders in before we can leave the room, allows Roger to pick him up without injuring him, and is now gurgling happily in the Habitube.  Unfortunately, he likes to break out -- Roger indicates that we need to calm him down somehow, but we're not permitted to put him in the nearby cryogenic chamber.

We can borrow some useful items from Cliffy's toolbox -- antacid tablets, a laser cutting torch, a hole punch and a high-voltage circuit fuse.  Other items can be examined, but not taken.  Maybe feeding Spike antacid will help him settle down?  Yes -- though we can't use the tablets directly with Spike or in the empty tank, we have to put him in first and then add the antacid.

With that problem contained, we're off to Peeyu to continue our trash collection duties.  Here, we accidentally intercept suspicious communications between colorfully-named, unidentified entities -- MAGGOT TO DUNG HEEP, COME IN DUNG HEEP -- communicating via US Sprint.  (Apparently the company had a product placement arrangement with Sierra, as it has now been mentioned twice -- though it's not a great fit, as the contemporary, non-satirical reference tends to pull us out of the Space Quest universe.)  Flo says the message came in on an official Starcon frequency, but was moving around quickly; the transmission itself hinted that Captain Quirk might have been involved.

Nothing else seems to be afoot, so we can pick up the local trash and then head off to Kiz Urazgubi.  And here, our troubles begin -- a tractor beam locks in, a photon torpedo hits the Eureka, and our weapons systems are inoperative.  Yep, the Gippazoid Novelty Company is still pursuing Roger -- the earlier robot failed, but this new WD-40 terminatrix is determined to take Roger as prisoner, or blow up his ship.

So it's time to beam down, under duress.  We can't bring Spike along -- if we try, Roger puts him back before energizing the transporter beam, so we won't be able to attack the robot with acid.  We see the Terminatrix' ship land, then she turns it invisible and flies off in search of Roger.  She arrives shortly near the lagoon where Roger has materialized.  We have to keep him moving, ducking her shots by traveling through some conveniently-placed caves and looking for an opportunity to dispose of her.  The area covers several screens of caves and outcroppings, and this is an interesting puzzle, as there are quite a few almost-possible solutions to explore.

It seems like we're supposed to use the laser torch to cut the tree she's standing on when it seems like Roger has nowhere to run in one area, but it's not possible to get close enough to do that before she zaps Roger.  Some fruit hangs slightly out of reach -- can we somehow swing across?  Ah, if we go back around the way we came, we can hide inside the log -- with Roger's eyes peering out from a presumably strategically valuable hiding spot.  Further east is a narrow plateau, but it doesn't seem like we can get to the top -- the WD-40 android shows up and knocks Roger to his doom.  We can also stand on top of the log, with equally fatal results at the moment.

This is a pretty complex puzzle -- I needed a walkthrough to suggest that we can take some of the hanging banana-like fruit, but only a very specific set of them.  And we have to intentionally walk out on a thin limb, breaking it and falling into the pool where we started (none of the feared threats that prevented Roger from entering the pool earlier manifest.)  With the resulting stick, we can knock the almost-reachable cluster of fruit around, causing it to swing close enough for Roger to grab it (with good timing.)

Now can we set up a good slip-and-fall situation for the robot?  No, but we can climb up above a cave where a loose boulder (nicely camouflaged against the background) is perched, and wait for WD-40 to show up below.  This takes some patience, and I did lots of waiting around, until I realized that I'm supposed to knock the boulder across the gap and into the cave while she is climbing up, not down on her head after she gets up top.

This knocks her cloaking system out, which may help, and now we can hide in the log and use the banana on her... but she flies off before anything happens?  We earn some points, but nothing seems to be happening -- Roger can't even exit the log.  Apparently I just missed the timing as far as the animation was concerned -- she flew back in, and this time flew back up and exploded.  (Apparently using the fruit on WD-40 causes Roger to put the fruit in her exhaust system, rather than making her take a fall -- a limitation of the point-and-click, parserless style adopted in the later Sierra games.)  Now Roger is safe, and can collect her head as a trophy.

To beam back up, can we go to the plateau?  No, we need to return to the original site in order for the transporter to get a good fix.  Ah -- the android's cloaked ship is still here.  Cliffy arrives to collect the pieces of WD-40.  He starts reassembling it, and for some reason Roger is happy to give him the head; I would have assumed the last thing he wants is a reanimated Terminatrix, but we'll see what happens.  Cliffy gives Roger a leftover part of indeterminate purpose in exchange.

Our work is done for the time being, so we can take the crew to the Space Bar for a little relaxation.  Cliffy goes off to visit an old friend at the bar, while Flo and Droole hang out chatting.  The Nova Station Space Bar is a domed part of the space station, with a giant lava lamp in the center.  There's a new ScumSoft game called "Battle Cruiser" in the bar, but it doesn't seem like we can play it right now.  There are security officers barring access to a more interesting area to the east (and borrowing from Douglas Adams' Hitchhiker's Guide to the Galaxy, as we are informed that one of them likes to read his awful poetry to his prisoners.)

We can sit at the table with our crew -- we have to use the WALK icon, not the HAND icon, which threw me off for a bit.  A robotic waiting machine takes orders and delivers drinks.  A con man approaches -- Nelo Jones, Merchant of Venus and dealer in artifacts (and a Trouble with Tribbles homage.)  He gives Roger some dehydrated space monkeys (a la Sea Monkeys) and a coupon.

Then Quirk shows up to taunt Roger, and challenge him to a game of Battle Cruiser, so we will be doing something with that.  It's essentially Battleship in space, with three layers of depth to the playfield; we can shoot torpedoes in the traditional style, and use a limited number of probes which reveal more of the surrounding area.  The AI isn't great - it often tends to re-fire at areas it's already checked -- but it still takes some time and luck to beat Quirk.

After the game, we find a drunken Cliffy in the middle of a fistfight, as a result of which he gets thrown into the brig.  Conferring with the crew again, Flo confirms that the alien sitting with Quirk when we entered looks like the MAGGOT alien on the transmission we intercepted earlier.  Our immediate concern is to liberate Cliffy.  A warning on the Space Monkeys package suggests that it should not be mixed with alcohol, so let's see what happens if we do that...

The monkeys run rampant, and when the guards run to investigate we can turn off the force field and use Spike's acidic properties to free Cliffy from his cell. Everyone escapes, and we receive orders to go to Klorox II.  But before we do, maybe we should see if we can do something with the cloaked WD-40 ship back on K.U.  Cliffy has WD-40 herself up and running; we beam down right by the ship, and can use the "extra" piece of WD-40 Cliffy gave Roger to access the invisible ship's elevator.  We are warned that it's heavily secured, and I managed to get Roger zapped by approaching the controls.  A panel on the cloaking device housing presents a puzzle -- if we can open it, that may be all we need to do here.  We can't use any tools on it -- I got the latches open, but wasn't able to free the device after I could see it on the first try.  I had to reference a walkthrough on this one -- it's a matter of turning the dials and opening the locks in a certain sequence.  I had tried all the binary combinations of the four dials without unlocking anything.

Cliffy gets to work installing the cloaking device, and now we can head off to Klorox II as ordered.  There's no waste beacon here, so we can ask Flo to hail the planet to see what's going on.  We receive no response, so we hail Starcon -- but the line is busy and there are literally billions of callers ahead of us, so it's time for Roger to take command.  Hailing a ship raises the Goliath, Quirk's ship, but he doesn't have any helpful ideas.  So all we can do is beam down and check it out ourselves, casting Roger in the role of unlikely hero yet again.

Prior to beaming down, we can check in with Engineering from the bridge -- Cliffy indicates that the refurbished WD40 is now acting as the ship's science officer.  She says the surface atmosphere is breathable, and also recommends sending an away team down.  Droole seems anxious to accompany Roger surfaceside.  (And Roger is wearing a red shirt, a matter of some concern.)

It appears that the former residents of the colony left in a hurry.  Exploring the greenhouse, Roger is attacked by a bloated, disfigured man who spits in his face, creating a similar effect on Roger and ending the game.  We have to dodge Roger's head back and forth to avoid the deadly loogies, long enough for Droole to show up and shoot the man.  Before he dies, his mutated face returns to normal, and he says something about bad soup and a path over the ridge, which Roger can't make sense of.

The computer in the greenhouse requires an access code, which fortunately happens to be on a scrap of paper dropped by the mutant man upon his entrance.  A log kept by the colony administrator mentions strange events -- a survey team disappeared, then there was a mutant attack -- and informs us that the colony's facilities have been sealed using the administrator's personal passcodes, and that the local escape shuttle was stolen by the mutant surveyors, who retain an understanding of technology.  This suggests that they are still out there somewhere, and Roger will probably have to go clean up this mess.

East of the colony, a soup can is lodged on a rock above Roger's viewpoint, unreachable.  Returning to the ship, we pick up a faint emergency transmission.  Quirk's ship, the Goliath, is under attack!  Flo thinks the transmission came from the Thrakus system.  A "meanwhile" sequence shows the Goliath's crew being mutated, including Quirk.  When we arrive, the Goliath is nowhere in sight, but an escape pod beacon is picked up on the surface, which WD-40 reports is highly toxic.  A button on the engineering bay wall (that's easier to use with the hand icon than it is to "see" with the eye icon) provides access to the pod bay, where we can pick up an oxygen tank and a rebreather mask.  We have to use the controls here to reopen the elevator door, and can see that these might also be useful should we need to take the ship's repair pod out for a spin.

Beaming down to the planet... whoops, it would help if we put the respiration mask on before beaming down... brings us to the escape pod's crash site.  It's time for a few Star Wars references, as the pod looks just like the one crashed on Tatooine, and Roger's mask sounds like Darth Vader's labored breathing.  The pod's occupant has escaped, and might be Beatrice judging from the outfit left behind.  Trying to explore to the west leads to Roger being attacked by Bea, who thinks he's a mutant, and our heroes end up hanging from a giant mushroom over a deep gorge.

Roger needs to help Bea climb back up; I tried to extend the stick and her coat, to no avail; if she dies, then Roger has no son, ergo no rescuing Roger in SQ IV, ergo no Roger in SQ V.  I had a hard time getting this to re-trigger after a restore, then realized I had saved my game before visiting the pod; this event won't happen until we've done that.  We can use the coat to help Beatrice up, and she throws Roger a vine -- and then before we can beam up, we are surrounded by mutants and fatally covered in mutagen slime.  We have to request a beam-up from Cliffy before we climb up, then as soon as we're in the clear we get taken up to the ship, and Roger and Bea get to have a moment.

She is dying from exposure to the mutagen, but the process can be slowed down by putting her in the cryo-chamber.  And she stole the mutants' warp distributor cap to slow them down, indicating that she may be a very suitable companion for Roger.  Whoops -- I used the cryogenic chamber's microwave oven-style control panel to put her in cooldown mode for too long, and made a Beasicle out of her.  32 seconds is too long; so is 5; 10 does the trick.

Now we need to find a cure.  Except we're under attack by the Goliath, under the command of the mutated Captain Quirk!  We need to raise our shields, and duck into an asteroid field; we escape, but now Cliffy has to take a spacewalk to make repairs to the Eureka's exterior.  He succeeds, but gets knocked into space, so now Roger has to take the EVA out himself to rescue Cliffy.  This requires mastery of the pod's piloting and claw mechanism, and we have to finish before we run out of oxygen and fuel.  Fortunately there's a tractor beam to bring us back in once we have grabbed our crewman.

Where to now?  Maybe we can find some more clues on Klorox II.  The soup can is still unreachable... but aha, we can go around the other side of the screen to reach it.  The can of Primordial Soup mentions the Genetix Research Corporation in sector G6, code 41666. 

Returning to the ship, we observe WD-40 seems to be breaking down a bit, as her circuits are reportedly functioning "perfectly... perfectly... perfectly..."  That may not bode well.  Droole has a variety of funny little habits we can see when we return to the bridge and he's not working -- playing a portable videogame, reading MAD magazine, bouncing a ball-and-paddle around -- but he always returns his focus to the job at hand.

Whoops -- after beaming down to the Genetix facility, Roger's gone through a classic The Fly hybridization and is now reduced to buzzing about with wings and a fly's head.  This means Roger's brain is now in control of a fly, while his body hangs out, even more clueless than usual.  As a fly, we're not heavy enough to use the communicator, which at least has conveniently landed on the ground in an open position.  We can't seem to summon fellow flies from a nearby dumpster for help.  We can, however fly through an electronic key card lock where nine laser beams are visible.  They're not fatal to a fly, so maybe we can walk around to block the right beams to open the lock; but we can only block one at a time.  Fortunately, we can just walk through the lock into the facility.

Inside, we find a computer terminal, indicating that the dome has been jettisoned. Are we too late?  Using our tiny body on the touchscreen, we can reset the system and check the logs and other data.  Only Dome 3 appears to be online.  We can look around the building using the security cameras, and see Fly Wilco dumpster diving -- sigh -- and, more helpfully, Cliffy and WD-40 beaming down to assist.

The logs indicate that the last user at this workstation was playing Astro Chicken 3: Henhouse of Doom, but we never get to play it here.  We also learn that an intruder led to the emergency evacuation.  Domes 1 and 2 were apparently launched and detonated, but Dome 3's system was halted.  There's also a log indicating that the Primordial Soup was meant as a biological terraforming product, establishing the foundation of a food and atmosphere chain on otherwise uninhabitable planets.  A bacterium, caseus vellox, was selected and bombarded with radiation to verify its viability.  But the rodents used for testing became piles of goo with deadly teeth, one bit a lab researcher, and the rest is unfortunately familiar recent history.

Heh -- the Genetix Accounting department lists expenditures for 120 GB SCSI drives at $2955 each.  No longer science fiction, that, though prices have come down tremendously!  The ledger also shows a bribe to one Raemes T. Quirk for 50,000 buckazoids.  Hmmmm.  The next page shows additional bribes to Quirk, so something is clearly up.

Leaving the lab, we try to approach Cliffy -- who slaps fly Roger to death without a second thought.  Restoring, we can fly near the water to get a frog to jump onto the communicator, reaching Flo.  She relays a message to Cliffy, telling him that Roger is a fly at present.  WD-40 goes off to scan the perimeter while we show Cliffy where the rest of our body was last seen, so he can reconstitute Roger using the transporter beam.

Restored to normality, Roger mistakenly tells Cliffy about all the neat technology available in the lab, and the curious engineer resolves to break in and see what's there.  Drat!  We can use the hole punch on the plastic card we got at the Spacebar, but we need to have figured out the pattern for unlocking the mechanism while we were a fly inside the lock.  Back to an earlier save we go... at least, if we screw up the pattern, the game kindly resets the puzzle and lets us try again; I did in fact screw up, by punching where I should have blocked and vice-versa on my first try.

Entering the lab, while Cliffy oddly remains outside standing guard, Roger can access some liquid nitrogen canisters.  The research reports indicate that cooling can inhibit the mutagen, so we should try to take these along.  Returning to the ship, we see an excited Spike jumping on the cryo chamber and then on the transporter, and in the great Lassie tradition, somehow Roger picks up that "We should initiate a manual control bypass to reverse the phase polarity of the interface grid and then use the transporter to reintegrate Beatrice's DNA molecules?"  Cliffy thinks it just might work.  But just picking Beatrice up is a bad idea -- her frozen body shatters in Roger's hands.  A quick defrost for 10 seconds puts her back into portable condition, and then Roger tucks her back into the cryo unit to recover at room temperature (and stay out of the way to keep the story tidy for the moment.)

WD-40 recommends mounting a surprise attack against the still-menacing Goliath by using the EVA pod to cut a hole in her hull.  She thinks we can cure some of the mutants onboard using the transporter to help out.  So where's the Goliath?  Asking WD-40 to "SCAN FOR SHIPS" from the bridge suggests the Gingivitis sector.  We have the cloaking device working now, so putting the shields up and the cloak on seems like a good plan.

Once we have the cloak on, we suddenly arrive near the Goliath, and Cliffy asks us to come to Engineering to see something.  He brings up an image of the enemy ship -- a small section fore of the rear engines is the least populated, offering the best chance to sneak aboard.  Once we dock at the appropriate area, we can use the laser torch from Cliffy's toolbox to burn our way in.  Except it seems to have disappeared from inventory?  Ah, the inventory window is scrollable -- some items are just at the bottom of the display.  Whew!

Having cut our way in at the right spot, we must avoid roaming mutant guards.  A nearby panel allows us to confirm that the ship's warp drive is offline, thanks to earlier quick thinking by Ambassador Wankmeister.  We can earn some points by putting the warp distributor cap back in place -- but do we want to do this?  There doesn't seem to be any reason not to, but these games have a way of revealing the consequences of our actions too late for us to do anything about them.

We can duck under some grating in the deck to enter a maze of tunnels, making our way to an elevator shaft where the moving elevators soon turn Roger into a flattened mess.  The rest of the maze doesn't offer much, except for a Pac-Man cameo.  We have to use the elevator shaft to climb up from level 8, shifting in and out of shafts to avoid it.  The maze is not too confusing -- most dead ends are fairly clear, and we don't have to waste a lot of time crawling around.  Level 7 is devoid of interesting areas, but we can use the shaft to continue up to Level 6.  It's been a while since I've had to use a sheet of graph paper for a Sierra game, so this whole process was rather enjoyable.  Level 6 leads us back into the shaft, where we can now climb up to level 4.  From here, once we return to the shaft from another directoin we can move up to Level 1.  But this level is dead too.  At least the maps make geographical sense, there are no weird connections to deal with.

So is there something to do on Level 2?  Yes -- at last we arrive at a differentiated room, with a switch of some kind on the wall.  Ah, it's the fabled Shield Deactivation Switch!  It's a simple switch too:

Suddenly, Roger is pulled out of the passage to face Quirk and his mutoid henchmen.  WD-40 shows up in the nick of time and immobilizes them all with her torso-mounted freeze ray cannons:

Cliffy has the ship's transporter set up for an attempted rescue of Quirk's crew -- all we have to do is hide out of sight so they all get confused and stand on the platform.  Once they're in place, Roger gives a verbal signal to Cliffy, and Quirk's crew are normal humans again.  But Quirk was not among them, so we will have to deal with him directly.  (Animation timing is important in this puzzle -- if any of the crew members are not actually on the platform, then Roger is toast.)

We return to the Goliath's bridge to see Quirk escaping in a shuttle -- and landing in a huge blob of mutant goo expelled as a byproduct of the crew's rescue.  We have to make a choice -- beam over to the Eureka, zap the blob with the Goliath's phasers, or ride it out.  Riding it out does not pan out.  And there isn't time to figure out the Goliath's phaser system.

So we'll need to abandon the Goliath and beam back to the Eureka to figure something out there.  We can lower shields and fire at the blob to get it off the Goliath.  No evasive action is possible, but we can use the garbage scow's vacuum capability to trap the Quirk mass.  Now we set the Eureka's self-destruct timer and make a run for it -- being sure to free Beatrice and avoid the blob's tendrils snaking out of the waste containment system.  Droole and Flo have fortunately already evacuated to the Goliath, but the transporter equipment is no longer functional.

Can Roger and Beatrice both fit in the Eureka's EVA?  No, it's still docked against the other ship.  Ack!  And I almost forgot to take Spike!  Opening the garbage container doesn't seem to be a good idea.  Using the air lock downstairs might help, but it draws Roger out too.  We still have a fuse in inventory, can we repair the transporter?  Ah, there's a service tunnel in the causeway.  But which one is bad? The rightmost, back fuse runs the life support system, apparently -- oops.  Trial and error isn't working well, but we can determine which fuse is which by reading the circuit diagram.

With the fuse replaced, Bea beams over -- good, it's tested -- Roger grabs Spike and beams to the Goliath, assuming command of the more powerful ship with Beatrice Wankmeister by his side, as the Eureka explodes and the credits roll.

The credits confirm that some pre-rendered 3-D sprites were created, handy for solid object animation, and the effective music was composed by Christopher Stevens and Tim Clarke.  There are no voice cast credits, of course; we note that US Sprint paid for promotional consideration, if we hadn't already figured that out.

Scorewise, I missed quite a few points -- I didn't cheat on the SAT, I lost some points for losing ships playing Battle Cruiser, and I didn't announce that we should abandon ship at the end, I just set the self-destruct mechanism and let the crew figure it out for themselves.  But all the things I really care about, I managed to do.

We have just one more official Sierra Space Quest game to go, though there are a few fan games, and of course the Two Guys from Andromeda's upcoming spiritual sequel SpaceVenture.  We'll no doubt cover Space Quest 6 in due course.

Monday, July 30, 2012

Kickstarter Adventures 07/30/2012

Once in a while, roughly once a month so far, I'm taking a look at what's going on at Kickstarter in the realm of adventure games.  This genre, long thought commercially dead, seems to be getting a new lease on life, thanks to fans willing to commit money up front, even with no guarantee of an eventual release.

One item I had missed was that the recent Wadjet Eye Games release, Resonance, some five years in the making, sought some Kickstarter funding of its own back in 2009.  At the time it was a seriously independent project, and requested a mere $150 in funding to cover incidental "real" costs like contest entry fees, ultimately receiving over $2000 from enthusiastic supporters for an original plan that did not include voice acting and was shooting for a possible 2010 release.  I wonder if everyone who pledged finally got their promised free copy via Wadjet Eye this year?  I'm pretty sure Dave Gilbert's indie adventure company made good on creator Vince Twelve's original promise, but haven't been able to confirm it -- but the game has been very well received, so I think this one can be chalked up in the "victory" column even if the bulk of its funding didn't come from Kickstarter.

I'm slightly disappointed but also kind of reassured that a couple of projects didn't get funded; some discretion on the part of Kickstarter supporters helps ensure that more of the funded projects will succeed and that a "gold rush" mentality won't destroy the long-term viability of this approach.  HeXit, a Hungarian adventure project with an interesting Heavy Metal-esque art style, didn't make its funding goal, reaching only about 1/3 of what it needed.  But the team promises to work on development anyway, on a longer, self-funded schedule.  The Sam Suede in Undercover Exposure project, somewhat controversial due to Al Lowe's former-but-not-current involvement, failed to reach its goal -- and its listing has apparently been pulled from Kickstarter (in a fit of developer pique?) so there's no way to see where it ended up, though it's still advertised as a coming project at Wisecrack Games' website.

There were also some recent successes.  Both Quest for Infamy and Reincarnation: The Root of All Evil are funded, and both seem deserving of their modest budget goals.  Currently, Jack Houston and the Necronauts is at around 87% of its goal, with 10 days to go; I hope this one makes it, it's an ambitious and non-spoofy sci-fi adventure with a retro pulp art style that I'd really like to play someday. 

We've seen no substantial news on the major Kickstarter-funded projects from Double Fine, the Two Guys from Andromeda, or Jane Jensen just yet; it's not surprising, all of these are early in the process and won't have anything polished to show off for a while.  But with most of the major players and established talents seemingly working on something, it's good to see a few new small-scale projects in the ring.  Detective Grimoire is a stylishly animated cartoon detective story -- it has exploration elements, but seems to be more of a puzzle-solving game than a traditional point-and-click adventure, and it looks like it will reach its funding goal.  Something called OURFIRG is not faring so well -- it's clearly inspired by LOOM, but its presentation to date doesn't inspire much confidence; the artwork is limited, and the environments seem bare and generically textured.  Judging from the trailers, the game involves more running around than actual adventuring.

We'll continue to catch up with these projects once in a while here.

Sunday, July 29, 2012

Cover to Cover: Jaguar EGM Promo (pp. 10-11)

Our current cover-to-cover series continues, from the 1994 Jaguar ad insert in Electronic Gaming Monthly magazine.  We see almost all of the limited Jag software lineup on parade, as Atari tries to convince gamers to buy its 64-bit console.

Page 10 features three of the Jaguar's less successful titles:

Checkered Flag was a competent racer with untextured polygon graphics, meant as a true 3-D upgrade of the Pole Position-style title by the same name on the Atari Lynx handheld; it ran smoothly enough, but the action never really became very intense.  Dragon: The Bruce Lee Story, under license based on the reasonably decent biopic about the famous action star, has very little to do with Lee's actual life and more to do with pitting him against various cheesy enemies in one-on-one fighting action.  Hover Strike began life as a Battlezone update -- its graphics were more heavily textured than most Jaguar titles, but the frame rate was uneven and gameplay was clunky; I did play through the whole game back in the day, but pack-in title Cybermorph did something similar, better.

By the time we get to page 11, we're down to several launch titles, as aging warehouse stock is employed to provide a free "bonus" title to entice new Jaguar owners:

Raiden was a solid conversion of the classic vertical scrolling shoot-'em-up -- the only problem was that the game was already several years old when this version was released, and while it was a step above Xevious it wasn't much to look at in the bullet-hell era.  Dino Dudes was a competent little puzzle game with entertaining cartoon graphics -- it played well enough for me to own and finish it at the time, but felt like an Amiga/PC conversion and took no real advantage of Atari's hardware.  And the less said about Trevor McFur in the Crescent Galaxy, the better -- it showed off the Jaguar's 24-bit color depth to good advantage, but felt like a Photoshop tutorial gone mad, with cut-and-pasted sprite enemies attacking with little style or sense of design.

There's still more to come!

Friday, July 27, 2012

Have At Ye, Online Jerks!

A lot of my readers are older gamers, or younger gamers with an interest in gaming history, so I wanted to share something I ran across this week, because I think we're exactly the sort of people who should be helping out with this.

Game industry figure Ernest W. Adams wrote a worthwhile article about online gaming, the social problems associated with it, and what might be done about it here.  It was originally written for Gamasutra's Designer's Notebook series, but wasn't ultimately published there, so the good folks at the freethought blog Butterflies & Wheels ran it in its intended form a few days back.

I don't do a lot of online gaming, and when I do, it's almost always with friends.  If I create a match, most of the time it will be a private session with invited players, for exactly the sorts of reasons Adams cites.  But after reading his thoughts on the sorry state of the online gaming "community," I think I have a social duty to participate and fight the problem instead of avoiding it.  I'm going to do more online gaming, and be more vocal with my disapproval when people act like immature jerks.

I encourage other grownups to do the same.  And by "grownups," I mean that if you're twelve, but can carry on a proper conversation in-game, without invoking epithets, name-calling and accusations of cheating, and take your losses and victories like a decent human being... you count.  Moreso than a lot of of the technically-qualified "adults" out there.

It's not just a matter of etiquette -- it's a matter of encouraging participation from everyone in our favorite hobby.  Excelsior!

Thursday, July 26, 2012

The LoadDown -- 07/26/2012

The slow summer game season continues, and there's plenty of news about this year's general slump in video game sales.  Are the sales slumping, or is the market just shifting more and more to online, beyond the reach of the standard retail analyses?  It's a little bit quiet here too this week -- here's what's new on the semi-underground distribution circuit!

Wii Virtual Console -- Another SNK Neo*Geo fighting game arrives for your comprehensive collection: WORLD HEROES PERFECT, pitting stereotypes of all nations against each other in deadly combat.  I've played the original World Heroes, and that's probably enough for me, though this version is a little more cartoony, with bug-eyed "impact" reactions that give it a different feel from most of the many Neo*Geo fighters.

DSiWare -- This platform is still active, in part because these games can also be played on the 3DS in 2-D, though the screen ratios can be a little funky due to differences in the hardware.  This week brings us Dot Runner: Complete Edition, which is a strange first-person concept that borrows heavily from Pac-Man; I'm not sure the main 3-D display is nearly as useful as the overhead 2-D display on the bottom screen when it comes to actual gameplay.  Decathlon 2012 is also on the wirte, clearly inspired by classics like Activision's Decathlon and Konami's Track & Field; the stylus controls may actually be an improvement, or at least, as the promo copy says, "this time you don’t have to worry about breaking your joystick."  Burn!

3DS eShop -- Quite a bit here, as usual.  Nintendo's 8-Bit Summer celebration continues with the emulated Game Boy classic, Wario Land: Super Mario Land 3.  There's also Planet Crashers, an action-RPG with an emphasis on one-on-one combat, and Mole Mania, another 8-Bit Summer title that calls Sokoban and Pengo to mind.

XBox Live Arcade -- One new game arrives, called Wreckateer (no relation to the similarly-pronounced Japanese indie game Recettear).  It provides Kinect-based controls as the player aims a massive ballista to destroy goblin-infested castles.  C'mon, you know you've always fantasized about being the Orcin' Man.

PS3 on PSN -- Two new titles arrive.  Foosball 2012 is a digital version of the old tabletop soccer game with players mounted on rods.  I'm not sure why this seemed like a good candidate for the digital age, but I imagine it requires a lot less hunting for the ball after it flies across the rec room and into the dog's water dish.  Malicious is a stylish action/combat game with hordes of enemies, a "vessel" mechanic granting varying abilities, and a damage model based on the presence of the character's limbs.  "I'll bite yer legs off!"

Notable on PC/Mac -- The Steam Summer Sale has ended.  But at least that means Wadjet Eye Games' new point-and-click adventure, Resonance, is now available on Steam after a considerable delay.  And Borderlands 2 is now up for pre-order.

Wednesday, July 25, 2012

Let's Make Us A Game II-3: Scalability and Optimization

In my last update, I lied -- before we get into the graphical aspects of our simple Tic-Tac-Toe Bastard game, I decided that I want to revisit some basic gameplay issues we've encountered along the way.

One limitation I noted last week is that playing tic-tac-toe on a 3 x 3 grid is not necessarily very challenging or unpredictable; it's not very hard to play the computer to a draw, even on its highest difficulty setting, unless we get distracted by our own planning and miss the computer's drive to victory.  So, in an effort to reach a point where the computer's thoroughness might exceed the player's ability to keep track of all the details, I'd like to expand the model beyond the 3 x 3 standard, establishing a variable-driven approach that allows 4 x 4 or 5 x 5 play... basically any N x N matrix that memory will allow.

This wasn't hard to do -- the toughest part was writing a function to populate the POSSIBLE_WINS matrix dynamically, for any square matrix, instead of relying on the hardcoded 3 x 3 set I defined by hand in previous versions.  This was just a matter of getting my loop indices organized correctly.  With a few other hardcoded 3 and 9 values replaced with proper variable references, our existing code now functions for any matrix size we care to specify.

But there's a predictable cost --  with a larger matrix, the AI routine is slowing down significantly, because it has so many more possible sequences of play to consider.  A little benchmarking produces these results on my three-year-old laptop, for the computer's first move after the player has moved (later moves become faster as there are fewer new possibilities to consider with a more populated matrix):

Matrix Size    Difficulty    Time (s)       Moves Considered

3 x 3             9                1.058           59,704
4 x 4             5                8.577           396,075
4 x 4             6                86.974         3,999,675
5 x 5             4                7.881           267,744
5 x 5             5                158.515       5,368,224

I got tired of waiting for even a 4 x 4 grid on difficulty 9, and this is enough data to provide food for thought.

What this suggests it that the brute-force, full-recursion approach is acceptable for a standard Tic-Tac-Toe matrix, but that the possibilities also become too much for the computer to handle efficiently as the matrix gets larger.  We could probably speed this up by coding the AI routine in C, the language in which Lua itself is implemented.  But that's just pushing the problem down a level -- it will still get bogged down with suitably large matrices and look-ahead limits.  What we need to do is further optimize the approach.

First, let's consider whether deeper lookahead is even really buying us any improvement in the computer's play.  Does it really make better choices given a difficulty of 9, or would it make approximately the same choice with less detailed consideration?  To test this, I'll start with a 3 x 3 matrix and see which move the computer makes, ignoring the actual scoring mechanism underneath.  I will always pick square 1 as the human player, and fix things so that I always go first.

3 x 3 - difficulty 1 - CPU picks square 3 after .001 seconds, and lets me win easily by not noticing my diagonal in progress
3 x 3 - difficulty 2 - CPU picks square 3 after .002 seconds, blocks my diagonal but allows me to win
3 x 3 - difficulty 3 - CPU picks square 4 after .006 seconds, blocks diagonal but still allows me to win
3 x 3 - difficulty 4 - CPU picks square 2 after .056 seconds, blocks diagonal but still allows me to win
3 x 3 - difficulty 5 - CPU picks square 5 after 0.216 seconds, and fights me to a draw
3 x 3 - difficulty 6 - CPU picks square 5 after 0.452 seconds, and fights me to a draw
3 x 3 - difficulty 7 - CPU picks square 5 after 0.775 seconds, and fights me to a draw
3 x 3 - difficulty 8 - CPU picks square 5 after 0.997 seconds, and fights me to a draw
3 x 3 - difficulty 9 - CPU picks square 5 after 0.968 seconds, and fights me to a draw

This indicates that beyond lookahead 5 with a 3 x 3 matrix, there may not be a practical improvement in the computer's first-move play; it just spends more time coming to the same conclusion.  (It also indicates that, as we suspected, in a 9-element matrix with one square filled in, levels 8 and 9 do very much the same thing because there's no 9th lookahead possible.)  I see similar results with a 4 x 4 matrix and a 5 x 5 matrix -- the computer doesn't necessarily benefit from further consideration of its options, and in fact it starts making pretty good choices as soon as I get to difficulty/lookahead 2, where its decision-making is at least non-random.  (Just for fun, I examined a 2 x 2 matrix and discovered that whoever goes first always wins, so that's not an interesting configuration for our purposes.)

What does this mean?  It suggests that a little bit of look-ahead may be enough to present a credible approach to AI play, and that Tic-Tac-Toe may not be complex enough to merit a full, deep analysis.  It also suggests, to my surprise, that with a larger matrix there may be less value to looking ahead more deeply -- more of the available possibilities present the same likelihood of winning, so we may be able to save some time by recognizing this and tailoring our maximum lookahead to match our empirical observations.

A second issue to consider is suggested by the sheer numbers we're looking at -- playing with a 3 x 3 matrix on difficulty 9 considers 59,704 moves.  But if we think about this, there are really only 3 to the 8th power possible grid configurations remaining after the player has made the first move: 3 possible values for each square -- empty, player, or CPU -- and 8 remaining empty squares, for a total of 6,561 possible setups.  And there are impossible combinations in that set as well, because the players take turns -- we would never see a board where the player has marked 7 squares and the CPU has marked only 2.  So considering every possible sequence of play may be causing our algorithm to do a lot of redundant scoring of the same grid layout, arrived at by different sequences of moves.

Trading memory for speed and vice-versa is a classic optimization technique; in this case, we should see whether retaining scores for board configurations already examined allows us to avoid re-scoring the same state more than once.  Adding a global scoredGrids table allows us to do this; we'll translate each grid definition into a base-3 decimal number; if we already have an entry in the scoredGrids table for this index, we know we've already examined it and needn't rerun the recursive scoring operation, we can just return the score we came up with the first time we examined that particular configuration.  Lua's table operation really helps us out here because it is very efficient -- we don't have to define empty table slots for moves we won't actually be considering, so we aren't wasting memory that way (though this approach will consume a fair amount of memory.)

With this memory retention in place, let's see how this affects our benchmark results.  There will probably be some overhead from the additional table handling, but we should see an overall drop in the number of moves considered... 

Whoops.  There was a filing problem with my initial implementation -- the score matrix was storing results for both player and CPU activity, so we were getting distortion in the AI and it wasn't playing very well.  We want to use the results specific to CPU moves, so I added some casing logic to distinguish CPU from player moves.  With everything working, let's see how these numbers compare to our original benchmarks.... hmmmm.  These numbers look a lot better than they did earlier, except something else is wrong with the AI.  I'm getting bad play from the CPU on some matrix sizes and some skill levels.  There's still a bug of some sort afoot!

Here's the problem -- the stored score for a given configuration is not necessarily valid later in the game, because of the variability due to the lookahead setting.  The initial approximate scores may be fine for making a first move, but they misrepresent the likelihood of victory later in the game, misleading the CPU's play as it continues to respond to outdated information.  If the lookahead is set to a level that does a full recursion during the first exchange, then this isn't a problem, because the initial calculations cover all future possibilities; that's why my 3 x 3 play at difficulty 9 still worked as expected.  But in many other cases, our code is now making bad assumptions later in the game based on its initial ideas about how best to proceed; it's not really responding properly to the evolving game.

That's easy to fix, though -- our real goal for the reuse is to apply within a given move; while this error did appear to save us some time later in the game, reusing those old results from earlier analysis is a bad idea.  So we'll just clear out the stored scores each time we start a new move. And now we see that we're doing less evaluation -- about half as much -- but still playing just as well.
Matrix Size    Difficulty    Time (s)       Moves Considered

3 x 3             9                0.924           32,387
4 x 4             5                4.662           65,745
4 x 4             6                43.283         496,175

5 x 5             4                4.799           76,4765 x 5             5                76.604         692,784

Still, some of these timings are uncomfortably long for a player to wait.  So we'll also check the behavior at our theoretical minimum lookahead values -- play still looks good, and the performance is looking pretty solid too.  We'll take advantage of this to keep our engine running efficiently -- nobody should object to these wait times:

3 x 3             5                0.114           2445
4 x 4             2                0.011           225
5 x 5             2                0.034           576

So the only remaining mystery is, why is 3 x 3 play not very successful with a lookahead of 2?   I think the answer is that in a 3 x 3 matrix, the player who goes first has a certain advantage, especially if the CPU is not looking all the way ahead to the endgame.  It's similar to the 2 x 2 case -- victory can come suddenly, especially if the CPU is blind to the possibility of more than one victory condition turning up at the same moment.  In the larger matrices, using a short look-ahead to be agile about blocking a player's impending victory is sufficient to play to a draw, or to win if the player gets distracted.  I think we can conclude that the 3 x 3 game board is actually more interesting from a strategic standpoint, which may be why it has endured as the Tic-Tac-Toe standard despite many misguided efforts -- like mine -- to "improve" the gameplay.

Now, I think we're finally ready to move on with a graphical representation of our game!

The latest source code is below the fold:

Tuesday, July 24, 2012

Adventure of the Week: Journey to the Center of the Earth (1978)

I'm a little bit busy this week, so for the sake of tight deadlines, we're tackling another Greg Hassett adventure for the TRS-80 -- Journey to the Center of the Earth, published in 1978, which I believe is his second published game after Enchanted Island.  No publisher is credited, but it's likely this one was released by Mad Hatter Software or Hassett's own Adventure World; it was also published in type-in form in 1981, in Bob Liddil's Captain 80 Book of BASIC Adventures, and also appeared on the Commodore 64 a few years later.

Hassett's style was still developing -- he was only twelve or thirteen years old at the time -- and so we see that spelling and grammar are again an issue, and the map is rather loosely and randomly constructed.  If we die, the program just ends; there's no opportunity to retry.  And the BASIC-language parser is surprisingly fast, but limited -- for instance, INV and INVENT don't work, we must spell out INVENTORY, and some words are very situation-specific, requiring a fair amount of guessing.  The name borrows from Jules Verne's classic novel, but like Hassett's later The House of Seven Gables, the game is a treasure hunt that borrows the basic concept but otherwise bears no substantial resemblance to the book.

I always urge interested readers to try these games out before proceeding here; Journey to the Center of the Earth is not a particularly difficult game to finish, though the map is fairly large and it's not always obvious which items are score-worthy treasures and which are just items.  As usual, I will be giving away most of the puzzle and plot details as I encountered them, so as you proceed beyond this point, be advised there are...

***** SPOILERS AHEAD! *****

The game begins by prompting "WHAT IS YOUR NAME?"  -- I went with GUYBRUSH -- but I never saw the game make use of this information; it seems to be an unfinished idea, and does not appear in Hassett's other games.  I can only speculate that this is here to confuse the player with a later "WHO GOES THERE?" puzzle -- our entry here is not useful as a password.

We begin in a ship with nothing in inventory, apparently arriving at the center of the Earth rather woefully undersupplied.  This adventure won't be too serious in tone, as the ship's computer screen reads: SHIP WILL NOT FUNCTION -- FRIBULATING GONKULATOR IS BURNED OUT.  So presumably we will to have to get it refribulated so it can gonkulate, or gonkulate it for the sake of fribulation.

North of the ship, we suddenly find ourselves in a COBBLESTONE HALLWAY, with a chirping that reportedly SOUNDS LIKE BUGS.  Further north is a room with rubies in its walls, and there's a LARGE RUBY we can take.   But GADZOOKS!!! A GAINT [sic] BUG JUST WALKED IN TO KILL ME!  Hassett's early games never felt bad about telegraphing a creature's intentions... and whoops, maybe I'm misunderstanding and that's not a misspelling, as shortly I'M BEING DEVOURED BY A GAINT BUG!!  And then I'M DYING...DYING...DEAD, in rather an overdramatic (not to say impossibly uttered) manner.

So we don't want to run into any Gaint Bugs, at least not yet.  But they show up randomly, and all over the place, so we're going to have to figure out a solution before too long.

Over to the west is A ROOM WITH MANY ANIMALS... until WAIT! THEY'VE ALL RAN [sic] AWAY.  All that remains is A PARROT IN A CAGE.  We can't GET CAGE or OPEN CAGE, as it's not a recognized noun, but we can GET PARROT and the cage comes along.

South of the ship is a DUSTY PLACE containing A SET OF KEYS.  Past this, as the topography becomes increasingly random, we find A HUGE ICE CAVERN, leading to A ROOM WITH TRACES OF SLIME ON THE FLOORS AND WALLS.

The slime room leads to AL'S DINER, apparently of unlicensed Happy Days fame, where there's a COKE MACHINE, joyfully and explicitly unlicensed with an ENJOY COCA-COLA banner.  Presumably we will need a quarter to avail ourselves of its carbonated bounty.  There's also some FOOD here.  I never found a need to eat or drink in-game, though the game will let us imbibe and consume these, or try to feed various creatures.

South of the slime room is the source of the slime - the HYDRA ROOM, occupied by a nine-headed hydra.  It blocks our way south and west, but we can explore a TORTURE CHAMBER to the east (where THERE IS [sic] SOME HUMAN SKELETONS and a giant bug asleep.)  Trying to KILL BUG indicates that I CAN'T KILL ANYTHING. I'M TOO WEAK. BUT MAYBE IF YOU WERE A BIT MORE SPECIFIC... though this actually a lie, as the game will let us KILL things in the right context.

The HUGE PIT west of the slime room contains a quarter and a cigarette lighter.  We can't BUY COKE, but we can INSERT QUARTER to get a bottle back at Al's Diner.  We can't SHAKE COKE or SPRAY COKE or even OPEN COKE, so that's not going to be a novel attack.

A SMALL ROOM west of our starting point contains a GOLD NUGGET, and a scribbling reading HAR HAR HAR! YOU'LL NEVER MAKE IT! >> ARBADAC ARBA.  A 35,000 CARAT DIAMOND (could a human being actually lift that? We can carry it, anyway) lies in a low crawl space south of this room, and going east from that room leads into the traditional MAZE OF TWISTY LITTLE PASSAGES a la the classic Colossal Cave Adventure.  The maze contains a MAGIC WAND.

One exit from the maze leads back to the ruby room -- and with no giant bug about at the moment, we can go north to find ourselves IN A DARK ROOM.  And I THINK I HEAR GRUNTS AND GROANS NEARBY.  Ahem... I never found out what this was referring to, and that's probably a good thing.  East of this area is another maze.

North of the dark room is the SOUTH SIDE OF A CHASM, and a SHINY SWORD, with molten lava below.   The game keeps us from walking blithely into the molten lava, but we will probably want to find a way across.

We seem to score 10 or 15 points per treasure, out of a maximum of 175, but they do vary.  We have to drop them in the ship to earn points, otherwise we remain at 0 with a BOY, YOU STINK! assessment from Mr. Hassett.

Hassett's mazes are usually pretty straightforward -- each room generally has multiple exits that lead back to the same place, with one that goes to a new area and one (usually) that goes back to a previous one, so they are not hard to map using the traditional item-drop method.

The "secret passage" maze leads to THE TROLL'S PALACE, with gold bars and a diamond necklace. With 5 treasures claimed, I have 80 of 175 points.  I am hoping the sword will help deal with the hydra or any giant bugs I encounter, but in a dark room where THERE ARE GIANT [sc!] BUGS ALL AROUND ME! we still can't KILL them, though at least we can just exit the room without being harassed or killed.

Ah, yes, when a giant bug arrives specifically to kill us, we can use the sword to KILL BUG -- DING! DONG! THE BUG IS DEAD, THE BUG IS DEAD!!!  Several of the author's works contained Wizard of Oz references.

How can we cross the lava chasm?  POUR COKE and OPEN COKE and THROW BOTTLE don't do anything -- not that I should have realistically expected a cold soda to cool down molten lava.  But we can WAVE WAND to magically transport ourselves to the north side of the chasm.  It leads to a wooden platform and a sign warning us about the rickety wooden bridge, but we can ignore the sign and travel to the TROLL'S PLACE. (Which turns out -- [sic] -- to be the Troll's Palace again, but by a different entrance and with more resistance from the resident troll, who throws an axe at us if we try to enter without dealing with him.)

The axe-throwing troll is another homage to the classic Crowther/Woods adventure, but his axe is consistently fatal, so we don't want this to happen.  We can't answer the Troll's "WHO DARES TO ENTER MY PALACE???", it seems, nor can we KILL TROLL or exit the room without being killed by his axe.  So is this a red herring?  Are we just supposed to get into the palace via the maze?

What about the hydra?  We can FEED HYDRA, which turns him into A GIANT HYDRA RUBBING HIS STOMACH, but he still won't let us past.  HELP is actually helpful here, suggesting CIGAR? CIGARETTE? TIPPARILLO [sic]?  We can't USE LIGHTER or LIGHT LIGHTER, but we can BURN HYDRA and THE HYDRA CRUMBLES TO THE GROUND DEAD.  With this surprisingly flammable creature dispatched, we can get an emerald from the CLAM ROOM and a MING VASE from the DRAGON ROOM.  We've got 7 treasures and 105 points now.

Past the Dragon Room, we can get some silver bars in a MAMMOTH GARDEN.  The VELVET ROOM contains some tools (not described further and treated as a set).  There's a TREASURE ROOM where MANY DWARVES GUARD SOME PRETTY SCRAWNY TREASURE that's not further described and cannot be obtained, and an ARABIAN ROOM with an oil slick, in a bit of 1970s pop culture xenostereotyping.  But we can't BURN SLICK, as oddly enough IT DOESN'T BURN.

The oil slick is meant to be a hint leading us south to MAC'S EARTHDIGGER BODY SHOP, which contains a new fribulating gronkulator!  This is a little clearer now -- we are near the center of the earth because our "ship" is a digging contraption of some kind.  But we can't GET FRIBULATING GONKULATOR because the parser doesn't recognize any variant of it???  We have tools, so maybe we can FIX FROBULATING GONKULATOR... but I CAN'T.   Oh, wait, I have been mistyping, calling it a GRONKULATOR [mic] instead of a GONKULATOR!  We can GET GONKULATOR.

Now can we install it in the ship?  We can't REPLACE or INSTALL it; if we try to FIX it here, the parser says I THINK I HAVE TO DROP IT FIRST, but DROP GONKULATOR doesn't work?  Ack, I keep typing GRONKULATOR!

And as soon as we DROP and then FIX GONKULATOR, the game is over!?!  I am 5 points short, though, with 170 of the 175 points, so let's see what I've missed.

Aha!  If we return to the dangerous TROLL'S PALACE entrance with the parrot in hand, the parrot chants, "SIR ALEXANDER...SIR ALEXANDER!"  But SAY SIR ALEXANDER doesn't solve the problem?  A simple SIR ALEXANDER works, and THE TROLL SCURRIES AWAY IN FEAR without tossing an axe in our direction.  But this is just another way into the Troll's Palace, where we have already been, and we don't get any points for doing it. 

I had to look at the BASIC code to see that DROP PARROT at the climax counts as a 5-point treasure, earning us the rank of ADVENTURER GRANDMASTER:

Hooray!  We're the Adventurer Grandmaster of Adventurerdom!

I'm getting close to exhausting Mr. Hassett's sizeable body of work, but there are still a couple of his games I haven't tackled.  We'll get around to them in due course, I am sure; somehow I missed the existence of his games back in the TRS-80 era, so I've been enjoying discovering them, three decades later.

Monday, July 23, 2012

Let's Make Us A Game II-2: The AI Opponent

The rudiments of Tic-Tac-Toe Bastard are developing nicely.  My goals in this installment are to implement some basic UI elements, and try to get the artificial intelligence opponent working.  I'm sticking to text mode for now -- it's faster to play and debug, and once the core of the game is functioning we can start dressing it up with graphics, sound and a mouse interface.

The latest version of the code, below the fold, adds a couple of general gameplay features:

-- As the game starts up, the human player is allowed to select a difficulty level from 1 to 9 via the keyboard.  In the final version, this will be replaced with a GUI (graphical user interface) slider labeled more abstractly from "EASY" to "HARD" that can be changed on the fly (I think).  While the values from 1-9 will affect our AI algorithm directly, there aren't necessarily any visible differences between levels 3 and 4 or 8 and 9, so I'm cheating a bit here, using this approach to hide those sloppy details from the user.

-- There's also a simulated coin flip at the start of the game to determine who goes first; this has an impact on how the game plays out, so I want to make sure neither side has an unfair advantage.  I just use the results to reorder the PLAYERS array, and then the game proceeds as usual.  I did run into one technical glitch here -- every coin-flip was always coming up as a 1, even though I am seeding the pseudorandom number generator based on the system time!  It turns out that the math.randomseed() and math.random() functions are not initially very random on some platforms, the PC included; calling the math.random() function a second time produces the intended result.

To get the coin flip to work as expected, I had to fix a bug in the main game loop.  There were places it was using the bare index i instead of the PLAYERS[i] identification, which caused some confusion about who was who.  I also added some utility functions to represent the current player ID as a string -- "P" and "C" for our text-mode grid display, and "PLAYER" and "COMPUTER" for other uses, like the GAME OVER message.  This was more readable than the sequential identifiers "1" and "2", especially after I added the coin flip, and while this logic won't survive the text-mode phase of development, similar code will ensure that our graphical identifiers are correct later on. 

Almost all of my initial design elements are defined now, but I have not yet added a general tally for a series of Player vs. CPU matches -- the main game loop accommodates a single match only.  But that won't be hard to fix later -- we'll just have to wrap this game loop inside a larger loop.  Right now I'm interested in debugging the basic structure of the game.

Adding support for the human player's input was not difficult -- similar to the difficulty handler at startup, we just need a routine that prompts the user for a cell number from 1 to 9, and checks to make sure that A) the input is a valid number and B) that cell is not already occupied.  I'm being lazy here -- if either test fails, the user is given the same "That square is already occupied" message.  And I'm not going to correct this, because when we move into graphical, mouse-oriented mode, we simply won't allow the user to click on a square that's already occupied, and there's no way for the user to click on a nonexistent or invalid square.  An updated version of this routine will always return a valid square.

Getting the computer AI opponent working was more of a struggle than I expected.  The fact is that Tic-Tac-Toe on a 3 x 3 grid is not a very sophisticated strategic challenge, and two players can easily fight each other to a draw.  But human beings think intuitively, and computers have to create the appearance of intuition by using math and logic.  Tic-Tac-Toe is very simple compared to chess or even checkers, but I wanted to use similar principles to develop a routine that worked honestly, without using a lot of heuristic shortcuts.  I wanted the routine to be extensible to more complex challenges, like a 5 x 5 grid, and I wanted it to play naturally, determining its moves on the fly and ideally a little bit unpredictably.

This was my initial AI concept -- when it's the computer's turn, I want it to:

-- Look at each empty square on the grid, and calculate a "win probability" score for that square
-- Pick randomly from the possible moves with the highest (same) score

Getting the scoreMove function that calculates the "win probability" working was the tricky part.  I was able to create a hypothetical "next state" of the grid including the new move under consideration, and then reuse my checkVictory function from our previous installment to handle the obvious case -- if a particular move wins the game, then it should be assigned the highest possible score.  This worked immediately -- I let the computer pick randomly (and played poorly myself) until the CPU saw an opening, at which point it would successfully make the winning move.  So far, so good.

Dealing with non-final situations allowed Tic-Tac-Toe Bastard to earn its name as far as my efforts were concerned.  What I intended to do was to recurse over possible present and future moves to come up with a probabilistic score -- in other words, consider how the game could play out if a particular move was made, and then the player made one of the available next moves, and then the computer made the next available move, ending up with a higher score for the move presently at hand based on its likelihood of leading to eventual victory.  This is the classical approach to solving these kinds of problems -- the computer "looks ahead" at all possible sequences, and chooses the move that's most likely to help it win.  This takes some time and has historically been the primary obstacle to really smart AI chess play -- even for a simple game like 3 x 3 Tic-Tac-Toe, there are more than 50,000 possible sequences to consider after the first move is made.

Before I could find out if my basic approach was working, I had to resolve a couple of issues I hadn't considered.  One fix was to add a check to see if the grid is full before proceeding with deeper hypothetical iterations -- I was getting strange errors and invalid scores deep in the analysis, because the system was trying to consider a move when none were available.  This also sped up the algorithm by stopping it when it could no longer do anything useful, and pointed me to a good way to handle the difficulty setting:  the algorithm intentionally stops looking farther into the future if it's already gone through a certain number of levels.  Lowering the look-ahead to 1 essentially makes its moves random, while setting it to 8 or 9 allows it to consider all possible outcomes (depending on who goes first.)  I also added logic in the main game loop to see if the grid has filled up and the players have battled to a draw, so the game can end neatly if nobody wins.

I also made one heuristic compromise.  I realized that if the computer wins the coin flip and goes first, it might as well pick a square totally at random -- letting it consider all 9 possibilities takes considerable CPU time and always comes up with identical scores for each square.  Adding that shortcut sped up the first step (and ultimately obviated any visible difficulty difference between levels 8 and 9, and 7-9 are also the same if the player goes first.)

But my algorithm still wasn't working -- the computer still wasn't making very good choices.  What I was trying to do was calculate the probability of a win by building up a score, adding a portion of the next move's predicted score to reflect the growing uncertainty of each future state, as we can't predict what the player will do.  (Using the computer's algorithm for this prediction suggests that the player will play the same way, which is unlikely but the best available option.)  I was getting scores back from the scoreMove function, but they weren't proving very useful.

So I stepped back and considered this basic scenario for debugging -- if the player marks the upper left-hand corner, marked with a P below, then the computer should see that it has two moves which are least likely to be helpful to its cause, marked with 0, because they don't block the player's potential winning sequences at all:

P |    |
   |    | 0
   | 0 |

Whatever the score assigned (I realized that a true "probability" was not really necessary or possible, I just needed a means of ranking the possible moves), those two squares should be assigned the lowest score -- they don't block the player at all.  Similar patterns should be apparent if we mark any of the four corners.

With this simple check at hand, I found out that my approach was picking the worst moves as the best moves -- in effect, pushing the player toward victory by blocking off the moves that were least likely to help him or her win!  The problem was that, in considering what the player might do after the CPU made a move, I was starting from zero and adding to the potential score, treating the player win as an improvement.  So the recursion code was working, it was just not acting in the CPU's best interest; it had become very good at helping the player win.

So I changed the logic to start the score at a value of 8 (my "this move wins" value being 16, and "impossible moves" left at 0) and then subtract half the score calculated for the other player's next possible move.  The math here isn't precise -- I could have used any sub-1.0 multiplier to reflect future uncertainty as we look deeper, and with 0.5 sometimes the numbers go negative.  But the ranking still works -- now I was seeing the weakest scores for the two useless moves, and the computer is now putting up a proper fight if we let it look ahead to the maximum.  Even better, if we use a low difficulty setting, it has less information to work with because it doesn't look as far ahead, and therefore it makes poorer but still rational choices; it's a clean way to limit its "intellect", though I may try to rescale the difficulty values for more accuracy now that I know more about how it's actually working.

The final test was to have my wife play a few rounds -- she beat it handily on easy, and played to a draw on the harder difficulty settings.  It never beat her, though she was impressed that it was making smart moves, so I think I've accomplished what I wanted to.  This does, however, suggest that I should try to make the engine more flexible, so I can up the ante to make this more like a playable game -- a 5 x 5 or 7 x 7 grid should put up more of a challenge for a human player, while my existing algorithm will be slowed down (and may need to have limited look-ahead to keep performance reasonable) but should still be effective.

Next time, I plan to start wiring in some graphics.  The latest code is below the fold:

Sunday, July 22, 2012

Cover to Cover: Jaguar EGM Promo (pp. 8-9)

We're paging through Atari's 1994 promo insert for the company's Jaguar console, published with an issue of Electronic Gaming Monthly magazine.

Page 8 features the Jaguar's most indelible exclusive -- Jeff Minter's Tempest 2000, a throbbing techno reimagining of the classic Atari coin-op designed by Dave Theurer.  Minter reportedly didn't have access to an actual Tempest machine during the game's development, so he was going on memory, but the resulting game remains technically impressive and highly playable, with an excellent soundtrack.  It was hard to promote this kind of experience in a print ad -- still shots tend to look bare and simplistic -- but Atari did its best:

Page 9 gets us past the big titles and into the second-tier games, with half-pages devoted to id's Wolfenstein 3D and the freewheeling polygonal racer Club Drive.  I confess to playing through the Jaguar version of Wolfenstein 3D before I ever went back and played through the PC version, and it's actually quite a bit different from the original, with different levels and some additional weaponry, though the basic technology remains the same.  id intended this port as a test before tackling DOOM, but Atari was impressed (and desperate for software) enough to urge release of Wolfenstein 3D as well.

Club Drive was meant to be a 3-D Micro Machines sort of game, with a style reminiscent of Atari Games' Hard Drivin', but the game was not well received by critics or players.  The untextured polygon graphics were already starting to look outdated, and the engine didn't use the complicated Jaguar hardware very efficiently.  As a result, the game was sluggish, with imprecise controls, and the handful of imaginative racing environments were not enough to make it playable or successful.

Next weekend, we'll continue...

Friday, July 20, 2012

East Vs. West: Magical Saurus Tour (1990)

One of the more unusual PC Engine titles to make it from Japan to the United States, Magical Saurus Tour (known here as Magical Dinosaur Tour) was published in 1990 by Victor Musical Industries on the console's original 1.0 CD-ROM System Card.  I had a copy of the American version back in the day, but no longer own it, so I will have to go on memories and research for comparison purposes.  The Japanese title screen calls the Toho kaiju movies to mind -- if you don't speak Japanese, you can easily imagine this says something about King Ghidorah:

This was a surprising choice for NEC to import, although the company did make a lot of strange decisions when it came to populating the US TurboGrafx library; the rich, high-quality Japanese PC Engine software lineup was barely in evidence on our shores.  Magical Saurus Tour seems an especially odd choice, however, because of the amount of translation and voice-over recording the localization required (no word on whether the Beatles had to approve the title.)  My only hypothesis is that NEC felt the expensive CD-ROM accessory might be an easier sell if there was some educational content available.

By the standards of the day, Magical Saurus Tour does a pretty good job at delivering on the cover's English-text promise: "A NEW PICTORIAL ENCYCLOPEDIA OF DINOSAURS."  It's a CD-ROM encyclopedia, of the sort usually devoted to anime fandom, and it's pretty comprehensive.  While the text could have used substantial fleshing out, this was designed to be read on a TV screen with a gamepad; the primary attraction may be the full-color artwork, most of which matches the best scientific anatomical modeling available at the time.  And it's not limited to the obvious, well-known saurians of later Jurassic Park fame; it takes the task seriously, covering more obscure creatures like Metriorhyncus:

And Archaeopteryx, the first known dinosaur-bird species (probably a relative but not a direct ancestor of modern birds; more recent finds are indicating that feathers were much more common than believed in 1990):

And Deinonychus, a member of the raptor family:

My only complaint about Magical Dinosaur Tour was the limited text -- we only get a few screens of large-print text, though the Japanese version likely crams more content into the limited space (if I could read it!)

These individual dinosaur pages can be accessed by a number of pathways, lending significant organizational value to the encyclopedia.  There's an alphabetic index, of course, as well as an evolutionary timeline tree, allowing users to see how various families of dinosaurs changed over geologic time:

There's also a time-shifting geographical map, showing the regions of the earth as portions of the Earth's original single continent moved (borne by the tectonic plates of the Earth's crust) into its modern configuration, and allowing the user to examine the dinosaurs that inhabited each region:

And a sightseeing tour allows users to view the dinos in approximations of their contemporary habitats, with some limited animation depicting hypothetical behaviors derived from anatomy and observations of similar creatures in our time.  These hard-headed little guys are battling for dominance:

There are also some entertaining bits of trivia, like a "Best of Three" awards ceremony (Biggest Dinosaur? Tyrannosaurus!) and other notes with fanciful illustrations:

The science is respected, and so are users, as then-current uncertainties are documented in these sections --- my own knowledge had become outdated in 1990, and I remember learning about the whole "Brontosaurus" mix-up from the American version.  (In short, an Apatosaurus had had a reconstructed, semi-hypothetical head stuck on it for a museum display; further analysis established that this was in error, and both skeletons represented the Apatosaur.)

There a poignant end-of-the-dinosaurs section that presents various hypotheses about the demise of the thunder lizards, and the subsequent rise of the mammals, as depicted in this asteroid-induced winter image:

Magical Saurus Tour isn't a game, but a high-tech reference work circa the pre-Internet era.  I can't really recommend it in either its Japanese or American forms for a 2012 audience; the information presented is too limited in the age of Wikipedia and Walking with Dinosaurs.  But it was a credible attempt to document our understanding of these fascinating creatures circa the late 1980s, and remains a unique entry in the PC Engine/TurboGrafx-CD library.

This one wasn't a huge seller in the US, but is also not much in demand so it's generally inexpensive.  You may be able to purchase the Japanese version here:

 Magical Saurus Tour PC-Engine CD

or the American one here: