Projectile

From mugen-net
Revision as of 12:00, 24 April 2019 by Jesuszilla (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A projectile is an attack that uses an entity separate from the Player to damage the enemy. The most well-known example is Ryu's Hadouken.

The two most common ways to implement a projectile in M.U.G.E.N is through either the Projectile SCTRL, a Helper, or even a combination of both in order to maintain compatibility with older characters. In modern usage, nearly all projectiles are implemented through a Helper.

Behavior[edit]

Collision[edit]

In most fighting games, projectiles will cancel each other out when they collide with one another. In some cases, such as Art of Fighting, a stronger projectile might even completely absorb a weaker projectile and still continue to attack the enemy. In very rare cases, such as Mortal Kombat, projectiles may not collide with each other at all.

Reflection[edit]

Some characters, such as KOF's Athena Asamiya, have moves that can reflect projectiles, causing them to bounce back and hurt the initial attacker. This is typically done with a Helper that uses a ReversalDef to detect when it has been hit, and then takes appropriate action once another projectile comes in contact with the attack box. Not all projectiles can be reflected, however, and implementations may vary. There are two different types of reflections: True reflection and Generic reflection.

True Reflection[edit]

True reflection preserves the visual appearance and often, behavior, of a projectile that is reflected. Thus it appears to the players that the original projectile is simply turned around and changed to hit the player (or the team) that originally spawned it. Examples include Hotaru's Kobi-kyaku and Zero's Z-Shield.

Generic Reflection[edit]

Generic reflection spawns a new projectile owned by the character performing the reflection after the original collides with the Helper. Appearance and behavior of the original projectile are not preserved, as the projectile is a completely new entity altogether. Thus, the reflected projectile may look and behave completely differently from the original. This leads to more deterministic behavior, as typically each variant of the reflector spawns a projectile with a different speed and trajectory. Examples include Rose's Soul Reflect and Eagle's St. Andrews Green.

Summary[edit]

A short list of features provided with reflection types is summed up in the following table.

True Reflection Generic Reflection
Helper-based projectiles
Projectile-based projectiles
Original animation
Preserve current projectile state
Reflector wars

Projectile[edit]

The old way to spawn a projectile was by using the Projectile SCTRL. However, the behavior of the projectile is very limited, as the velocity, animation, and disappear time cannot change or be reset once the projectile has been spawned. However, since M.U.G.E.N was built around the existence of this controller, many triggers exist that allow the user to directly read some data about projectiles, such as the number of them that are in use, the contact time, hit time, and cancel time (time at which it collided with another projectile).

Helper[edit]

The most common method today to spawn a projectile is to use a Helper. Helpers have access to all the same features as a regular Player, meaning the behavior can be completely customized to handle reflection, dissipate time, change animation, complex velocities, and more. However, Helper-based projectiles cannot utilize the triggers relating to projectiles (such as NumProj and ProjHitTime), so this behavior must be recreated.

Due to lack of built-in methods to even detect whether or not a Helper is a projectile, the community aims to create a standard for Helper-based projectiles so that some common functionality can exist for purposes such as AI. One such proposed community-based implementation is Inktrebuchet's Projectile Detection Helper.