Centipede is a classic video game created by AtariCorp in 1981. http://www.arcademachine.com/core/gamedata/shockwave/S0051.gif It's similar to SpaceInvaders, in which the player pilots a ship that fires up in a straight line, and essentially destroy anything on the screen that moves. The ship may move in any direction, to anywhere within the bottom third of the playfield. The entire playfield is scattered with mushrooms. Here are the things you can shoot. *Centipedes - consist of one or more attached segments which move horizontally through the playfield, moving one tile vertically when they hit the side of the screen, or a mushroom. Shoot a segment, and it will turn into a mushroom. If a centipede is split in half in this fashion, the segment behind the shot will form a head and you'll have two smaller centipedes to contend with. *Mushrooms - harmless to the touch, but take several shots to destroy. The player and centipedes can't move through them. *Poison mushrooms - These don't kill anything. But, when a centipede hits a poison mushroom, they go straight down until they hit the bottom of the screen. *Spiders - they come in from the side and scurry around the bottom half of the screen really fast, making wibbledy-wibbledy sounds. *Scorpions - they crawl through the top half of the screen and change mushrooms into poison mushrooms. *Fleas - they occasionally drop through the screen, leaving a trail of mushrooms. The rate at which fleas appear is dependent on the number of mushrooms on the screen. (Less Mushrooms = More Fleas.) This is one of those games that has been ported to just about every game system, personal computer, operating system, and keychain game case out there. It can even be found on some of those touch-screen LonelyGuyMachines they have in bars, though the touch-screen interface isn't as nice as the original trackball. It was also remade and rereleased by Hasbro, kind of like FroggerGame was. It is also said to be one of those games that appeals equally to men and women, like PacMan and TetrisGame. ---- Pretty good ShockWave implementation: http://www.arcademachine.com/go/shockwave/preview/S0051.tam or http://www.tripletsrus.com/80s/80s_games/centipede.htm or http://www.planetgameroom.com/planetgameroom/shockwave/centipede.asp Related Java games: http://www.arcadepod.com/games/searchgame.asp?search=centipede&submit=Search+Games&sc=g-shoot.asp ''(Detailed in the following list.)'' * '''Apparently out of business:''' "Mission Bugs" -- http://www.centerfleet.com/games/bugs/index.html -- ''Very nicely done; creative graphics and sound!'' * Centipedo -- http://www.freefungames.com/applets/centipedo/open.shtml and a number of other locations -- ''Also good. Nice icons.'' * "Bug Buster" -- http://www.smiliegames.com/bugbuster/ -- ''Also very nice: Creative "circuit" background and interesting music. Keyboard controls are OK.'' * Jasper - ZX Spectrum Emulator -- http://www.spectrum.lovely.net/Centipede.html ''(Too fast. Bad keyboard controls.)'' ---- '''Example of a Centipede Game''' This page was originally created in response to a request for ideas for a learning-to-program project. '''Warning: The original page (BoyThisStuffMakesMeFeelStupid) was about learning OO principles... This implementation is not.''' If you are a Windows kinda person, download this: http://www.btinternet.com/~daniel_earwicker/daniel/centipede.zip It contains centipede.exe. Run it and you will get the idea! Hint: click anywhere on the window to fire from that location. I haven't implemented a proper sprite for the player. I just borrowed the mouse pointer. There is currently no way for the player to lose a life, but it's oddly satisfying to zap stuff anyway. It uses standard Windows API stuff, no Direct X. The sprites are just 32x32 icons. It's a little flickery, but it doesn't seem to get any slower on my P3 500, however long the centipede gets! I also payed no attention to those optimization ideas I mentioned below. In fact I didn't consider how to make it fast at any point. There's no need, these days... it's a shame really! Instead, I went for choices that would tend to make it correct first time, instead of risky stuff. I've included the source in that zip, so if you have Visual C++ 6.0 then you can compile it and add features (scoring? spiders? a proper player sprite?) Most of the files in there was wizard generated and haven't been changed. To turn it into a centipede game, only the ChildView.h and ChildView.cpp files were modified. I should add some comments! Else how is anyone supposed to learn from it? Also some kind of discussion of how I decided to put which things in which classes. So far all I've done is just hack together the working program for the fun of it. Maybe someone would like to write some unit tests for it? Not that there are any bugs in it, of course. :) ---- '''Optimization in Text Mode''' Strictly speaking, I don't necessarily mean ''text mode''. I mean what you might call cell mode, where all sprites have the same size (e.g. 16x16 pixels) and they are always positioned in a cell somewhere in a rectangular grid (so in 640x480 resolution, the grid would be 40x30 cells. Anyway, this means that when you draw a centipede... oooooooo ... moving along by one step, all you have to do is erase the tail... ooooooo and draw the new head... oooooooo Like so. This saves a lot of drawing. Technically, the centipede is just a ''queue''. (Hey, we're learning stuff!) But that was 1983 and these days I'm sure such optimizations are totally unnecessary, as you can have the individual segments flowing around the screen in 3D with texture mapping. Still, it's nice to remember the old days. ---- ''Splitting the Centipede'' A key part of how the game gets more exciting is that when you shoot a segment of the centipede, the hit segment turns into a mushroom: ooooMooo So the next few frames look like this: 1) oooM ooo o 2) ooM ooo oo 3) oM ooo ooo 4) M ooo oooo 5) M ooo oooo Note how the left half immediately "collides" with the new mushroom and so (in accordance with the rules) has to change direction horizontally and go down one line. This splitting behaviour has an important parallel with Asteroids. When you shoot a rock, it breaks into little rocks. And so on. This heightens the tension because you can feel things getting out of control, as if your actions are making things worse before they make them better. * Then perhaps it won't surprise you to hear that the way around this in Centipede is to shoot such that each sequential shot hits each successive node of the centipede, so that it never splits, it just dies. This can't be done consciously but with enough practice can be done via muscle-memory/conditioned reflex. That's how one gets to the #1 score. Something similar helps with Asteroids, although I was never as comparatively good at it. -- DougMerritt ''That's why a common strategy in AsteroidsGame is to destroy the smallest asteroids as soon as they appear. Same for Centipede; it's annoying when you have a dozen disembodied heads zooming around.'' With Asteroids, there is no way to avoid the small rocks. Every big rock has small rocks hiding inside it so it's not really the player's fault. With Centipede, you can avoid making short ones by only shooting the head or last segment. What's more, you can shoot the head and then shoot and destroy the mushroom it turns into, before the new head bounces off. Then the new head moves into the position of the old head and you can destroy that the same way. An entire centipede can be dispatched in this fashion, very rapidly. It only works low down the screen (because of the travel time of bullets and because you only get 1 bullet at time) so if it goes wrong, you're screwed. When it goes right, it's exhilarating. Players discover it by accident early on, then get hooked on repeating the experience (usually getting it wrong). -- DaveHarris ''I've recently discovered the marvelous MameEmulator and so naturally I've been playing Asteroids quite a bit. I've discovered a way to avoid the small rocks! Or at least avoid some of them. You just shoot without discrimination until the screen is almost full and the code reaches a hard limit on the number of vector "sprites" it can cope with. Then when you hit a large rock, it simply changes into a single smaller rock rather than splitting into several. Of course, this doesn't make the game any easier, on balance. -- DanielEarwicker'' ---- Fascinating concept that the game is fun because the player generates the additional tension as they try to apply a solution. Any other games use this technique? Most of the current crop seem to be all game-supplied tension. --AndyPierce ''When writing the above, I made myself laugh by imagining the idea taken to extremes - basically a little alien that doubles in size every time you fire at it and miss. When you hit it, it gets smaller and eventually shrinks to nothing, ending the round. Interesting thing is that there would be a sort of equilibrium point where it would get so large that you could hardly avoid hitting it. Not sure if it would become a good game or not - you have to try these things. -- DanielEarwicker'' There are several "sneaker" type games where the guards are quiet when you arrive, and will sound the alarm if they notice you. For example, DeusExGame and IgiGame. Sounding the alarm summons more guards, rather like splitting a centipede or asteroid. -- DaveHarris I was trying to think how you could add even more of that element to centipede. One idea was that every time you hit a bit of centipede, it would explode and throw off a few chunks of debris that would then fall down the screen, and obviously you'd have to dodge them. This modified version of the rough demo (see above) shows what I mean. It actually has a double effect: shooting the centipede is even more satisfying! http://www.btinternet.com/~daniel_earwicker/daniel/centipede2.zip (I had to make it use DirectX to make it fast enough. It needs DirectX 7 which you should already have if you're running Windows 2000.) Oh, I forgot, the keys are: * z - left * x - right * k - up * m - down * l - fire * ALT+F4 to quit Joystick support?! Huh?? This probably doesn't give the idea: http://www.btinternet.com/~daniel_earwicker/daniel/centipede2-grab.jpg The yellowy bits are the debris flying off... doesn't really work in a still picture, does it? ---- CRC cards for Centipede objects, anyone? ---- '''Looking for Centipede in SanDiego''' I recently (February 2003) rediscovered Centipede when I walked by Belmont Park (the mall-like thing with the rollercoaster just south of Mission Beach). I had a blast for a while and actually beat 200,000 for the first time. But the fire button contact is flaky and one of the bearings on the trackball seems to be worn: it often ignores downward motion of the ball. Does anyone know of another Centipede game in SanDiego? (The original arcade version, not a home version. I gots to have the controls.) -- BenKovitz ---- CategoryGame