SOLVED: Graphical Issue with Map Sprites

I am having a bizarre graphical issue happen on a specific map, and I am wondering if anyone has encountered anything similar as it is driving me crazy.

Basically certain map sprites are not registering correctly and seem to spontaneously change after certain units attack for no reason. The biggest offenders are Bonewalkers (lance variant) and the green units, but it is happening to other units as well. It really isn’t consistent.

I have created an issue report that you can grab from the Dropbox link below.

Please let me know if you have any suggestion on how to fix this. Thank you.

Hey dude is it when you press them for thier walking animations or they walk??? @caladrius

No, it is nothing of the sort.

Nvm mind then hope your problem gets fixed

Thanks anyway. I have pretty much pinpointed this issue to only happening on one map, so I don’t believe it has to do with the AP value. I find it strange that a graphical issue regarding map sprites would only be happening in one place.

1 Like

I have been doing test after test after test for this, and I am still having issues pinpointing the exact problem.

I am starting to think that the problem could have something to do with enemy unit capacity as I encounter the error after creating more than 10 enemy units on the map. This feels really strange to me as I have used way more than 10 enemies on other maps before… It can’t be right. Loading units from other maps don’t seem to cause a problem though. No idea.

1 Like

Hey Caladrius, don’t know if this is a certain fix for you, but it may be worth looking into. I ran into a similar problem a while ago and got some good guidance on how to fix it.

For me, it wasn’t a matter of how many enemies there were, but rather, how many different classes were on the map (ally, enemy, player unit… all of them together). Every map sprite uses some of the emulator’s OAM, and if you exceed it, you can start to have funky stuff happen.

I’m not sure if you have NO$GBA, but it would be worth downloading it to see. When you load up your rom and get into whatever chapter is giving you problems, go to the Window tab and select OAM viewer:

From there, go over to the OBJ tab. Here, it will give you a rough graphic of the map sprites currently being used in the chapter.

image

What I found for myself is that the 8-16th rows are used for map sprites. If you have too many different map sprites in a chapter, you will run out of room in the OAM and strange graphical issues will start to happen (usually due to overlapping sprites). My guess is this is what is happening to you right now.

I’m sure someone more knowledgeable could add something more here, but for me, there were two fixes for this problem. The first was to just simply have less class diversity in the chapter. The second, while requiring slightly more work, is a better long term solution.

Some map sprites, both in the repository and even those in vanilla, use more OAM than they really need to. You can see this by loading the map sprite into some graphics software (I used Microsoft Paint). If you look at the OBJ viewer above, every square represents and 8x8 square of pixels. Most sprites that were efficiently made only need 16x16 pixels, some of them are larger vertically to accommodate larger sprites, but what you’ll see quickly in this viewer is that some sprites are too large for an unnecessary reason. Some vanilla sprites even use 32x32 pixels when they can easily fit into 16x16.

The fix is to edit the map sprites to fit into either 16x16 sections or 16x32, which means some minor adjustments to where the map sprite is placed (which I also did in Paint). Try to avoid having them any wider than 16 pixels… Many of the larger sprites are given extra space vertically instead (you can even see it above with the cavalry).

Hopefully this helps.

7 Likes

Just wanted to say this is a good post, you pretty much nailed it.

Learned from the best! Thanks

Thank you, @Sokaballa. This was most certainly the root of the problem.

I guess I never realized how much space the monster map sprites take up. I ended up going through and reducing a lot of their map sprite sizes. Half of them were 32x32 in size such as the Bael, and it can literally just fit in 16x16. After reducing many of the monster sprites, I have just barely enough space when deploying 15 different classes at 16x32 (largest player unit size).

Cool beans. Glad this helped to get you sorted!