pvsneslib icon indicating copy to clipboard operation
pvsneslib copied to clipboard

Object IDs are not fixed when using map engine

Open mbh21 opened this issue 2 years ago • 2 comments

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 avatar Mar 08 '23 02:03 mbh21

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.

alekmaul avatar Mar 08 '23 04:03 alekmaul

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.

jeffythedragonslayer avatar Jun 06 '23 07:06 jeffythedragonslayer