Language…
7 users online: 16-BitMario94, crm0622, Fiblizo, isaix, Klug, PixelFhacks,  xHF01x - Guests: 55 - Bots: 112
Users: 70,591 (2,469 active)
Latest user: Amoru

Explosive Crosshair V1.0

SMW Sprites → Explosive Crosshair V1.0

Submission Details

Name: Explosive Crosshair V1.0
Author: TheXander
Added:
Tool: PIXI
Type: Standard
Dynamic: No
Disassembly: No
Includes GFX: Yes
Description: Explosive Crosshair V1.0:

Description: This is are a crosshair sprite that you can make it move vertically/horizontally + when it checks contact with player, it'll start flashing and explode after a certain while! This come with a few options that let you make more interesting the behaviours of this custom sprite!

Features:
PIXI Support/Compatibility.
SA-1 Support/Compatibility.
JSON Support.
A documentation (Readme) file.
Extra Bit feature!
3 Extra Bytes with features!
Allow customize the sprite easily with a few defines!

More details are on the documentation (Readme) file!

Requested by  Anorakun
Tags: cross explosion lorom sa-1
Comments: 4 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 10.73 KiB | 173 downloads

Screenshots

Comments (4)

qantuum Link
No-scope madness!
FrostyLosty Link
Really cool, this would be perfect for some kind of infiltration level!
 zuccha Link
Simple sprite that does what's supposed to and pretty easy to customize.

One note: when !InteractionWithSprites is set to 1, crosshair explosions can trigger other crosshairs (good for chain reactions).

I made a few changes:
  • I converted the omnipresent LDA !RAM_ExplosionFlag,x : CMP #$01 : BNE label to LDA !RAM_ExplosionFlag,x : BEQ label, since the value of !RAM_ExplosionFlag,x is always either 0 or 1.
  • I simplified the branching after JSR CheckSprites.
  • I added a !ExplosionDuration setting to control the duration of the explosion (it was the only non-configurable value in the sprite).

Finally, a few suggestions for improvement:
  • With an additional extra byte and a few changes in the code you could make the crosshair move both horizontally and vertically.
  • You declared several defines for sprite tables, but not for all of them. The next time you can try to create defines for all of them, this not only makes the code more readable, but it can force you to understand what a sprite table is used for (especially if you're combining code from different sources).

Tested with Lunar Magic 3.50, PIXI 1.42, SA-1 Pack 1.40, Snex9x 1.62.3.
TheXander Author Link
Tiny update folks: I've added a new option for the sprite to be able doing sprite interaction: If the explosive crosshair collide with others sprites, he'll start the explosion routine :O