Yeah, I know it's not trivial. You'd have to apply some heuristics (that is, don't just pick a layout based on one frame, look at multiple frames and see what is the most coherent) but it still wouldn't be perfect.mkwong98 wrote:There are a few obstacles that I can think of:thefox wrote:It seems like something that could be done by looking at the connectedness of the hardware sprites at runtime (i.e., which ones appear next to others, and how often).
1. The object is moving near the edge of the screen and some of the tiles may go outside the screen. 2. The same tile appears multiple times in several poses of the same object.
3. Tiles within the same object overlap each other (various characters in Double Dragons II)
4. Tiles within the same object are not fixed relative to each other (white dragon in Castlevania)
5. Two objects appears to be connected (Mario holding a shell in SMB3)
6. Objects using the background layer
(1) Could be special-cased by placing less emphasis on stuff at the very edges of the screen.
(2) Not much can be done here, except to indicate to the user that the tile is shared. Or have some special code in the HD pack support that can "unshare" those tiles when it sees they are connected to some other known tiles.
I'd expect it to need some manual adjustment, but at least it could provide a starting point.