TASVideos

Tool-assisted game movies
When human skills are just not enough

Game Resources / G Bx / Alien Hominid

Player mechanics

As you control a character, it is important to know how your character works.

The game's internal numbers will be converted into pixels. The internal unit is equivalent to 1/1024 of a pixel.

Character positions and speeds are difficult to obtain in memory watch, as the game dynamically allocates the player object's stats using a linked list. A lua script is necessary to track your character after death or between stages.

Movement, left or right

When you hold left or right, the player accelerates 0.25 pixels/frame every frame. Maximum speed is 1.50 pixels/frame. Maximum speed when ducking is 0.75 pixels/frame.

When not holding either button or holding both left+right (no left+right glitches here), the player's speed is cut in half each frame. If you want to turn around quickly from full speed, it is beneficial to release for one or two frames, so as to cut the 1.5 speed to 0.75 in one frame instead of three, and down to 0.375 instead of 0.5 for the second frame.

However, if it is desired to advance the RNG, release for one frame, then hold the direction. This lets your speed hit exactly 0 for a frame, advancing the RNG once. Releasing for two frames then holding the direction will skip over the 0 speed, and this will not advance the RNG.

Dashes and backflips

Initiate a dash or a backflip by holding either left or right and pressing L. If the direction you press is the same direction the player is facing that frame, it will be a dash. If it's in the opposite direction, a backflip instead.

Dash: Forward + L, 3 pixels/frame, 26 frames (first frame at speed zero), ducking hitbox, advances RNG once
Backflip: Back + L, 2 pixels/frame, 18 frames, (first frame at speed zero), standing hitbox, does not affect RNG

As dashing is faster than walking, you are encouraged to roll when traveling.

You will exit the dash or backflip at speed zero. If you were ducking when you dashed or did a backflip, you will exit the animation in a ducking pose. The standing pose advances the RNG once, so if you did not want the RNG to advance as much, you may want to duck before dashing or backflipping.

Notably, during a dash or backflip, you may release B without losing charge. On exit of the animation, you may then press B to fire your gun without destroying your charge.

Jumps

Hit A to jump. You have no control over the player's height with the A button alone, as the alien will always attempt to jump high. The initial upward velocity is 4.50 pixels/frame, gravity pulls you down at 0.125 pixels/frame each frame, and maximum downward velocity is 4 pixels/frame.

Your horizontal velocity works exactly like with walking, same acceleration, same top speed. If you were ducking when you jumped, your max speed is equal to the ducking max speed, 0.75 pixels/frame, for the duration of the jump. You will land in the same standing or ducking pose as when you initiated the jump.

If standing on certain fall-through platforms, a ducking jump instead lets you drop through with an initial vertical velocity of zero. Your speed still maxes out at 0.75 pixels/frame throughout this fall, as it was done from a ducking pose.

When landing, you will be in a standing or ducking position for one frame, even if you are moving at non-zero speed. This will advance the RNG once if you did not duck when jumping.

You may release B without losing charge on the frame you jump, and on the frame you land. This enables you to shoot on the next frame while keeping the charge.

Weapon mechanics

All guns deal 1 damage per hit and grenades deal 3 damage per hit. Charged shots deal 5 to 10 damage depending on how long the charge was held.

Weapon related memory addresses

03000470 Weapon ID
03000472 Ammo left
03000474 Grenade count
03000476 Frames until you can fire again
03000478 Shots left to auto-fire (weapon ID 6 only)
0300047A Are you allowed to charge a shot by holding B?
0300047C Are you currently charging a shot?
0300047E Frames charged for charge shot

Quick stats

ID Appearance Ammo Projectiles Notes
0 Basic infinite Single shot Default weapon
Grenades have small hitbox
1 Green cloud 30 Cloud
2 Flame 60 Cloud + shot
3 Ice 60 Cloud + shot
4 Red slicey 60 Piercing shot
5 Big shot 60 Piercing shot
6 Purple auto-fire 240 3 auto-shots RNG rolled once per shot
Short enemy death animation
7 Spread 40 3 simultaneous shots RNG rolled three times per shot

Weapon cooldown

You can only fire your gun once per 8 frames. There is no cooldown for throwing grenades.

It is possible to reset the cooldown by changing weapons. This is done either by running out of ammo or by picking up a weapon power-up.

Charged shots

Hold the B button. You will begin charging once the weapon cooldown finishes. You can't begin charging until you have fired a shot -- Doing a different action that prevents you from firing (such as a backflip) will not allow you to initiate charge.

The amount of damage your charged shot deals depends on what address 0300047E happens to be at the moment.

Frames of charge
Address 0300047E
Effect
0 to 50 Nothing
51 to 71 5 damage
72 to 97 6 damage
98 to 127 7 damage
128 to 161 8 damage
162 to 199 9 damage
200 (maximum) 10 damage

Maintain charge while shooting uncharged shots

Under the following conditions, you may shoot without losing charge:
  • At the end of a dash or backflip
  • After the frame you jump
  • After the frame you come into contact with the ground
  • As you walk off a ledge

Simply release the B button during a dash or backflip. Once the animation finishes, press B to fire a shot without losing charge. Release B on the same frame you press A to jump, and you can shoot without losing charge. Find the frame you land, you can release B at that moment without losing charge, and you can fire on the next frame.

Cloud Stacking glitch

Named such for the use of the cloud effect of three weapons. The unusual thing about these weapons is the fact they leave a lingering hitbox unlike any other weapon. Even a grenade's explosion hits only for one frame.

The game keeps a list of things that has hit some enemy. This is to prevent the cloud from re-hitting the same enemy repeatedly. However, this list can only hold four objects. Once the boss takes damage from four other sources before the cloud disappears, the same cloud can hit the enemy again.

If one can get five clouds at once, the enemy will take five hits every frame, as by the time the next frame comes around, the first cloud has already been forgotten. As the cooldown normally only allows three clouds to exist at once, this will take some acrobatic weapon manipulation in order to get the power-ups necessary for repeated weapon switching to get around the cooldown. This is a particularly difficult trick to set up.

Even without stacking five clouds at once, having only three clouds will tend to increase the damage of every hit you deal by 1. This is achievable by merely shooting with usual TAS precision, and is a decent choice against some bosses.

RNG manipulation

The RNG address: 030019E0 (4 bytes)
Many things in the game depends on the random number generator. Are you going to get a good weapon? Will you have plenty of grenades to throw? Will the enemy spawn where you need them? Even the position of shots from certain guns are affected.

While it is true the player doesn't need any of those fancy weapons to win, it is true that in order to win fast, one is encouraged to always have the best weapon and enough grenades to kill stuff with.

RNG formula

NewRNG = RNG*0x19660D + 0x3C6EF35F
The result is cropped to within a 4-byte value. Every time a random number is needed, this formula is used to advance the RNG.

The RNG is rolled whenever the following happens:

  • Player character enters standstill animation
    The RNG rolls once. When the player goes to a standstill, gets up from ducking at zero speed, lands from a jump, or finishes whatever animation while standing still, the RNG is rolled once. By repeated ducking or wobbling, one can advance the RNG by 1 per 2 frames.

  • Player character initiates a dash (backflips do not affect the RNG)
    dashing by pressing L and holding the direction the character is facing will initiate a dash. The direction opposite would be a backflip instead, which doesn't advance the RNG.

  • Player shoots weapon 6; the purple auto-firing weapon
    One roll per shot. Determines height of shots. As you are compelled to shoot the other two shots, you're almost certain to advance the RNG three times.

  • Player shoots weapon 7; the spread shots
    Three rolls per shot. Determines a small X variance of shots. If you have this weapon or the above listed weapon, it can be used alongside ducking or wobbling to advance the RNG faster.

  • Random enemy spawns
    Whether it's the typical agent in many levels, scorpions of 3-1, or the panic runners of 3-4, the game randomly determines several factors relating to the new enemy, such as what edge of the screen to appear from.

  • Enemy figures out next action. Walk, roll, shoot, something
    Applies to the typical agents. Most other enemies aren't so random.

  • Random enemy is shot. Death animation, whether to drop a power-up, etc.
    The typical agents roll the RNG twice if hit by a bullet, or three times if hit by grenade or charged shot. Either case, the second roll determines whether an item drops.

  • Something on the screen, or the screen itself, is shaking, or other animation.
    Animation, mostly. You can trigger this by throwing a grenade at a building.

  • What power-up appears should one show up
    Whether a helpful kid hands you one, something pops out of the wrecked building, or an enemy you just shot dropped something, the game needs to determine what it is. It uses a "roll until success" system to determine what shows up, advancing the RNG a variable number of times.

Item drops

When killing something, that something is sometimes kind enough to drop a neat weapon for you. Some bits in the RNG must be cleared for it to happen. In particular, 0x000X0000 this digit is important:
  • Typical agent: 0 only
  • 3-4 panic runners: 0 or 8
  • 3-1 scorpions: 0 4 8 or C
  • Buildings: Not checked; will always drop.

Once a drop takes place, the game then makes repeated rolls until this next check succeeds. Again, it uses the same digit, 0x000X0000 to determine success, and this time, it needs to be 7 or F.

The number of failures determine what item finally drops:
0: Green cloud
1: Fire
2: Ice
3: Red slicey
4: Big shot
5: Purple auto-fire
6: Spread shot
7: 10-pack of grenades
8+: Loop back to 0

Some drops are rare. Rare enough that the RNG can be in a bad spot where even advancing it several hundred times won't allow a grenade drop from a random agent.

There are specific distinct RNG values that trigger a drop. From this, there are a specific number of failures to determine what drops. This number of failures can be tweaked with certain actions on the frame you kill the agent.

  • Killing the agent with a bullet: 0 RNG advance before type check
  • Kill using a charged shot or grenade: 1 RNG advance before type check
  • Kill two agents simultaneously with bullets: 2 RNG advance before type check


See also



Combined RSS Feed
GameResources/GBx/AlienHominid last edited by FatRatKnight on 2012-01-06 12:18:09
Page info and history | Latest diff | List referrers | View Source