Game Over Special Screen

angelcrusher
Posts: 7
Joined: Thu Feb 14, 2019 4:50 am

Game Over Special Screen

Post by angelcrusher » Sun Feb 17, 2019 5:54 am

Hello!

Coming back to the forums for what may be a simple tutorial request. In most classic NES games, when a character has run out of lives, they are taken to a Game Over screen which might ask if the player would like to continue? The player could also just be sent back to the title screen. I'm hoping that at some point in the future there may be an expansion of the tutorial on Special Screens including "Game Over". I think that "Start Game" and "Win Game" are crucial as well but since we're limited to those in the user interface, perhaps we could gain some insight into creating additional special screens, if possible.

Tower of Turmoil included some cool cutscenes which I'm sure were tailored to that game but I wonder if there are parallels between creating cutscenes, and sending a player to the Game Over screen or WinGame screen. At least a tutorial on creating a screen like "Game Over" and implementing
User avatar
dale_coop
Posts: 4376
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Game Over Special Screen

Post by dale_coop » Sun Feb 17, 2019 6:59 am

Make your "Game Over" screen... for example here I used the 254th one:
Image

In "Project Settings > User Constants", create a new constants named "GAME_OVER_SCREEN", and give it the value of the screen you chose, here "254":
Image

Now, modify your PlayeLoseLife.asm script, like
This :

Code: Select all

;;; do loss of life stuff here
    DEC myLives
    LDA myLives
    BNE gameNotOver
    ;;do gameover stuff here.  Warp to screen?  Show animation?  Just restart?
    ;JMP RESET
    LDA #GAME_OVER_SCREEN
    STA continueScreen
    
    LDA #$02
    STA temp1
    JMP isGameOver
    
gameNotOver:
    LDA #$04
    STA temp1
isGameOver:
    ;;;;;
    ;;; do warp to continue screen stuff here.
    LDA #$00
    STA newGameState
    LDA continueMap
    CLC
    ADC #$01
    STA temp
    GoToScreen continueScreen, temp, temp1    
    LDA #$00
    STA playerToSpawn
    ;LDX player1_object
    ;DeactivateCurrentObject    
    LDA #$01
    STA loadObjectFlag
    
    JSR DeactivateAllObjects
 
    LDA continuePositionX
    STA newX
    LDA continuePositionY
    STA newY    

    ;; player1 reset health:
    LDA #$03        ;;  <--- HERE reset with your Health value
    STA myHealth
And another things, here a script to RESET your game when you are on the Game Over screen:

Code: Select all

    ;; if on the GAME OVER screen
    LDA currentScreen
    CLC
    CMP #GAME_OVER_SCREEN
    BNE +
    JMP RESET
+
	RTS
You can assign this script to any button you want to use to reset the game.
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
Gilbertmaxter
Posts: 100
Joined: Tue Oct 16, 2018 3:04 am

Re: Game Over Special Screen

Post by Gilbertmaxter » Sun Feb 17, 2019 12:19 pm

Very nice dale :) may use this on my game.

Thank you
User avatar
Mihoshi20
Posts: 485
Joined: Tue Mar 06, 2018 11:47 pm

Re: Game Over Special Screen

Post by Mihoshi20 » Mon Feb 18, 2019 6:54 am

dale_coop wrote:
Sun Feb 17, 2019 6:59 am
Make your "Game Over" screen... for example here I used the 254th one:
Image

In "Project Settings > User Constants", create a new constants named "GAME_OVER_SCREEN", and give it the value of the screen you chose, here "254":
Image

Now, modify your PlayeLoseLife.asm script, like
This :

Code: Select all

;;; do loss of life stuff here
	DEC myLives
	LDA myLives
	BNE gameNotOver
	;;do gameover stuff here.  Warp to screen?  Show animation?  Just restart?
	;JMP RESET
	LDA #GAME_OVER_SCREEN
	STA continueScreen
	
gameNotOver:
	;;;;;
	;;; do warp to continue screen stuff here.
	LDA #$00
	STA newGameState
	LDA continueMap
	CLC
	ADC #$01
	STA temp
	GoToScreen continueScreen, temp, #$04	
	LDA #$00
	STA playerToSpawn
	;LDX player1_object
	;DeactivateCurrentObject	
	LDA #$01
	STA loadObjectFlag
	
	JSR DeactivateAllObjects
 
	LDA continuePositionX
	STA newX
	LDA continuePositionY
	STA newY	

	;; player1 reset health:
	LDA #$03		;;  <--- HERE reset with your Health value
	STA myHealth	
And another things, here a script to RESET your game when you are on the Game Over screen:

Code: Select all

    ;; if on the GAME OVER screen
    LDA currentScreen
    CLC
    CMP #GAME_OVER_SCREEN
    BNE +
    JMP RESET
+
	RTS
You can assign this script to any button you want to use to reset the game.
Not bad, seems you came to about the same conclusion I did. Though the way I handled it was to put a warp to screen in HandlePlayerDaeath.asm after the PlaySound entry and then used an NPC on the gameover screen that has a reset game as it's end action so that the gameover screen stays displayed for about...mmm.. maybe 7 seconds efore automatically going to reset. I also wanted to do an autotext message also before resetting but still looking into getting the right message displayed.
User avatar
dale_coop
Posts: 4376
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Game Over Special Screen

Post by dale_coop » Mon Feb 18, 2019 7:35 am

Great, I might had a timer too on my GameOver screen (for when the player doesn't press START after all ;))
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
chronicleroflegends
Posts: 190
Joined: Thu Sep 06, 2018 3:51 am

Re: Game Over Special Screen

Post by chronicleroflegends » Mon Feb 18, 2019 9:27 pm

If I wanted to use one of my map screens as a fake special screen like this, do you have any advice on how to get large graphics onto a normal map screen?

I just want to make a black screen with a big 'GAME OVER', but I am having trouble.
I'm using the Shiro Nes Screen tool with my graphics program to make the text, and I can make it into a tileset with the tool. But it keeps turning out too large to fit in a normal tileset.

I guess I can make the 'Game Over' text smaller, but I feel like there should be some way to do this.
~Do you believe in legends? ~
My Games: Nix: The Paradox Relic
User avatar
chronicleroflegends
Posts: 190
Joined: Thu Sep 06, 2018 3:51 am

Re: Game Over Special Screen

Post by chronicleroflegends » Tue Feb 19, 2019 12:43 am

Got it working!

Thanks, that looks awesome!
~Do you believe in legends? ~
My Games: Nix: The Paradox Relic
User avatar
dale_coop
Posts: 4376
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Game Over Special Screen

Post by dale_coop » Tue Feb 19, 2019 1:00 am

Glad you made it!
For bigger tileset, could be possible, but it would require deeper modifications of code puns might not be compatible with the NESMaker tool itself.
So sorry, currently, just try reducing your tiles to fit in your tileset ;)
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE / UNDERGROUND ADVENTURE (Arcade version - Byte-Off-2019)
User avatar
chronicleroflegends
Posts: 190
Joined: Thu Sep 06, 2018 3:51 am

Re: Game Over Special Screen

Post by chronicleroflegends » Wed Feb 20, 2019 2:22 am

Thanks, I did it and even though its simple, I think it looks really good.
~Do you believe in legends? ~
My Games: Nix: The Paradox Relic
angelcrusher
Posts: 7
Joined: Thu Feb 14, 2019 4:50 am

Re: Game Over Special Screen

Post by angelcrusher » Wed Feb 27, 2019 10:44 pm

Thanks Dale! Checking this out now. Awesome!
Post Reply