Tuesday, November 26, 2013

Impressions of Assassin's Creed 4 (Black Flag)

The last Assassin's Creed game I played was the first one, which I played to boredom (somewhere in Jerusalem, I think). I like the concept of romping through history. The series' biggest impediment to my own enjoyment is that I have no interest in being an assassin, let alone one who wears a goofy hood or has a goofy past-lives wrapper story. So I sat out most of the games.

I picked up Assassin's Creed 4 for the PS4 recently and have put a few hours into it. The ship sailing is new to me. Once I arrived in the first city, though, I was struck by how little had changed in the series. My wife walked in and saw me trying to run away from some guards and instead climbing a wall, turning around and leaping back into the fray. “That looks like an Assassin's Creed game,” she said.

The number of people who have worked on Assassin's Creed games is mind-boggling (in the low thousands, I'm guessing). In all these years, though, they appear to have changed the fluidity of the basic gameplay not one iota. I suppose that once you've committed thousands of lives to a course of action, you become very conservative about changing important things.

There's a “quantity over quality” mentality to the Creed games. The city of Havana is large but very samey-looking. There are great vistas from any of the five identical church towers that you have to climb, but when you're down in the streets there are very few landmarks to work from. The streets are all the same width and are laid out to block sightlines. (I think the intent here is to disguise the miniature nature of the town.) There are no major avenues running through the city. When I'm running through the city I'm following a minimap waypoint, or running blindly.

The gameplay itself is just a whole lot of the same things. I did an hour or two of killing people, pickpocketing, chasing sea shanties (!), opening chests, and picking up shards (i.e. crystals; can't have a game without crystals) before getting very bored.

We'll see if it picks up. I haven't returned to sea yet, and I'm hoping maybe it'll be better out there.

Tuesday, January 22, 2013

King Solomon Designs Windows 8

I bought my home computer at the tail end of the Windows Vista era, and never got around to upgrading it to Windows 7 because operating system upgrades are such a giant waste of time.

Visual Studio Express 2012 doesn't allow itself to be installed on Windows Vista. That, coupled with a day off and the relatively inexpensive upgrade price prompted me to upgrade to Windows 8.

As I was Googling to figure out how to shut the computer down last night I was reminded of the Bible's story of King Solomon's Judgment.

Engraving by Gustave Doré (via Wikipedia)


In the story, two prostitutes had a baby each, one of which died in the night. Due to a midnight baby swap, they both claimed the remaining live baby. Solomon recommended cutting it in half and sharing it between the disputing mothers. The real mother, of course, put the baby's life above her rights and cried out for the king's sword to stop: give the baby to the other mother. Thus was her true love revealed.

In Microsoft's case, we have two warring divisions who each claim their baby is Microsoft's sole offspring. Solomon orders the head to be cut off of one and grafted onto the other. Surely this madness will cause the divisions to put the company's (and babies') interests above their own? Sadly, no. “Truly, thou art wise!” they say, and thus Windows 8 is created.

As John Scalzi says in Punting the Start Screen:
I’ve come to believe the Win 8 start screen, and the whole environment it propagates is just terrible UI for those of us who actually use their computers for work, rather than using them just to play games and get on Facebook.
I have to say this seems like a fair assessment. It's clear that they either didn't try, or didn't care, to make it usable. Which is a shame, because under the bolted-on head of Metro is a decent operating system.

Friday, January 11, 2013

Martha Wells

Over the holidays, among other things I was on a Martha Wells reading binge. So far I've read her Raksura trilogy, City of Bones and The Death of the Necromancer. She is kind of a cross between Leigh Brackett and Ursula Le Guin: truculent heroes kicking ass across anthropologically fascinating worlds.

As usual, I encountered her via her Big Idea essays (here and here) on John Scalzi's site.

First up, her Raksura trilogy, consisting of The Cloud Roads, The Serpent Sea, and The Siren Depths:

These books follow the adventures of Moon, a shape-shifter with two forms: a humanoid form and a winged form capable of flight. Moon's world has a varied collection of sentient species, but he is an orphan and knows no others of his kind.


Moon lives with a human girlfriend in her settlement, hiding his flying Raksura form since it is easily mistaken by the people in his area for that of the predatory Fell. When his secret is discovered he is driven from the village, where he runs into an elder Raksura who takes him under his wing, so to speak. Many adventures follow as Moon tries to establish his place in the world.


It's a good series; I highly recommend it. Ms. Wells obviously loves world-building, and she's really good at constructing alien social arrangements. The Raksura live in tribes with matriarchs (who have male consorts), with various specialized types of workers and warriors. Kind of like a bee hive. But they have recognizable emotions and relationships; it's quite relatable. If you ever read Le Guin's work, especially The Left Hand of Darkness, just imagine that with more fighting.

City of Bones was Wells' second published novel. In it she's constructed a tiered city (much like Tolkien's Minas Tirith) on the edge of a post-apocalyptic wasteland caused by a collision of worlds, of sorts. The main character is a hunter of and dealer in ancient relics, drawn into a conflict between the movers and shakers of the city over some potentially powerful Ancient MacGuffins.

I enjoyed this book very much, too. It's very evocative of place. The MacGuffin and the plot surrounding it are really just an excuse to visit all the interesting corners of the tiered city: the slums, the university, the palace, the surrounding wastes, and so forth. The main characters are likable. One character is described repeatedly as “mad” with very little evidence of said madness; he is really more “crazy cool.” But overall it's a good read.

The final book, The Death of the Necromancer, I read quite some time ago, so I'm working from recollection. It's about your typical gentleman thief (I hear Dashiell Hammett snorting) and his ragtag band. He has a vendetta against someone dastardly, Count of Monte Cristo style, but there are darker supernatural forces at work that draw him inexorably in. I thought it was a good read. It's set in the same universe as another series of Wells' books, although I think it might be in a different era or something.

The book links all have excerpts on them so head over and have a look if any of these sound interesting. Martha Wells deserves a wide audience.

Monday, June 18, 2012

Planet Color Studies

I'm continuing to work on optimal control for rockets. Practical Methods for Optimal Control and Estimation Using Nonlinear Programming looks like a very good book on the subject. I just got a copy, but I found a PDF of it online somewhere that convinced me it was worthwhile.

In the meantime here are a couple of color studies for 2D planets:





Which of the following two options would be better?
  • Always show planet in cross-section
  • Have a foreground layer that fades away when the player is underground

A foreground cap could add to the exploration aspect of the game by hiding underground tunnels. On the other hand I'd have to draw a spherical planet on it or something, which would be tricky to do well.

Sunday, May 13, 2012

How would you write an AI rocket pilot? This is what I've been thinking about for the past few months in my spare time. I've been reading some books and papers about optimal control, and am still learning and collecting my thoughts, and writing code. So this is just a brief update.

A few years back I did some work in this direction. The rocket is treated as a point mass that can instantaneously accelerate in any direction, with a limit on the acceleration. One control problem is: given a starting state (position and velocity) and a desired final state (position and velocity), fly the rocket between the two states in minimum time. (No gravitational acceleration in this simple scenario.)

When I wrote that last page I conjectured that the optimal route would consist of accelerating in one direction for a duration and then (if necessary) accelerating in a second direction for an additional duration. (Flying two parabolic arcs, essentially.) I based this on an attempt to extend the one-dimensional optimal control, which is to accelerate in one direction at maximum for a duration, and then potentially reverse direction and accelerate for an additional duration.

Since reading some optimal control theory I've worked out enough to realize that this is not the optimal control. The optimal control turns out to be to thrust (with maximum acceleration) in the direction of a point that is moving along a straight line. The point is moving through a "control space" and you basically normalize the vector toward it and multiply that by the maximum acceleration to get the acceleration vector. You can see how the one-dimensional case extends to this, but in the two- or three-dimensional case the rocket potentially pivots through a range of directions as it accelerates. The trick, then, is to come up with the equation of motion for the control point that results in the rocket getting from the initial state to the final state.

That's all I have for now; hopefully more to follow.

Sunday, January 22, 2012

iOS: New Orbit

Just ran across this iOS release. It's a brief space game called New Orbit, from a guy in Austria named Markus Hofer. I had a blast playing it for the couple of hours it took to get through it; it's currently priced at a dollar so if you have the appropriate device and like space games do check it out.



Control is straightforward; touch the screen and your rocket will accelerate in that direction. Physics is Newtonian, so there isn't any drag or maximum speed. The missions keep things fairly focused, though, so you don't have huge velocity changes. The rocket displays its current velocity vector and has a trail display. Asteroids exert gravity, so it's possible to enter stable orbit or land. Other space-game staples like mines (both the ore-extraction and munition sorts) make appearances as well. One of the nice interface touches is that off-screen asteroids are indicated with a bar on the edge of the screen. The bar's length represents the asteroid's subtended angle, so it gives you an idea (assuming you know how big the asteroid is, roughly) how far away it is.

New Orbit has the feel of being the tutorial for a much bigger game; a game that isn't made yet, unfortunately. You don't ever acquire weaponry of your own, for instance, and mining equipment is introduced in one mission and then never used again. What's there is quite polished, though.

In contrast to a lot of the 2D space games (like Flatspace or Captain Forever or Escape Velocity) this one's very story-oriented. It takes you through a linear sequence of missions without room for running around. I thought the story was very entertaining: well-written and well-voice-acted (so far as I could hear with the volume turned low); the whole game sounds like it's being acted by Arnold Schwarzenegger and his buddies since it's all read in Austrian accents. I liked that quite a bit, actually.

Hopefully Mr. Hofer and crew will develop further chapters in this game. In the meantime it's still well worth playing.

Tuesday, January 17, 2012

Lead, Follow, or...


(map 'map-leader-test.tga')

(player (pos 17 12))

(torch (pos 19 11) on)
(torch (pos 19 13) on)
(torch (pos 46 34) on)
(torch (pos 54 34) on)
(torch (pos 68 68) on)
(torch (pos 68 76) on)

(lamp (pos 58 51) on)
(lamp (pos 63 51) on)

(leader (patrol (pos 13 12) (pos 49 36) (pos 72 72)))

I've been plodding along on work with ThiefRL. Mostly stuff that didn't add any new gameplay. Pathfinding is a bit faster, for instance. (I cut out a ton of heap allocation during path computation.) A level loads from a combination of a bitmap and a text file now, instead of being compiled into the executable. The bitmap (an enlarged sample shown above) specifies the base ground tiles, and the text file (also shown above) specifies the rest of the objects. It's much easier to lay out a level in a bitmap editor, although I will probably eventually have to break down and write my own level editor to gain additional productivity.

Via Harry Connolly's blog I encountered an essay by author Rachel Aaron: How I Went From Writing 2,000 Words a Day to 10,000 Words a Day. I follow a bunch of writers' blogs because they deal with similar productivity issues to mine. This article has inspired me. The thrust of it is:
  1. Plan what you will do before you do it
  2. Keep productivity records (and examine them for trends)
  3. Find something to be enthused about in each session's work

I've decided the most crucial thing to do right now is to prototype the gameplay elements I'm considering for ThiefRL but haven't yet nailed down. Think of them as the “verbs” of the game. This will enable me to figure out which things will work together which will then enable me to organize a game.

To that end I have put together a leader behavior (aka Call of Duty mode). I'm thinking that, in the early parts of the game, you might have a friendly character lead you around as part of training in how to hide, evade guards, etc. They might also point out the locations of compounds you'll be infiltrating later and give a bit of story about what they are.

The basic behavior is that the AI wants to get to a particular spot but they also want to be close to the player. Being close to the player takes priority, but once they're close enough they will head toward their goal. Once they arrive at their goal the player has to speak to them (by bumping) to trigger the next thing.

Next I'm going to adapt this into a frog-march behavior. The idea is that a guard has hold of the player and is forcing them to walk in a particular direction. It might be tremendously un-fun but I'm going to try it as it represents a possibility for softer failure conditions. It might also work as a movement tutorial in the very beginning of the game.