Difference between revisions of "Ikari Warriors 2/Game Mechanics"

From SDA Knowledge Base

Jump to: navigation, search
m (Weapons)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Ikari_warriors_2]]
 
[[Ikari_warriors_2]]
==Some observations regarding movement speed==
+
==Items==
All levels go from bottom to top of the screen so it's important to keep the vertical movement speed up as much as possible. Below ratios are with respect to the vertical speed.<br />
+
* [[File:Thunder_power_ik2.png]] Thunder power - All non-boss enemies on screen are defeated and boss enemies are dealt damage. During a brief period (3 frames) before the boss appears on screen, this attack can deal damage before the boss has been attributed health, effectively killing it instantly. This works on all bosses, but there are only 2 (known) locations of this item in the game.
Diagonal/Straight flying speed ~76%<br />
+
* [[File:Earthquake_power_ik2.png]] Earthquake power^ - Stuns all enemies on screen, but does not deal damage. No known use in a speedrun.
Diagonal/Straight walking speed (land) ~72%<br />
+
* [[File:Wing power ik2.png]] Wing power - Allows you to fly over objects, while still being vulnerable to enemy attacks. This method of movement also increases the speed. The wings disappear after a set amount of time or whenever you enter the menu (or shop).
Diagonal/Straight walking speed (water) ~69%<br />
+
* [[File:Armor_power_ik2.png]] Armor power - For a certain amount of time, you're invincible to all damage. Anything, including bosses, that touches you will be dealt damage every game frame (@20 fps). There are two exceptions. The 4th boss does not take damage from the armor and the 3rd boss can only be killed with the armor once its protective head pieces have been destroyed.
Straight walking (land)/flying speed ~68%<br />
+
* [[File:Arrow_power_ik2.png]] Arrow power - Shoots an arrow vertically. Everything in its way is insta-killed, including bosses. There is only one arrow power found in the levels in the game (confirmed by the manual). More can be bought in the shops though.
Straight walking (water)/walking (land) speed ~68%<br /><br />
+
* [[File:Life_power_ik2.png]] Life power - Restores to full health.
 +
* [[File:Time_power_ik2.png]] Time power - Takes you "back in time" to the latest shop you visited. This will always bring you backwards in the game and has therefore no known uses in a speedrun (but surely for a score attack).<br /><br />
  
In practice, as an example, this means that a quick twitch diagonally right (or left) to shoot an enemy when walking on land incurs a time loss of (very) roughly 3-5 frames.<br />
+
^ This power has been omitted in the manual, most likely by mistake.<br /><br />
  
==Galago tunnels==
+
==Movement speed==
The Galago tunnels are the passages between levels. They can either be filled with weapons or enemies. It's obviously best if they are filled with weapons items... However, it's fully understood what determines this. Below are some empirical observations.<br />
+
Below speeds assume general vertical movement. See also [[Ikari_Warriors_2/Game_Mechanics#RAM-addresses|RAM-addresses]].<br />
- A test consisting of 10 playthroughs of the level (on emulator) resulted in monsters in the tunnel 5 times.<br />
+
Straight walking speed (land) - 2<br />
- By entering the tunnel from a save state "close" to the entrance, you'll always get the same result (the same is true for all levels). By starting from a save state further and further away, you'll eventually start to sometimes get monsters, sometimes weapon items. A more detailed study would clearly be needed to determine the exact trigger and if it's something that can be manipulated in real-time.<br />
+
Diagonal walking speed (land) - first diagonal movement: 1 and 216 sub (y) and 192 sub (x), subsequent diagonal movements: 1 and 104 sub (both x and y)<br />
- The second tunnel seems to always be the same as the first tunnel (so if there are monsters in the first tunnel, there will be monsters in the second tunnel as well).<br />
+
Straight flying speed - 3<br />
- A test consisting of 10 playthroughs of level 3 (on emulator) resulted in monsters 9 of the times if there had also been monsters in the level 2 tunnel. The same test, but from a save state without monsters in tunnel 2 only gave monsters once.<br />
+
Diagonal flying speed - 2 and 28 sub (both x and y)(<br />
- A test consisting of 10 playthroughs of level 4 (on emulator) resulted in monsters 6 of the times if there had also been monsters in the level 2 tunnel. The same test, but from a save state without monsters in tunnel 3 gave monsters 4 times.<br /><br />
+
Straight walking speed (water) - 1 and 64 sub<br />
 +
Diagonal walking speed (land) - first diagonal movement: 1 and 39 sub (y) and 120 sub (x), subsequent diagonal movements: 225 sub (both x and y)<br /><br />
  
In summary, the first tunnel seems to be a 50/50 chance and there is today not known if this can be manipulated. There is a very high probability that tunnel 2 and 3 will have the same content as level 1. Level 4 seems to be more random, but maybe with slight preference for the same content as in the previous levels. All of the playthroughs in the tests above used the speedrun route. However, the play quality varied quite a bit, so it's impossible to say what determined monsters in the tunnels. The tests do however correspond very closely to the general hunch gained from speedrun attempts on console.<br /><br />
+
In practice, as an example, this means that a quick twitch diagonally right (or left) to shoot an enemy when walking on land incurs a time loss of roughly 3-5 frames. It's also worth noting that even though the first and subsequent diagonal movements on foot are extremely close in terms of traveled distance, the first cycle of diagonal movement is still considerably more efficient by allowing you to move in a straighter line between two points. As a rule of thumb, you'll save one movement frame (so 3 actual frames) by dividing a diagonal movement into 5 separate segments. The same game mechanic is present in the first Ikari Warriors game as well.<br /><br />
  
It's possible to get through the first three tunnels unscathed with only minor time losses compared to when there are no monsters. There hasn't been found way yet to get through tunnel 4 when it's filled with monsters though.<br />
+
==End-of-level tunnels==
 +
The tunnels at the end of each level can either be filled with weapons or "Galango" enemies. The content is determined by the hearts you have in the inventory ($F8). An uneven number results in weapons and an even number results in enemies. More specifically, collecting a dropped heart from a killed enemy will add either 5 or 10 hearts to the inventory. It's therefore only enemies that produce "5 heart" drops that need to be considered. The general rule is that big enemies give "10 heart" drops, while small enemies give "5 heart" drops. There are however exceptions to this rule. Some big enemies only give "5 heart" drops. It's not fully understood what determines this, but it appears that each individual enemy gives the same heart drop every time. A well thought-out route should therefore be able to provide weapon-filled tunnels with good consistency. The hearts in the inventory are shown when going into the menu, which can provide a good opportunity to prepare for how the remaining part of the level should be played.<br /><br />
 +
 
 +
It's possible to get through the tunnels unscathed with only minor time losses compared to when there are no monsters. There is however an element of RNG in terms of the enemy bullets and some bullet patterns are difficult to avoid taking hits from.<br />
 
1st tunnel - http://www.youtube.com/watch?v=R2sC4KABllc<br />
 
1st tunnel - http://www.youtube.com/watch?v=R2sC4KABllc<br />
 
2nd tunnel - http://www.youtube.com/watch?v=U60P6yoW9aU<br />
 
2nd tunnel - http://www.youtube.com/watch?v=U60P6yoW9aU<br />
 
3rd tunnel - http://www.youtube.com/watch?v=ldFa-nxpJg4<br />
 
3rd tunnel - http://www.youtube.com/watch?v=ldFa-nxpJg4<br />
 +
4th tunnel - https://www.youtube.com/watch?v=o9sU9qYnwKc<br /><br />
 +
 +
==RNG==
 +
Enemy movements and firing directions appear to mostly depend on the player position and can therefore be manipulated by routing choices. An exception is the very start of the game, where the small enemies appear to move more randomly (not investigated in more detail).<br /><br />
 +
 +
There is however some variance in the timing of firing. Routes with very tight margins can therefore add risk. The exact workings have not been fully clarified. But a superficial understanding can be had through the following considerations. Each time an object loads in memory, there will be a corresponding timer that starts to run. The timer will be somewhere in the later addresses of $60X. Every 32 game frames (so 96 actual frames), a check will trigger the object to shoot a bullet, assuming it's an enemy that has the ability to do so. These timers are inherited from previous objects. The bullet timing of an enemy will therefore be a function of how long the previous objects occupying the same timer were active. So collecting/avoiding an item or killing enemies at different times, can change the upcoming bullet patterns.<br /><br />
 +
 +
A closer look at how the bullet timing works could be worth the effort, as it might allow the possibility to develop routes that avoid taking damage.<br /><br />
  
 
==Weapons==
 
==Weapons==
Switching weapons costs roughly 1.5 seconds (provided you're already planned a trip to the menu). While the boomerangs are incredibly overpowered, they don't save anywhere near that time any place in the game. The bazooka and the sword are somewhat interesting to play with casually, but have no impact in a speedrun. The mines are rubbish. In short, the fastest way is to play with the machine gun (B-button) and the grenades (A-button) the whole game. All weapons can be upgraded three times by collecting the respective weapon tokens. The effects of upgrading the weapons make no difference in a speedrun.<br /><br />
+
* Switching weapons costs roughly 1.5 seconds (provided you've already planned a trip to the menu).
 +
* While the boomerangs are incredibly overpowered, they don't save anywhere near that time any place in the game.
 +
* The bazooka is powerful and even deals damage to bosses, but does so more slowly than the special items (robot suit, arrow and thunder quick kill).
 +
* The sword is somewhat interesting to play with casually, but has no use in a speedrun.
 +
* The mines are rubbish.
 +
* All weapons can be upgraded three times by collecting the respective weapon tokens (longer reach, bigger explosion area etc). The effects of upgrading the weapons make no difference in a speedrun though.
 +
The fastest way is simply to play with the machine gun (B-button) and the grenades (A-button) for the whole game.<br /><br />
  
In short, don't bother about the weapon options. Just stick with the default weapons.
+
==RAM-addresses==
 +
* 550/536 - y/sub-y position
 +
* 59E/584 - x/sub-x position
 +
* 60X - Timers determining the bullet timing of the different enemies
 +
* 63X - Boss health (the exact address appears to vary from time to time, but should be somewhere in this range)
 +
* F8 - Minor hearts
 +
* 6D1 - Player health
 +
* 6FE - Determines the type of weapon content in the end-of-level tunnels

Latest revision as of 00:50, 5 October 2023

Ikari_warriors_2

Items

  • Thunder power ik2.png Thunder power - All non-boss enemies on screen are defeated and boss enemies are dealt damage. During a brief period (3 frames) before the boss appears on screen, this attack can deal damage before the boss has been attributed health, effectively killing it instantly. This works on all bosses, but there are only 2 (known) locations of this item in the game.
  • Earthquake power ik2.png Earthquake power^ - Stuns all enemies on screen, but does not deal damage. No known use in a speedrun.
  • Wing power ik2.png Wing power - Allows you to fly over objects, while still being vulnerable to enemy attacks. This method of movement also increases the speed. The wings disappear after a set amount of time or whenever you enter the menu (or shop).
  • Armor power ik2.png Armor power - For a certain amount of time, you're invincible to all damage. Anything, including bosses, that touches you will be dealt damage every game frame (@20 fps). There are two exceptions. The 4th boss does not take damage from the armor and the 3rd boss can only be killed with the armor once its protective head pieces have been destroyed.
  • Arrow power ik2.png Arrow power - Shoots an arrow vertically. Everything in its way is insta-killed, including bosses. There is only one arrow power found in the levels in the game (confirmed by the manual). More can be bought in the shops though.
  • Life power ik2.png Life power - Restores to full health.
  • Time power ik2.png Time power - Takes you "back in time" to the latest shop you visited. This will always bring you backwards in the game and has therefore no known uses in a speedrun (but surely for a score attack).

^ This power has been omitted in the manual, most likely by mistake.

Movement speed

Below speeds assume general vertical movement. See also RAM-addresses.
Straight walking speed (land) - 2
Diagonal walking speed (land) - first diagonal movement: 1 and 216 sub (y) and 192 sub (x), subsequent diagonal movements: 1 and 104 sub (both x and y)
Straight flying speed - 3
Diagonal flying speed - 2 and 28 sub (both x and y)(
Straight walking speed (water) - 1 and 64 sub
Diagonal walking speed (land) - first diagonal movement: 1 and 39 sub (y) and 120 sub (x), subsequent diagonal movements: 225 sub (both x and y)

In practice, as an example, this means that a quick twitch diagonally right (or left) to shoot an enemy when walking on land incurs a time loss of roughly 3-5 frames. It's also worth noting that even though the first and subsequent diagonal movements on foot are extremely close in terms of traveled distance, the first cycle of diagonal movement is still considerably more efficient by allowing you to move in a straighter line between two points. As a rule of thumb, you'll save one movement frame (so 3 actual frames) by dividing a diagonal movement into 5 separate segments. The same game mechanic is present in the first Ikari Warriors game as well.

End-of-level tunnels

The tunnels at the end of each level can either be filled with weapons or "Galango" enemies. The content is determined by the hearts you have in the inventory ($F8). An uneven number results in weapons and an even number results in enemies. More specifically, collecting a dropped heart from a killed enemy will add either 5 or 10 hearts to the inventory. It's therefore only enemies that produce "5 heart" drops that need to be considered. The general rule is that big enemies give "10 heart" drops, while small enemies give "5 heart" drops. There are however exceptions to this rule. Some big enemies only give "5 heart" drops. It's not fully understood what determines this, but it appears that each individual enemy gives the same heart drop every time. A well thought-out route should therefore be able to provide weapon-filled tunnels with good consistency. The hearts in the inventory are shown when going into the menu, which can provide a good opportunity to prepare for how the remaining part of the level should be played.

It's possible to get through the tunnels unscathed with only minor time losses compared to when there are no monsters. There is however an element of RNG in terms of the enemy bullets and some bullet patterns are difficult to avoid taking hits from.
1st tunnel - http://www.youtube.com/watch?v=R2sC4KABllc
2nd tunnel - http://www.youtube.com/watch?v=U60P6yoW9aU
3rd tunnel - http://www.youtube.com/watch?v=ldFa-nxpJg4
4th tunnel - https://www.youtube.com/watch?v=o9sU9qYnwKc

RNG

Enemy movements and firing directions appear to mostly depend on the player position and can therefore be manipulated by routing choices. An exception is the very start of the game, where the small enemies appear to move more randomly (not investigated in more detail).

There is however some variance in the timing of firing. Routes with very tight margins can therefore add risk. The exact workings have not been fully clarified. But a superficial understanding can be had through the following considerations. Each time an object loads in memory, there will be a corresponding timer that starts to run. The timer will be somewhere in the later addresses of $60X. Every 32 game frames (so 96 actual frames), a check will trigger the object to shoot a bullet, assuming it's an enemy that has the ability to do so. These timers are inherited from previous objects. The bullet timing of an enemy will therefore be a function of how long the previous objects occupying the same timer were active. So collecting/avoiding an item or killing enemies at different times, can change the upcoming bullet patterns.

A closer look at how the bullet timing works could be worth the effort, as it might allow the possibility to develop routes that avoid taking damage.

Weapons

  • Switching weapons costs roughly 1.5 seconds (provided you've already planned a trip to the menu).
  • While the boomerangs are incredibly overpowered, they don't save anywhere near that time any place in the game.
  • The bazooka is powerful and even deals damage to bosses, but does so more slowly than the special items (robot suit, arrow and thunder quick kill).
  • The sword is somewhat interesting to play with casually, but has no use in a speedrun.
  • The mines are rubbish.
  • All weapons can be upgraded three times by collecting the respective weapon tokens (longer reach, bigger explosion area etc). The effects of upgrading the weapons make no difference in a speedrun though.

The fastest way is simply to play with the machine gun (B-button) and the grenades (A-button) for the whole game.

RAM-addresses

  • 550/536 - y/sub-y position
  • 59E/584 - x/sub-x position
  • 60X - Timers determining the bullet timing of the different enemies
  • 63X - Boss health (the exact address appears to vary from time to time, but should be somewhere in this range)
  • F8 - Minor hearts
  • 6D1 - Player health
  • 6FE - Determines the type of weapon content in the end-of-level tunnels
Personal tools