Difference between revisions of "Mighty Bomb Jack (NES)/Game Mechanics"

From SDA Knowledge Base

Jump to: navigation, search
m (Items)
m (Items)
Line 55: Line 55:
 
* [[File:Sphinx_mbj.png]] Sphinx - Some doors are hidden or locked. The only way to open these is to find the corresponding sphinx (sometimes there are more than one sphinx in a room and each one corresponds to one door).
 
* [[File:Sphinx_mbj.png]] Sphinx - Some doors are hidden or locked. The only way to open these is to find the corresponding sphinx (sometimes there are more than one sphinx in a room and each one corresponds to one door).
 
* [[File:Power_ball_mbj.png]] P-ball - All enemies turn into coins for a few seconds. The P-ball is spawned when the counter in RAM-address 0356 (from here on referred to as the "bomb counter") reaches 20. Collecting a bomb increases the bomb counter by one or two bomb points. The first bomb is always worth 1 bomb point. There is then a "next bomb" in the order, which gives 2 bomb points. In the palace rooms, the next bomb is the one that's lit. In the stages, it's not always easy to know which bomb is the next in order, but it usually follows the stage layout. Other than giving 2 bomb points, these bombs also give a different sound when picked up. When the bomb counter reaches 20 during the stage, the next chest you open will contain the P-ball (along with whatever it initially held). The bomb triggering this is also accompanied by a sound effect. If it happens in a palace room, it will spawn in (or near?) the center of the room and start moving around diagonally. The counter is reset every time a palace room is cleared. There is also another way to reset the bomb counter, which is maybe unintended. Upgrading to green Jack and then repeatedly pressing A will eventually reset the counter. This seems to depend on how fast A is pressed, but in normal play happens around when Jack turns blue. This reset method only seems to occur if Jack is powered down in the same room as he was powered up to green. More information is needed to fully understand the mechanism behind this effect.
 
* [[File:Power_ball_mbj.png]] P-ball - All enemies turn into coins for a few seconds. The P-ball is spawned when the counter in RAM-address 0356 (from here on referred to as the "bomb counter") reaches 20. Collecting a bomb increases the bomb counter by one or two bomb points. The first bomb is always worth 1 bomb point. There is then a "next bomb" in the order, which gives 2 bomb points. In the palace rooms, the next bomb is the one that's lit. In the stages, it's not always easy to know which bomb is the next in order, but it usually follows the stage layout. Other than giving 2 bomb points, these bombs also give a different sound when picked up. When the bomb counter reaches 20 during the stage, the next chest you open will contain the P-ball (along with whatever it initially held). The bomb triggering this is also accompanied by a sound effect. If it happens in a palace room, it will spawn in (or near?) the center of the room and start moving around diagonally. The counter is reset every time a palace room is cleared. There is also another way to reset the bomb counter, which is maybe unintended. Upgrading to green Jack and then repeatedly pressing A will eventually reset the counter. This seems to depend on how fast A is pressed, but in normal play happens around when Jack turns blue. This reset method only seems to occur if Jack is powered down in the same room as he was powered up to green. More information is needed to fully understand the mechanism behind this effect.
* [[File:B-ball.png|22px]] B-ball - Appears in a palace room when the score passes a multiple of 5000. The B-ball does not appear in the corridors or as a result of the points awarded from completing a round.
+
* [[File:B-ball.png|22px]] B-ball - Bonus points. Appears in a palace room when the score passes a multiple of 5000. The B-ball does not appear in the corridors or as a result of the points awarded from completing a round.
* [[File:Extra_coin_mbj.png]] E-ball - Extra life. Found in secret locations, but can also be triggered by gold coins (tracked in $0367). You need to collect 40 coins or more (either from transforming enemies by collecting a P-ball or turning into green Jack) or find them in certain chests in the corridors. The next time the score passes a multiple of 5000 in a palace room, the E-ball will appear (instead of the B-ball).
+
* [[File:Extra_coin_mbj.png]] E-ball - Extra life ($3E4). Found in secret locations, but can also be triggered by gold coins (tracked in $0367). You need to collect 40 coins or more (either from transforming enemies by collecting a P-ball or turning into green Jack) or find them in certain chests in the corridors. The next time the score passes a multiple of 5000 in a palace room, the E-ball will appear (instead of the B-ball).
 
* [[File:Mighty_drink_mbj.png]] Bottle - Increases the timer. Should be avoided in a speedrun as it wastes time counting down after the end of each level.
 
* [[File:Mighty_drink_mbj.png]] Bottle - Increases the timer. Should be avoided in a speedrun as it wastes time counting down after the end of each level.
 
<br>
 
<br>

Revision as of 07:35, 3 March 2024

Mighty_bomb_jack_(nes)

General game description

You control Jack in his quest to save the royal family that has been trapped inside a pyramid by the evil Belzebut (yes, the spelling is funny and probably at least 100 million people before you have noticed that too...). The game takes place inside (and in two levels even outside) a pyramid (see external resources for a link to a map over it). The game is divided into 17 "rounds" (levels would be more accurate - probably poor translation). Each round is composed of several rooms making up a more or less regular stage (called "corridor" in the game), where you just have to reach the door at the end (there is a little more to it, but that's described under the best ending route), and at the end is a "palace room". The palace room contains 24 bombs. To clear the round, you need to collect all 24 bombs and then reach the exit. Normally, you have to navigate Jack level by level in this way by going through the corridors of the pyramid and get to the top, where the end of the game is. However, it's possible to warp from palace room to palace room and thus reaching the end faster. As soon as you pick up the first bomb in a palace room, another one will be ignited. If the first ignited bomb is picked up as the last (24th) one, you warp to the next palace room (you still have to reach the exit first though).


Version differences

There are several differences between the ntsc-u and ntsc-j versions. The difficulty of this game (without a walkthrough) is absolutely ludicrous. My guess is that someone tried to tone down the difficulty a notch or two before releasing the game in the US (it's still ridiculous though). Anyways, some items have been moved around, some blocks take more jumps to destroy in the Japanese version etc. For the best ending category, this means that it's meaningless to compare the two versions. For the normal ending, you have to make five block breaking jumps more in the j-version. These extra jumps also mean that an extra mighty coin is needed in the j-version. This equals roughly an additional 3 seconds or so (depending on how fast one is to break blocks). On the other hand, there is a chest in round 17 (room 17-2 to be more exact) that is visible in the j-version but not in the u-version. That room is roughly 1 second faster on the j-version. So overall, the u-version has a few seconds advantage over the j-version, but one should probably not compare the two versions down to the second.


Movement mechanics

x-movement

  • $3D3 - x-position
  • $3D2 - x-speed, always 1 when moving
  • $3D1 - "sub" x-position
  • $3D0 - "sub" x-speed, always 0x80 when moving


$3D1 = $3D1 + $3D0
$3D3 = $3D3 + $3D2 + $3D1

Since the "sub" x-speed is constant, MBJ will alternate every frame between the speeds 1 pixel/frame and 2 px/f.


y-movement

  • $3D9 - y-position
  • $3D8 - y-speed
  • $3D7 - sub y-position
  • $3D6 - sub y-speed


$3D7 = $3D7 + $3D6
$3D9 = $3D9 + $3D8 + $3D7

During free fall, $3D6 increases with 0x10 every frame. When it loops, $3D8 is increased by 1. When $3D8 equals 3 and $3D6 equals 0x80, the speed remains constant (acceleration slows down the last frames before reaching the final velocity).

  • Holding up roughly reduces the increases of $3D6 to every second frame
  • Holding down roughly doubles the rate at which $3D6 increases. The final velocity doesn't change though.
  • Pressing A makes $3D6 increase by 1 on the next frame, 2 on the frame after that and then the rate increases in the frames after that


Jump mechanics

Holding up while pressing the jump button creates a higher jump. For roughly the first half of the screen, it's very similar to a normal jump. The vertical speed of a normal jump then starts to decrease faster than when holding up.
There is a special trick that can be performed at the start of each room. If the jump button is pressed at the right frame, Jack will start by making a jump instead of falling down to the ground. This is a 1-frame trick.


Items

The following items are of interest in a speedrun:

  • Mighty coin mbj.png Mighty coins - Found in chests (always in the same location). The coins are described in the manual, but the text contains several errors. Jack can hold up to 9 coins at a time (tracked in $03E2). Picking up a tenth coin sends him to the torture chamber (very bad). When using a mighty coin, the value in $03E1 increases to a set value (and then decreases by 1 every time A is pressed) and Jack gains different abilities:
  1. coin Blue jack mbj.png [Blue] $03E1 is set to 20 (decimal) and Jack can now open locked chests by jumping on them. Note that you can normally press A 20 times before reverting back to red Jack. However, if powered down from orange Jack, Jack will turn blue when $03E1 equals 19, meaning that he will turn red after pressing A 19 times in this case.
  2. coin Orange jack mbj.png [Orange] When using a coin as blue Jack, $03E1 is set to 30 (decimal), regardless of the previous value of $03E1. Orange Jack has the same effect as blue and he can now also open chests (both normal and locked) by running into them from the side (or jumping into them from below). Like for blue Jack, how long the effect lasts depends on if Jack was powered up from blue or powered down from green. If powered up, it lasts for 11 A presses. If powered down, it lasts for 10 presses.
  3. coin Green jack mbj.png [Green] When using a coin as orange Jack, $03E1 is set to 35 (decimal), regardless of the previous value of $03E1. Same effect as orange, but S-coins can now be collected and all enemies turn into coins for a few seconds (same effect as collecting a P-ball). Jack turns back to orange after pressing A 6 times.

When Jack is green, mighty coins can't be used (not even to reset $03E1 to 35).

  • Crystal mbj.png Crystal balls - There are two crystal balls in the game. Both are found in special chambers, where you need to break some of the blocks surrounding them. Picking up one crystal will unlock the queen's room and collecting both will also unlock the princess' room. In order to get the best ending, you need to collect both.
  • Secret coin mbj.png S-coins - Found in chests (always in the same location). There are in total 10 (?) of these coins. Collecting 5 of these will open up Belzebut's room at the end (only if both crystal balls have also been collected along the way). There is no point in collecting more than 5 S-coins (other than scoring points). Only green Jack can pick up S-coins (but there is no restriction on what form you need to be in to make it visible).
  • Sphinx mbj.png Sphinx - Some doors are hidden or locked. The only way to open these is to find the corresponding sphinx (sometimes there are more than one sphinx in a room and each one corresponds to one door).
  • Power ball mbj.png P-ball - All enemies turn into coins for a few seconds. The P-ball is spawned when the counter in RAM-address 0356 (from here on referred to as the "bomb counter") reaches 20. Collecting a bomb increases the bomb counter by one or two bomb points. The first bomb is always worth 1 bomb point. There is then a "next bomb" in the order, which gives 2 bomb points. In the palace rooms, the next bomb is the one that's lit. In the stages, it's not always easy to know which bomb is the next in order, but it usually follows the stage layout. Other than giving 2 bomb points, these bombs also give a different sound when picked up. When the bomb counter reaches 20 during the stage, the next chest you open will contain the P-ball (along with whatever it initially held). The bomb triggering this is also accompanied by a sound effect. If it happens in a palace room, it will spawn in (or near?) the center of the room and start moving around diagonally. The counter is reset every time a palace room is cleared. There is also another way to reset the bomb counter, which is maybe unintended. Upgrading to green Jack and then repeatedly pressing A will eventually reset the counter. This seems to depend on how fast A is pressed, but in normal play happens around when Jack turns blue. This reset method only seems to occur if Jack is powered down in the same room as he was powered up to green. More information is needed to fully understand the mechanism behind this effect.
  • B-ball.png B-ball - Bonus points. Appears in a palace room when the score passes a multiple of 5000. The B-ball does not appear in the corridors or as a result of the points awarded from completing a round.
  • Extra coin mbj.png E-ball - Extra life ($3E4). Found in secret locations, but can also be triggered by gold coins (tracked in $0367). You need to collect 40 coins or more (either from transforming enemies by collecting a P-ball or turning into green Jack) or find them in certain chests in the corridors. The next time the score passes a multiple of 5000 in a palace room, the E-ball will appear (instead of the B-ball).
  • Mighty drink mbj.png Bottle - Increases the timer. Should be avoided in a speedrun as it wastes time counting down after the end of each level.


Enemy behavior and manipulation

Mummies

This section describes mummies in the palace rooms. Mummies in the corridor sections probably behave similarly, but haven't been investigated.

RAM-addresses of interest

  • $3D3/$3D9 - MBJ's x/y-position
  • $35E - Mummy spawn timer (room)
  • $6AA - Movement direction, item 0 ($6BA looks similar, but is the way the mummy is facing)
  • $6AB/$6B1 - x/y, item 0
  • $6BB - Drop timer, item 0
  • $94/$92 - Temp variables, x/y-position of possible enemy spawn locations
  • $C - Temp variable, sum of the absolute differences in x and y between MBJ's position and the left enemy spawn location (LESL), or written as a formula = Abs(MBJ_x - LESL_x) + Abs(MBJ_y - LESL_y)
  • $E - Temp variable, sum of the absolute differences in x and y between MBJ's position and the right enemy spawn location (RESL), or written as a formula = Abs(MBJ_x - RESL_x) + Abs(MBJ_y - RESL_y)

Item addresses are separated by 0x1C, meaning e.g. the first 6 x-addresses are $6AB, $6C7, $6E3, $6FF, $71B and $737.

When the room starts, the mummy spawn timer starts ticking down every frame. When it has counted down, a mummy spawns. The timer is reset and the process starts over until there are four enemies. The base value of the timer is room-dependent. The later in the game, the shorter the delay to spawn mummies (with some exceptions - the delay seems to be at a minimum in palace rooms 12 and 13, 0x2F).

Note: when clearing a palace room, the progression in $3CC is updated. $3CC feeds into the timers' start values of the next rooms. By navigating through the pyramid in such a way that palace rooms are skipped, the timers will not be updated. However, once a palace room is cleared, $3CC is updated to its "correct" value again. This effect matters when e.g. routing the best ending category (in particular palace room 10).

There are two possible spawn locations ("left" and "right") in each room. The x-positions are room-dependent and probably related to how the platforms are placed in the individual rooms. The mummy spawns in the location that is the furthest away from MBJ in terms of "coordinate distance" (see description for $E and $C above). Note that these calculations can easily overflow, meaning the result is reversed (the enemy closest to MBJ spawns).

Once the mummy has spawned, the general rule is that it starts walking in the direction of MBJ (there are exceptions, see below). It walks back and forth on the platform until the drop timer has counted down. Next time it reaches an edge, it will drop down. If the mummy landed on another platform (and not the floor), the drop timer is reset and will start counting down again. Just like the spawn timer, the drop timers are room-dependent and mummies generally drop down faster as the game progresses.

Note: the movement direction address can be called from a second location in the code and revert the direction (meaning the mummy starts walking away from MBJ instead). The same piece of code can be called again, reverting back to the "normal" movement direction (so walking towards MBJ). This game mechanics has not been fully analyzed. However, player inputs can manipulate this. To study this effect, the following movie and instructions can be used (credits to 'SpaceColonizer'):
https://tasvideos.org/UserFiles/Info/638237798222671732
Truncate the movie at frame 17814. Mummy 1 goes right as expected.

Add left input up to frame 17830. Mummy 1 now starts going left, which is not the expected direction.

By playing around with the inputs, it's fairly easy to create more movement direction changes of the same kind.

Earlier on in the same room of the same movie, mummy 0 fell through a platform. This has not been investigated in detail either, but it's easy to see how small input changes can make the mummy stay on the platform instead.

Transformed enemies

The mummies transform into one of six enemy types when dropping to the floor (these are not the official names, but the official ones would probably be quite confusing to use):
Bat mbj.png 0. Bat - Moves around diagonally without considering Jack's position.
Lobster mbj.png 1. Lobster - Fast moving enemy that homes in on Jack. Only moves diagonally. (in most situations, this is the most dangerous enemy)
Jellyfish mbj.png 2. Jellyfish - Every time it hits an obstacle, it moves in a straight line towards MBJ's position. It seems to have (at least) two speed components. The base speed seems to be determined when bouncing against an obstacle. The further away it was from MBJ, the more base speed it gets. It also changes the speed, but to a lesser extent, between obstacles. It speeds up if MBJ is further away and it slows down as it gets closer to MBJ. The detailed mechanics have not been analyzed.
Skull mbj.png 3. Skull - Homes in on Jack horizontally, but cannot control its vertical movement. Moves diagonally.
Fireball mbj.png 4. Fireball - Homes in on Jack vertically, but cannot control its horizontal movement. Moves diagonally.
Bird mbj.png 5. Bird - Slow moving enemy that homes in on Jack horizontally and vertically. It can't move diagonally.

The enemy type is determined three frames before the mummy starts transforming. The game then looks at the value of memory address 00FA (enemy counter) and calculates the modulus of 6 of that value (= the remainder when dividing by six). The numbers in front of the different enemy types indicate these values. The value of the enemy counter is increased by one every time the jump button is pressed (only during actual gameplay, so not during screen transitions etc) and is never reset. This means it's very much possible to manipulate the enemy spawns in certain areas (and it's also crucial to take it into account in a speedrun). Since the value is never reset, it's however also difficult to know its value at any given point in time. The best way to find out the value is to watch which enemy that spawns at a certain point and then start counting the A-presses onwards. This is luckily well suited for the speedrun mindset, with a pre-determined route which allows for a constant number of A-presses between two given points. Needless to say, stretches of gliding in mid-air with rapid A-presses make this harder to control.
Important note: There is a discontinuity in the enemy type spawns as 00FA loops. 255 gives a remainder of 3 when divided by 6, while 0 obviously gives a remainder of 0 when divided by 6. This means that two enemy types are jumped over in the cycle. A normal ending run will loop the counter near the end, while a best ending run will loop two or maybe even three times (depending on the category that is played). In the best ending route that is/will be described here in the kb, both times the counter loops occur close to sections of enemy manipulation and therefore need to be taken into account when planning the route.

Personal tools