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

From SDA Knowledge Base

Jump to: navigation, search
m (Weapons)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Ikari_warriors_2]]
 
[[Ikari_warriors_2]]
 
==Items==
 
==Items==
There is room for 7 items in the inventory screen, but there are only 6 to be found in the game. (the names are from the manual)
+
* [[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.
* Earthquake* - Stuns all enemies on screen, but does not deal damage. No known use in a speedrun.
+
* [[File:Earthquake_power_ik2.png]] Earthquake power^ - Stuns all enemies on screen, but does not deal damage. No known use in a speedrun.
* 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.
+
* [[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).
* 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).
+
* [[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.
* 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 3rd frame (corresponding to the game running at 20 fps). There is one exception though. The 3rd boss has a protective helmet (or something) that is not affected by the armor.
+
* [[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.
* Arrow power - Shots an arrow vertically. Everything in its way is insta-killed, including bosses. There is only one arrow power in the game (confirmed by the manual).
+
* [[File:Life_power_ik2.png]] Life power - Restores to full health.
* 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 />
* 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.<br /><br />
  
 
==Movement speed==
 
==Movement speed==
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 />
+
Below speeds assume general vertical movement. See also [[Ikari_Warriors_2/Game_Mechanics#RAM-addresses|RAM-addresses]].<br />
Diagonal/Straight flying speed ~76%<br />
+
Straight walking speed (land) - 2<br />
Diagonal/Straight walking speed (land) ~72%<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 />
Diagonal/Straight walking speed (water) ~69%<br />
+
Straight flying speed - 3<br />
Straight walking (land)/flying speed ~68%<br />
+
Diagonal flying speed - 2 and 28 sub (both x and y)(<br />
Straight walking (water)/walking (land) speed ~68%<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 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.<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 />
  
==Galago tunnels==
+
==End-of-level tunnels==
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 weapon items... However, it's not fully understood what determines this. Below are some empirical observations.<br />
+
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 />
- A test consisting of 10 playthroughs of the first level resulted in monsters in the tunnel 5 times.<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 />
+
- 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 />
+
- A test consisting of 10 playthroughs of level 3 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 />
+
- A test consisting of 10 playthroughs of level 4 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 />
+
- Some preliminary tests on if the first tunnel spawns depended on score, heart count or hard resets didn't yield anything (same score/heart count/hard reset can give both monsters and weapon items).<br /><br />
+
  
In summary, the first tunnel seems to be a 50/50 chance and at the time of writing this it's 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 and were played on emulator. 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 />
+
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 />
 
+
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 a way yet to get through tunnel 4 when it's filled with monsters though.<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'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 armor, arrow and lightning quick kill). The sword is somewhat interesting to play with casually, but have no impact in a speedrun. The mines are rubbish. The fastest way is simply 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 (longer reach, bigger explosion area etc). The effects of upgrading the weapons make no difference in a speedrun though.
+
* 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 />
 +
 
 +
==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 01: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