Language…
11 users online: dh8d1, Dustyized, Finjii, Jolpengammler,  K.T.B.,  Losoall, Morph Moth,  Nanako, Pottsie, Shinmaru, Sixcorby - Guests: 79 - Bots: 96
Users: 70,507 (2,452 active)
Latest user: Dundorr

Phanto

SMW Sprites → Phanto

Submission Details

Name: Phanto
Author: Sonikku
Added:
Tool: PIXI
Type: Standard
Dynamic: No
Disassembly: No
Includes GFX: Yes
Description: This is the Phanto from SMB2.
It will chase the player when they hold a Key, but a custom version will flash and chase the player when they hold a Throw Block.

Additionally, this sprite contains a Generator sprite that can be used to spawn this sprite when the player holds the appropriate item. An UberASM version of the generator is also included.

Part of my SMB2 sprite standardization project; a project aiming to perfectly recreate the original enemies while adding new functionality.

Release History:
- 7/9/2023: V1.0 (C3 2023) - Initial Release.
- 7/16/2023: V1.01 - Fixed a crash when touching the sprite with a star.

Mod edit Feb. 11, 2025 -- compatiblity fix for UberASM Tool 2.0
Tags: key lorom phanto sa-1 smb2
Comments: 7 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 14.17 KiB | 355 downloads

Screenshots

Comments (7)

MegaSonic1999 Link
The generator isn't working. When I transport a key through a pipe, the generator doesn't spawn any phantos, even if the level is specified.
 1UPdudes Link
Just wondering if there is a way to make a Reverse Phanto that just chases you regardless?
Anas Link
Seconding this! I need to set it up for a collab I'm in.
MegaSonic1999 Link
For the uberasm code, When I carry a key through a pipe to where the code is set, the phanto doesn't spawn at all. I already checked the sprite values and the extra bytes, but no spawning. How can I fix that?
 zuccha Link
Not gonna lie, I'm not too happy about this submission.

The sprite itself works, but please note that the Phanto despawns rather quickly after going offscreen, which might not make it suitable for fast chases.

Concerning the API, I'm not too fond on how the sprite can be customized. The item that triggers the Phanto is specified indirectly via Extra Byte 1; the value specified there is then used to retrieve some generic settings (acceleration, palette) from table Settings in "Phanto.asm" and to determine the trigger item from table SpriteList, defined twice in "routines/PhantoGetCarried.asm" and "UberASM/library/SpawnPhanto.asm". In my opinion, this is more convoluted than needed and it would have been simpler to specify the trigger sprite directly via extra bytes, without having to go through three different tables.

The Phanto generator sprite also raises some questions. It features a PhantoLevelList table that tries to emulate UberASMTool's behavior (which makes me wonder why the UberASM code is there in the first place) and some generic settings. A far more flexible approach would have been letting the user customize the generator via extra bytes, exactly as in the plain sprite.

In addition to questionable customization choices, the submission had some critical bugs, too. First of all, the UberASM was broken, as the .SpriteList table was not closed correctly. Second, the GetSpriteList routine (which is used to determine if the player is holding the trigger sprite) had quite a few problems:
  1. The routine iterates starting from index .SpriteList_end-.SpriteList, but it should have started from .SpriteList_end-.SpriteList-3.
  2. The routine uses the second value in table SpriteList to determine if the sprite represented by index X is custom, but it should use !7FAB10,x instead.
  3. During each iteration, the routine does XBA to compare the high byte of A against the third value of SpriteList; however, it never does XBA after the comparison, so the value stored in the high byte is overridden during the next iteration of the loop.
  4. The routine accesses the SpriteList table as an absolute address without updating the data bank, which may cause misbehavior since the routine might be placed in a different bank by PIXI and UberASMTool, compared to the code that invokes it.

In addition to that, the GetSettings routine in "Phanto.asm" could be invoked once in the init code and store the result in !1510,x, instead of calling it repeatedly in main.

I fixed the aforementioned bugs, but I didn't change anything in how the sprite is being used. I also included a brief explanation on how to customize the Phanto. Added lorom and sa-1 tags.

Tested with: Lunar Magic 3.40, SA-1 Pack 1.40, PIXI 1.40, UberASMTool 1.6, Snes9x 1.62.3.
zacmario Link
- 7/16/2923: V1.01 - Fixed a crash when touching the sprite with a star.

Only 900 years for an update, not bad 🤪

Just jk, your sprites are awesome
Anas Link
That odd crash with star power is finally fixed, which is cool, but now I noticed for some reason the gen doesn't seem to work despite specifying the right sprite number. Am I missing something? I did put all the necessary routines in the right place. Thanks!