News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Sprite Something -- a player sprite injection tool

Started by Artheau, May 27, 2019, 12:59:18 AM

Previous topic - Next topic

Artheau

I was encouraged to come to the forum here to give information about an open-source tool that I have developed with help from Mike Trethewey that we have named "Sprite Something".  It is intended to be a viewer, extractor, and injector for player sprites in a number of retro games.

Of particular interest to this forum is that it can be used to replace the player sprite in Super Metroid.  It will work in the classic game, in randomized versions, in the combo randomizer, and honestly, probably any hack that has not been overly abusive to banks $92 and $9B.

A great deal of effort has been made to reduce the technical load on the artist.  All art is presented in a "What You See is What You Get" model.  There is a master PNG image, and if you draw into the outlined boxes in the PNG, that is what will appear in the game.  There is no more aligning of torsos with legs, worrying about a particular tile that is used in two separate contexts, trying to fit things into the overlapping tilemap shapes... none of this.  If it fits in the box, it fits in the game.  Additionally, the artist only needs to specify six palettes, and from these six palettes the rest of the player palettes are generated.  For example, there is no more worrying about how to correctly palette the purple colors for hyper beam, the precise shade of blue for speed booster, or how to get the sepia overtones right in the intro sequence -- this is all handled by the software.

A few other flavor features have been added, such as the ability to customize portions of the file select screen (in particular, the rotating helmet), and the color theme of Samus's ship.  Even if Samus is not replaced by a new sprite, the tool adds an animation for screw attack without space jump, and the crystal flash sillhouette textures have been reclaimed and re-paletted to show the interior image in full color.

To show that the tool works, I created a custom player sprite for Super Metroid which is Mega Man in the style of X.  This sprite demonstrates a number of customizations which are possible, such as custom cannon ports, color depth in the crystal flash animation, and a morphball which is... well... not a ball at all.

The tool can also extract the player graphics from existing ROMs.  To show this functionality, I extracted the Justin Bailey graphics from Auxmines's hack.  I also supply a version of the JB sheet in which I have replaced missing tiles, fixed many broken graphics, and inserted missing animations.

I maintain this tool along with a slowly increasing amount of documentation at https://github.com/Artheau/SpriteSomething.  There is a FAQ on the main page, and the software itself can be downloaded from the "Releases" tab.  You can also compile it from source, if you're into compiling things from source.

Up to this point I have bundled all of the created sprites with the software, when a new version is released.  I also keep a repository of the different sprite sheets that I have created at https://github.com/Artheau/PixelArt/tree/master/supermetroid.








Jiffy

This looks very interesting. I shall give this a try when I can.
I'm very keen on exporting the Samus graphics as an image, rather than having to edit pieces of poses individually.
What other features do you have planned?

Artheau

In the next big push, the effort will be focused on the viewer.  In a past version, we had all of the animations viewable through the window, with buttons that could select the different suits and effects.  However, the old version required the ROM to be present, and we made a design decision to make this program independent of the ROM, and so these animations are being converted to a JSON database.

So, in short, the next big push will be to make it so that artists can easily test their sprites without having to load the ROM every time a change is made.

Beyond that, we plan to make binary container files for these sprites (similar to ZSPR format for A Link to the Past), so that these custom sprites can be more easily added by randomizer programs.  All of the sprite insertion code was normalized so that different player sprites use the same internal mechanism for display, so that there are no timing differences between choices.

Steel Sparkle

#3
Very cool program!
Im gonna use that GF Trooper sprite and pretend its me in samus' role.
Love to immerse myself as the character in a game and this is a good compromise. Excellent job on this.

Crashtour99

Very interesting!  After reading through some of the files on your github, I'm glad to see people getting so much use out of the hard work that went into making the Master Animation disassembly.   :yay:
I have to ask though, what is the space usage like comparing the vanilla format to the reworking you've done in the animation engine?  It looks like the actual tilemap stuff could-be/has-been drastically reduced, while the space used in the actual gfx was expanded?

Artheau

Yes, I spent countless hours curled up with the master animation disassembly (thanks for your involvement in that), and then eventually migrated to PJ's logs in order to figure out how to fix broken animation code.
As for space usage, the number of tilemaps is considerably less, the number of DMA pointers is considerably more, and the tile graphics were moved into banks $E8-$F7 of the expanded region.  Classically the graphics reside in $9B-$9F.

Tetraspore

#6
Fantastic tool! Is the Power Suit really only different from the front compared to the Varia suit? I wish I could add more variety to the three suits in the game by giving them different sprites rather than just different palettes, but I'll work with what I've got if that's the case.

albert v.

pretty awesome stuff! I think it's time to do a crossover metroidvania!  :grin: I'll start messing around with this!  :lol:

Tetraspore

Gonna try and work on an updated Justin Bailey mod using a custom Zero Suit -> Samus Brawl mod and take screenshots of the animations in Brawlbox to use as the basis for my sprites. Will post my own thread if it works out! I hope I'm understanding this tool correctly-- Just edit the resource image with all of the blue boxes and import it into SM with this tool. Should be totally doable.