Hello,
I've encountered a strange glitch in a new project of mine that I was hoping to get help with.
It seems that some of the scanlines near the top of the screen aren't being displayed on certain backgrounds. This tends to get worse as the size of my game arrays increase. Strangely, this glitch has no impact on vram, which is perfect when viewed through VBA's map tool.
The game arrays are stored in sram to avoid soaking up all the ram (even though they really aren't that big with a mere 400 entries).
I'm not sure what's causing this problem, but I'm hoping someone else has encountered this before and can post some advice.
Thanks,
Metaedge
Missing Scanline Glitch
Missing Scanline Glitch
- Attachments
-
- glitch.png
- (35.12 KiB) Not downloaded yet
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Missing Scanline Glitch
This is screen tearing caused by updating graphics during screen draw time. It's difficult to offer specific advice without seeing exactly what you're doing but calling VBlankIntrWait immediately before drawing will ensure you're in the vblank period. Make sure to separate your game logic from your graphics updates too so you're not trying to calculate and draw at the same time. i.e. calculate all your player movements/collisions etc in one place before calling VBlankIntrWait then render your graphics appropriately.
Who is online
Users browsing this forum: No registered users and 0 guests