Mega-Metro-Vania Title Screen issues

5kids2feed

Well-known member
Hello there. It's me with another daily problem. I added a crude title screen to the mega-metro-vania game just to see what it does:

1.jpg

The hud is still showing even when I say hide hud:

1a1.jpg

Then when I press start to begin the game.. the main character has sprite issues until you move.. and that spot where you're always told you can't put enemies when you scroll because they wont show up has a weird graphic glitch:

1a.jpg
2.jpg

I've tried putting the Title Screen in the top rows and bottom rows to see if that was the issue.. but whatever I do it stays the same. What did I break this time? šŸ¤£
 

CutterCross

Active member
Hide Hud is a flag that affects background tile based HUDs only. You have a separate asm file for how the sprite HUD is handled.

The player graphic glitch is caused when warping from a screen with the hide player flag enabled to a screen with the hide player flag disabled. Quick solution would be to force the player's action step to your idle action step in your Post Screen Load.

The way screen loads work for scrolling games is that the screen you spawn on fully loads, then half of the screen to the right of you loads, followed by half the screen you the left of you. Pretty sure I've seen that specific graphic glitch come from spawning to a scrolling 16x16 metatile based set of screens from an 8x8 tile based screen, but I don't really work with NESmaker's scrolling engine so I don't remember off the top of my head.
 

PasseGaming

Active member
I've had that issue too. You need a buffer in-between those types of screens. In my case I used a screen that gave the stages name. Also, you can hide your hud by changing all the colors in the object palette to whatever your background color is going to be. In my case it was black.
 
Hi 5kids2feed, you got the same bug in your game that I did. I am calling it the Dead Zone Glitch. I asked the community for a solution and dale_coop came up with the solution. Here it is so you can fix your game too: (You need to make a Buffer Screen)

Solution for The Dead Zone glitch:

This is what I did:

1) I created a new (8x8) Start Screen in my Overworld.
2) I also created a new (8x8) Buffer Screen just in the same way as my Start Screen.
3) I set it to Warp to my new Buffer Screen. (Which is a just a normal screen. Before the Main Game, But there are a lot more settings used in this Screen Info Window for this new screen instead.)
4) I set the Left Edge Flag/ I set Right Edge Flag in my Screen Info window for my Buffer Screen room.
5) I also set the Hide Hud Flag and I set the Hide Sprite Flag too.
6) I set the Warp In coords and Warp Out to my first level of my game.
7) Lastly for this new Buffer Screen I had to set it to a new GameState and called it (Buffer Screen) and like with my Start Screen. I set the same Start Game, Input Script, so the player can Press Start on my Buffer Screen. In order to warp to my first level using that button.
8) The first level of my game started after the warp.
9) I ran past The Dead Zone when scrolling and it worked! The glitch had gone!

Thanks for all my replies to my question and thank you for dale_coop. Who came up with this solution, thanks!
 

vanderblade

Active member
For anybody stumbling across this thread without going through all the tutorials (which is why you're probably running into this issue on your title screen), make sure your doDrawSpriteHUD looks something like the below. Basically, you need to do a check for the gamestate and then tell the game not to draw the HUD except for main game state screens. Note: the values for drawing the HUD elements will be unique to your project.

Code:
LDA gameState
BEQ +
JMP skipDrawingSpriteHud
+
    
DrawSpriteHud #16, #16, #$78, #$03, #$76, myLives, #%00000001  ;;;; this draws lives

DrawSpriteHud #16, #24, #$79, #$05, #$77, myAmmo, #%00000000 ;; this draws ammo

skipDrawingSpriteHud
 

Barry2

Member
So after working on my tile screen, I used the code above and it worked great for my title screen, but now im having a trouble with my health not being taken away. My ammo will. My health is set to 3 and after 3 hits i will die like normal, but it doesn't take away any of my when being hit. Is there anyone else that have this issue?

;;; Here is an example of how to do a sprite hud.
;;; Arg5, the one that has the value of myVar, must correspond to a user variable you have in your game.
;;; Don't forget, you can only draw 8 sprites per scanline, so a sprite hud can only be 8 sprites wide max.



;DrawSpriteHud #$08, #$08, #$11, #$10, #$10, myVar, #$00
; arg0 = starting position in pixels, x
; arg1 = starting position in pixels, y
; arg2 = sprite to draw, CONTAINER
; arg3 = MAX
; arg4 = sprite to draw, FILLED
; arg5 = variable.
; arg6 = attribute

DrawSpriteHud #16, #16, #$78, #$03, #$76, myLives, #%00000001 ;;;; this draws lives

DrawSpriteHud #16, #24, #$79, #$05, #$77, myAmmo, #%00000000 ;; this draws ammo

This is what I'm using right now. I saved the first script, changed it to the other script but didnt take health away. So i tried to change it back and im still getting the same issue with my health not being taken away with a hurt tile or collision.

@dale_coop any ideas??
@vanderblade any thoughts on what i have done wrong
 
Last edited:

Cadet N

New member
I'm running into this issue too when trying to create a title screen in using the Scrolling Platformer base. The HUD won't disappear.
 

SciNEStist

Well-known member
as @vanderblade mentioned, since the hide hud checkbox only works for tile based huds, you need to add a bit of code to use it for the sprite hud as well. He explains how up above in HERE
 

DocNES

Member
I'm running into this issue too when trying to create a title screen in using the Scrolling Platformer base. The HUD won't disappear.

I tried out both codes in this link. They work great. Went with The Man dale_coop code, since it would "enable" the use of the Hide HUD Screen Flag that doesn't work by default in this module. :)
 
Last edited:

gabeswarr

Member
I've had that issue too. You need a buffer in-between those types of screens. In my case I used a screen that gave the stages name. Also, you can hide your hud by changing all the colors in the object palette to whatever your background color is going to be. In my case it was black.
Thank you so much!
 

TheRetroBro

Active member
Try to put this at the end of the extraScreenLoad file (right above doneWithExtraCheck) :
Good work around here. I created a tile that forces my action step to idol for these instances. unfortunately, I couldn't use your solution because I have an area of my game that uses a different action state and scrolls through several areas with a warp until switching back.
 

baardbi

Well-known member
For the Metroidvania module that causes a value out of range error.

View attachment 8003
Sounds like your ROM file is full (or at least bank $1F). If you haven't already you should check out this thread. It frees up a ton of space in bank $1F. If you're going to add more custom code you'll likely run into that error message again. But please backup your project before you make the changes (just in case).

 
Top Bottom