In the first part of my coverage of the classic Atari arcade game, Centipede, I want to look at the game's characters and how they contribute to the gameplay. The game was created in 1981 by Dona Bailey and Ed Logg. All of the enemies have a fixed point value, given in the table above, except for the spider, whose point value varies. The color of all of Centipede's characters varies from one stage to the next, as the game cycles through its color schemes.
Let's start by looking at the game's title character.
Centipede
The centipede is the heart and soul of the game, both from the visual perspective and from the point of view of the gameplay. A given stage will only end when the player has cleared all of the centipede segments from the screen. The motion of the centipede across the playing field is determined by simple rules that I will lay out in more detail in a subsequent entry, but roughly speaking, it moves horizontally until it hits an obstacle, then moves downward and changes direction.
The centipede is composed of multiple sprites, one for each segment, and each segment is animated with a pair of legs that cycle their horizontal position along the segment. The animation is coordinated such that the legs appear to be moving like a conveyor belt along the length of the centipede. Unfortunately, all of the animations in Centipede are rapid and jumpy (as was common in early arcade games), with new frames appearing every 1/16 seconds, so it's easier to see the character animations when you slow them down.
Internally, the same sprite is used for the head as is used for the body segments, but with a different color scheme.
Things start getting complicated if you shoot one of the centipede segments, because that segment will then turn into a mushroom and any segments that were behind it will become a new centipede.
If you can, it's best to destroy the entire centipede in a single sequence of rapid-fire shots, but failing that, you'll have to manage the pieces individually. As you advance in the stages, an increasing number of individual centipede segments will descend on you in addition to the primary centipede.
Player
In
Centipede, the player has control of an ambiguous sprite that fires bullets vertically. In the context of shooters from this period, it's a typical generic gun-like thing, but it's not clear what it's supposed to be in the context of the game. My first thought was that it looks like a snake's head, but the Atari 2600 port of the game says it's a
elf's magic wand. Whether this also applies to the arcade version is unclear -- the
arcade cabinet manual describes it as a "somewhat humanoid head".
Regardless, there are two things that stand out about the player character in
Centipede compared to other contemporary shooters. First of all, you have a small amount of vertical freedom. The first shoot 'em ups mostly fixed the player along a row at the bottom of the screen, but by the early '80s, developers were increasingly
experimenting with giving the player vertical freedom.
Centipede is an intermediate case, where the game plays initially like a fixed shooter, but when the centipede reaches the bottom, the player can use their vertical freedom to avoid any remaining centipede segments.
The other interesting thing about the Centipede avatar is how quickly it can fire at close range. You're only allowed one bullet on the screen at a time, but when the centipede reaches the bottom, your bullets reach it so quickly that they can cut through an entire centipede in a fraction of a second. You can't make out the individual shots when playing in real time, but fortunately, in an emulator, you can get a frame-by-frame dump of the action:
I had to count to make sure, but all of the bullets are shown. In the animation above, there are twelve shots that hit something, including eight that hit centipede segments (all destroyed) and four that hit a mushroom, which is destroyed by the end.
Spider
The spider is the only opponent in the game that is worth a variable number of points. The points you earn from it will depend on how far away it is when killed, with three possible values: 300, 600, or 900 points.
The spider's role in Centipede is to apply pressure on the player, especially when the centipede is too distant to immediately threaten them. The spider switches irregularly between vertical and diagonal motion, with an apparent random component.
In the early stages of the game, the spider's diagonal motion is one pixel per frame in both x and y. This is 45 degree motion in the game's internal
aspect ratio, but ~50 degrees when squeezed onto the typical 4/3 aspect ratio of an arcade cabinet monitor. Note that the spider never turns around until after it has crossed the playing field. You can take advantage of this fact by staying on its "safe side" in the early going.
In addition to pressuring the player, the spider also serves a maintenance role, removing any mushrooms it passes over:
Whether the spider's cleanup activities are useful to you will depend on the strategy you're employing. If you don't selectively clear the mushroom field, the effects of the spider's cleanup will become noticeable in the late-stage action, as the top half of the playing field will be considerably more crowded than the bottom half.
Flea
The role of the flea is to fill the board with mushrooms. If the bottom fifth of the board is mostly clear, they will drop from the top of the playing field, leaving mushrooms in their wake.
They initially descend at a rate of 2 pixels per frame, crossing the field in about 2 seconds, but will speed up when you reach 60,000 points. It takes two shots to kill a flea, and knocking them out can be a good way to build up points, since knocking one out will often trigger another to immediately fall.
Scorpion
The scorpion never directly interacts with the player, but is arguably the most dangerous enemy in the game. It crosses the playing field horizontally, poisoning every mushroom that it encounters.
A poisoned mushroom is extremely dangerous because any centipede that encounters it will immediately descend to the bottom of the screen. The upside is that the scorpion is worth 1000 points when killed, and it moves fairly slowly, about one pixel per second. Every time it enters, you have about four seconds to destroy before it leaves the playing field.
Grasshopper
There is at least one character in
Centipede that never made it into the final version of the game. If you load up the game in MAME and bring up the
graphics viewer, you can see the bitmap data that's stored in the game's ROM image. The second page of bitmaps contains the 8x16 sprites, four of which are of this character:
According to Ed Logg, the grasshopper was intended to play a role similar to that of the spider. What might that have looked like? To see, I took a clip of gameplay and swapped out the spider sprite with that of a grasshopper (with the same color scheme).
I think the grasshopper sprite actually looks pretty good in this role. One issue, however, is that it would be easy to confuse with the centipede segments in the heat of battle. Perhaps that fact played a role in the decision to excise it from the final game.
In a follow-up entry, I will talk about the detailed mechanics of the game, looking at the rules that govern the centipede's motion and how they interact with changes in the configuration of the mushroom field.
When do you plan the follow up?
ReplyDeleteHah! You caught me napping. I do have some coding done for it, but have been waffling about whether it’s post-worthy. I’ll revisit the subject and hopefully have something in the next few weeks.
DeleteOddly enough, I am interested in doing a Vector version of Centipede. I found your current article already quite informative since I am only a casual Centipede player. Any more details you turn up will certainly go a long way towards re-implementing the core gameplay.
DeleteGreat job. Though I already know the ins and outs of Centipede, I still enjoyed reading through this post. Looking forward to the follow-up. Do you plan on also covering Millipede at some point? I'd be interested in hearing your thoughts on the changes and new elements it introduced.
ReplyDeleteThanks. Not going to commit to a Millipede article yet, but I’ll definitely give it a careful look.
DeleteWow I'm looking to program centipede, just for the fun of IT and your article is great info, looking forward for part 2!
Delete