Benimo12 2022-07-09 20:49
I was wondering if you can use Debug mode as a sort of HUD if you’ve used both backgrounds for your game.
Timo 2022-07-09 22:01
On old consoles they often used sprites for the hud, when there was no BG left.
Another trick is to use one BG for both a background layer and also for the hud by using different priorities.
Check my Mario demo. There are only two BGs, but they look like more.
McPepic 2022-07-10 01:18
Also, assuming your HUD takes up the entire width of the screen, you can use horizontal interrupts to prevent just the HUD from scrolling. This basically allows you to treat one background like multiple. It's usually used for parallax scrolling and I used it in my Link's Awakening Demo. Hope this helps.
nathanielbabiak 2022-07-10 01:50
I use a debug HUD for FPS. Just use the TRACE instruction 15 times per frame, and you can keep the text at the top left corner of the screen while debug is set.
Benimo12 2022-07-10 23:01
@Timo, the use of different priorities could work but only on a non-scrolling background.
@McPepic, haven’t done that in a long time but the problem is that it takes up RAM and CPU which will look fine on paper but will take up battery and overheat the system.
@nathanielbabiak, thanks for the suggestion but was also wondering how to clear debug screen to avoid it listing off the variable
@Timo, I’ll consider using sprites, thanks.
Thank you everyone
nathanielbabiak 2022-07-11 01:51 (Edited)
What I wrote addresses that, if you were to try it. I've attached an example showing this.
To clarify what I wrote above: run the TRACE instruction 15 times per frame to display something or clear the TRACED expressions from the last frame. You can leave the argument of the first TRACE instruction as "", an empty string, rather than displaying anything.
Timo 2022-07-11 11:02
Regarding raster effects: Don’t worry about overheating, LowRes NX does it anyway ;)
The idea is to have for example the first 8 raster lines without scrolling to show your HUD, and then set your scroll position for the background afterwards.
Benimo12 2022-07-11 11:18
@Timo Alright, will do