How to Properly Warp to Game Over Screen?

This is my game over screen (for now)Screenshot 2024-02-27 120435.png
I have my hurt with lives script set to warp when no lives. The warp is set to X=5, Y=14, which is where my game over screen claims to be located.

However, this is what happens when I warp:Screenshot 2024-02-27 120416.png
Might be worth noting that my game over screen is a detailed screen. What's going on here?
 

dale_coop

Moderator
Staff member
Make sure to set the "warp in screen location, x,y" correctly.
But also could be just the scrolling engine that glitches your screen during the warp (because you was scroling when you died).

You could try adding in your death code:
Code:
    ;; stop the scrolling :
    LDA scrollByte
    AND #%00111110
    ORA #%00000010
    STA scrollByte
    
    ;; stop the player:
    LDA #$00
    STA Object_h_speed_hi,x
    STA Object_h_speed_lo,x
    STA Object_v_speed_hi,x
    STA Object_v_speed_lo,x
    LDA xPrev
    STA Object_x_hi,x
    LDA yPrev
    STA Object_y_hi,x
    LDA Object_direction,x
    AND #%00001111
    STA Object_direction,x
 
Make sure to set the "warp in screen location, x,y" correctly.
But also could be just the scrolling engine that glitches your screen during the warp (because you was scroling when you died).

You could try adding in your death code:
Code:
    ;; stop the scrolling :
    LDA scrollByte
    AND #%00111110
    ORA #%00000010
    STA scrollByte
   
    ;; stop the player:
    LDA #$00
    STA Object_h_speed_hi,x
    STA Object_h_speed_lo,x
    STA Object_v_speed_hi,x
    STA Object_v_speed_lo,x
    LDA xPrev
    STA Object_x_hi,x
    LDA yPrev
    STA Object_y_hi,x
    LDA Object_direction,x
    AND #%00001111
    STA Object_direction,x
I figured it out. For some reason the warp out coordinates were wrong. Maybe I forgot to change them after I turned the game over screen into a detailed screen?
 
Top Bottom