Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxTile priority rework #25

Open
TheLX5 opened this issue Jul 5, 2021 · 1 comment
Open

MaxTile priority rework #25

TheLX5 opened this issue Jul 5, 2021 · 1 comment
Labels
enhancement New feature or request technical debt

Comments

@TheLX5
Copy link
Contributor

TheLX5 commented Jul 5, 2021

It came to my mind that we could give people/devs the option of having priorities in their sprites by using the area at $0200 during sprite's processing.

1st suggestion:

$0220-$027F: MaxTile high priority
$0280-$02FF: MaxTile low priority
$0328-$03F7: MaxTile normal priority

2nd suggestion:

$03A0-$03CF: MaxTile high priority
$03D0-$03FF: MaxTile low priority
$0328-$039F: MaxTile normal priority

Those ranges would be flushed to their respective buffers after each sprite is processed, making it easier to mess with priorities while reserving the highest/max priority for other sprites.

The first one will provide a wide range of slots to mess with, but it'll also become slow to flush. The second one reduces the amount of tiles that can be drawn in a single priority while using SMW's original tables, but it will not mess with the upper half of the original OAM table.

Alternatively, it could be easier to work (and implement) with if there was some sort of flag that one could set in the sprite's code that determines to which buffer the $0328-$03F7 range will be flushed to. The flag would be reset after each processed sprite.

And finally, as you've noted, I also moved regular sprites to use normal priority by default. I think this is better than leaving them at the very back of the priority order, useful for things such as sprites behind a net having priority over sprites in front of a net (first castle)

I might be able to implement this myself, I'd just need some input to know if it's good or not.

@VitorVilela7
Copy link
Owner

I agree that something can be done for improvinvg legacy mode but I'm still thinking what would be the best way to go.

As for the sticking low -> normal priority, I think it's preferred to add a 5th buffer since putting sprites on the normal priority can be risky to the higher priority ones (Mario, cluster, etc., sprites) as it might happen of you no longer being able to select between appearing in front of all sprites or/and mario or/and cluster sprites or/and status bar

@VitorVilela7 VitorVilela7 added enhancement New feature or request technical debt labels Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request technical debt
Projects
None yet
Development

No branches or pull requests

2 participants