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

Object IDs are not fixed when using map engine #177

Open
mbh21 opened this issue Mar 8, 2023 · 2 comments
Open

Object IDs are not fixed when using map engine #177

mbh21 opened this issue Mar 8, 2023 · 2 comments

Comments

@mbh21
Copy link

mbh21 commented Mar 8, 2023

When moving across the map using map engine, objects take on different ids. Because ids are not fixed, then using functions such as oamSetVisible(id, OBJ_HIDE) does not allow you to target a specific object since the ID changes all the time.

For example, I set oamSetVisible(1, OBJ_HIDE) to hide my second object. Then when I move across the map different objects taking on an ID of 1. The problem ends up being that each of those other objects then become hidden as well.

It would be nice to be able to specify object IDs when using the map engine so that we can reference a specific ID in functions such as oamSetVisible.

@mbh21 mbh21 changed the title Fixed object IDs when using map engine Object IDs are not fixed when using map engine Mar 8, 2023
@alekmaul
Copy link
Owner

alekmaul commented Mar 8, 2023

I will check but I do not think it is possible because the goal of sprite engine is to be dynamic. The only thing that you can do is to know the order of the init of your sprite (for example, I always use hero of my game as 1st sprite) to refresh them.
I keep your request open but I do not think I will fix it.

@jeffythedragonslayer
Copy link
Contributor

What about an additional, simpler, static sprite engine?

There can only be 128 hardware sprites, and some games are simple enough to not have that many objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants