gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Mode 0 with 3 BG's and 1 Sprite Problem

#47814 - wbochar - Wed Jul 13, 2005 9:08 pm

I have a prog that uses BG0, BG1, BG2 with OBJ and OBJ1D with Mode 0

I was using just one BG and mode 0 with the sprites and it worked fine, but after some modifications and addintions of other tilesets and BG's my sprite seems to have gotten corrupted along the way.

I checked in vba and the sprite is successfully loaded in oam in the first slot. when I check the actual display there is a big black square on the screen. This feels like a wrong memory spot or somehting isnt being copied correctly etc. The code to hande the sprites has been the same through all my tests, so the addition of the extra backgrounds and tilesets seems to be my culprit..

Has this happened to anyone else? I have had 10 sprites bouncing around the screen before and I am using the same code that worked previously for other projects... I just cant seem to figure out whats going on. Any initial thoughts?

I am at work on break right now, so maybe when I get home I'll up the source. But TIA for anyone who might have any thoughts sans le code.

wolfgang

#47888 - Crs - Thu Jul 14, 2005 8:46 am

Hey,

Sounds like you are loading gfx in fine so would you check your sprites dont have the mosaic flag set, if they do and if you have not set the scale parameter it will usually result in a one colour square (because it is zoomed in too far).

Let me know how you get on :)

Chris.

#48322 - wbochar - Tue Jul 19, 2005 3:30 am

It was a few things, but it was the scale thing. I also was loading really large maps (2 of them) which just overlapped into sprite memory. They ahd set something funny in one of the sprites. It was kinda wierd results -- i thought something was funny when I noticed 2 other sprites down the line (at entry 25-27) that were dots.