Combat: Difference between revisions

Jump to navigation Jump to search
Line 86: Line 86:
In {{p1}} and {{p2}}, some Pikmin are more likely to die than others, due to engine limitations. It boils down to how the games check which Pikmin should die for any given attack.{{cite youtube|-t_3nXsIhrA|explaining what Pikmin are more likely to die in ''Pikmin''}}{{cite youtube|e8Jw5UoeO4g|explaining what Pikmin are more likely to die in ''Pikmin 2''}} In ''Pikmin 3'' and ''Hey! Pikmin'', although it isn't clear, it seems that the Pikmin closest to the center of the attack are the ones that get hit by it.
In {{p1}} and {{p2}}, some Pikmin are more likely to die than others, due to engine limitations. It boils down to how the games check which Pikmin should die for any given attack.{{cite youtube|-t_3nXsIhrA|explaining what Pikmin are more likely to die in ''Pikmin''}}{{cite youtube|e8Jw5UoeO4g|explaining what Pikmin are more likely to die in ''Pikmin 2''}} In ''Pikmin 3'' and ''Hey! Pikmin'', although it isn't clear, it seems that the Pikmin closest to the center of the attack are the ones that get hit by it.


The general idea is that each game keeps a list of loaded Pikmin in memory. This list can fit 100 entries, and normally, it starts off empty. When a Pikmin is loaded into memory, it fills in the next vacant slot. In the case of an empty list, this is slot 0. The second Pikmin to be called out fills slot 1, and so on. When an enemy attacks to eat, the game checks every loaded Pikmin to see if it is colliding with the mouth's hitbox, and starts checking slot 0, then slot 1, etc.
The general idea is that each game keeps a list of loaded Pikmin in memory. This list can fit 100 entries, and normally, it starts off empty. When a Pikmin is loaded into memory, it fills in the next vacant slot. In the case of an empty list, this is slot 0. The second Pikmin to be called out fills slot 1, and so on. When an enemy attacks to eat, the game checks every loaded Pikmin to see if it is colliding with the mouth's hitbox, and starts checking slot 0, then slot 1, and so on.


This behavior is also used for other enemy-related actions, like a [[Fiery Blowhog]] deciding whether to change targets or to keep the current one, in ''Pikmin''.
This behavior is also used for other enemy-related actions, like a [[Fiery Blowhog]] deciding whether to change targets or to keep the current one, in ''Pikmin''.