6

I've been playing a lot of Galaga lately on a Namco Revision B board, and I'm running into an interesting game detail that has probably been documented or examined by others or could be divined by looking at machine code.

The game has, superficially, three stages that cycle endlessly with edge cases for stage 0, 1, and 2. The enemies always fly in those patterns onto the screen and the player can predict which pattern will be used based on the stage number. It's trivial to visually confirm the three types of flight paths.

But there's some nuance there that I've yet to see documented and is less trivial to determine. Within those entrance patterns some of the ships choose to dive-bomb the player's ship and some of them choose to fire at the player, and which ships decide to do which behavior doesn't seem to follow the clear three stage loop. And after the enemies assemble at the top of the screen, one of them that isn't a commander can be randomly chosen to be promoted into a specialized ship that also cycles after every bonus stage. And, of course, shortly after assembly the enemies attack from the top of the screen in a rapid single-file order.

My question is, is any of this random? And if it's not, is the logic available anywhere for examination? For example, given a specific stage number, could one predict which enemies would choose to dive-bomb and which would choose to fire? And given an arbitrary stage number and starting enemy formation, could one predict who would attack and in what order?

GGMG-he-him
  • 60
  • 2
  • 14
  • this would need complete disassembly and RE of the Galaga game. AFAIR it's not been done yet. One of the rare games that hasen't been reversed (Galaxian, Scramble, Pacman and a lot of other classics were) – Jean-François Fabre Feb 12 '23 at 10:23
  • 10
    I stand corrected: there is a disassembly: https://github.com/hackbar/galaga – Jean-François Fabre Feb 12 '23 at 12:05
  • 5
    By @Jean-FrançoisFabre's comment, the literal questions ("is any..." and "could one...") can be answered by "look into the disassembly" and "yes". But what do you really want to get answered? Please [edit] your question to word a specific question. – the busybee Feb 14 '23 at 06:55
  • 3
    @thebusybee I'm not sure I follow how the existence of the disassembly proves that the ship patterns are deterministic and predictable, and that's the actual question I'm asking. If there is something about the existence or contents of the disassembly that shows what's random and what isn't I consider that an excellent answer. – GGMG-he-him Feb 14 '23 at 21:50
  • 3
    @thebusybee Alternatively, if you're asking for a motive rather than clarification, I'm working on a Galaga world record attempt and dive-bombing ships are useful for padding out the assembly stage, so knowing which ships will dive in each level means I can time shots to artificially lengthen the amount of time before the shooting starts. Plus it's seemingly new info in a legendary old game, so it felt valuable to document in its own right. – GGMG-he-him Feb 14 '23 at 21:53
  • 3
    Looking at file https://github.com/hackbar/galaga/blob/master/rom0/new_stage.s, lines 121+, you will see a configuration table for levels. If I get it correct, type of bomber attack and time delay is configured for every level. – ufok Feb 15 '23 at 06:35

0 Answers0