COOL TRICK: How enemies can leave an impression

Bucket Mouse

Active member
Here's a little trick I stumbled upon by accident tonight. I had the destruction animation accidentally set to "Loop," so when enemies were destroyed, the "poof" effect just kept repeating over and over.

It wasn't what I wanted, but it looked kinda cool. Everything you killed just left an effect. Useless for my game, but it might work for someone.

It has other applications too. Make the final image a crater and make the animation play just once. The crater will stay there, so destroying the enemies would impact the environment.

Or if you were using a different kind of weapon, like a magic weapon, it could turn the enemy into something instead of killing it. I actually want to do this with my Projectile, but I'm not sure how to make the game discern different damage effects between the two weapons.
 

Mihoshi20

Member
Bucket Mouse said:
Here's a little trick I stumbled upon by accident tonight. I had the destruction animation accidentally set to "Loop," so when enemies were destroyed, the "poof" effect just kept repeating over and over.

It wasn't what I wanted, but it looked kinda cool. Everything you killed just left an effect. Useless for my game, but it might work for someone.

It has other applications too. Make the final image a crater and make the animation play just once. The crater will stay there, so destroying the enemies would impact the environment.

Or if you were using a different kind of weapon, like a magic weapon, it could turn the enemy into something instead of killing it. I actually want to do this with my Projectile, but I'm not sure how to make the game discern different damage effects between the two weapons.

I could see this being useful for an action RPG where when you kill say for example a mushroom monster they turn into a normal mushroom and stay on the screen, or for instance killing a normal monster where they poof into a pile of bones that then stay on the screen.
 

dale_coop

Moderator
Staff member
Yeah but need to take care of numbers of monsters/object on screen... it slowdown the game... and of course the number of sprites on scanline.
 

Mihoshi20

Member
dale_coop said:
Yeah but need to take care of numbers of monsters/object on screen... it slowdown the game... and of course the number of sprites on scanline.

It really shouldn't be any different then having 4 monsters on screen as you're not creating any more objects on screen then you already have. Simply just changing the monster animation to it's death one and leaving them on screen. So long as the monsters never line up in a row it wouldn't matter much. Since you can't ever have more then 4 monsters on screen at once anyhow, leaving them on screen won't make much difference. Though I haven't tested this on real hardware as of yet. One problem with this though is that monster lock doors will never open with this type of effect unless you also change their object type on death.
 

Bucket Mouse

Active member
Mihoshi20 said:
dale_coop said:
Yeah but need to take care of numbers of monsters/object on screen... it slowdown the game... and of course the number of sprites on scanline.

It really shouldn't be any different then having 4 monsters on screen as you're not creating any more objects on screen then you already have. Simply just changing the monster animation to it's death one and leaving them on screen. So long as the monsters never line up in a row it wouldn't matter much. Since you can't ever have more then 4 monsters on screen at once anyhow, leaving them on screen won't make much difference. Though I haven't tested this on real hardware as of yet. One problem with this though is that monster lock doors will never open with this type of effect unless you also change their object type on death.

I figure the doors WILL open because the game doesn't consider them alive -- unless the "poof" counts.

Right now all monster deaths have the same animation regardless of the weapon used. If I create a second animation type that has the desired effect at the end, how do I get the game to only play it when I'm using the projectile?

UPDATE: Found the hex for the projectile weapon...it's #%00000010. When the beam hits the monster the game needs to check which weapon was just fired. I don't know if it's in the memory at that point.

I'm unsure what the monster variable name is. My best guess is that it's "Object_type,x" but there are several other possibilities.

Code:
LDA Object_type,x
CMP #%00000010
BEQ EnemyProjState

EnemyProjState:  ;; this is a copy-paste of the code that loads the death animation, but it's set to #$11, where the alternate animation is
	LDX Object_type,x
	LDA Object_x_hi,x
	STA temp
	LDA Object_y_hi,x
	STA temp1
	CreateObject temp, temp1, #$11, #$00
	;; need to do this redundantly, otherwise, the death object will be in same slot as player
	LDX Object_type,x
 
Top Bottom