Game Over Special Screen

User avatar
taluigi
Posts: 6
Joined: Mon Sep 23, 2019 9:13 pm
Location: Faro

Re: Game Over Special Screen

Post by taluigi » Fri Sep 27, 2019 6:45 pm

Just a very weird suggestion, can I just make a invisible sprite with a very slow animation. and when the animation ends in the "Game Over" screen (more like room lol), it restarts the game from the beginning?
User avatar
dale_coop
Posts: 5581
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Game Over Special Screen

Post by dale_coop » Fri Sep 27, 2019 10:40 pm

Just place a monster object with no graphics on the screen... set his Action Step 0 to 'ignore gravity" and "end of action" to "restart game"... with a timer of "10" (or more if you want).
It should work.
-----
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)
My son's game: KUBO 3
User avatar
taluigi
Posts: 6
Joined: Mon Sep 23, 2019 9:13 pm
Location: Faro

Re: Game Over Special Screen

Post by taluigi » Fri Sep 27, 2019 11:23 pm

...and it worked! I'm actually impressed that it does work naturally
Guess i'll use this trick more often, it's seem very helpful!
User avatar
dale_coop
Posts: 5581
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Game Over Special Screen

Post by dale_coop » Sat Sep 28, 2019 9:45 pm

Ah ah , glad it worked.
-----
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)
My son's game: KUBO 3
User avatar
Raftronaut
Posts: 340
Joined: Mon Sep 03, 2018 4:47 pm

Re: Game Over Special Screen

Post by Raftronaut » Fri Dec 06, 2019 4:21 pm

Could multiple warp points be utilized here to make an option to Continue or Reset?
Maybe re-purposing Mugi's stage selection method?

[url]http://nesmakers.com/viewtopic.php?f=40&t=1788[/url]


I am not quite ready to implement a continue system yet in my game, but I definitely appreciate continues in old games to help make the gameplay more fair. Maybe a worthy topic of further discussion ;)
Space Raft demo updates: [url]http://nesmakers.com/viewtopic.php?f=52&t=2867[/url]

Chiptune:[url] https://soundcloud.com/user-634230995-350638590 [/url]
User avatar
dale_coop
Posts: 5581
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Game Over Special Screen

Post by dale_coop » Fri Dec 06, 2019 4:56 pm

yeah, it would be doable...
Another possiblity, you could display:
(A) CONTINUE (B) RESET
and assign 2 different scripts to the corresponding buttons.
-----
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)
My son's game: KUBO 3
User avatar
baardbi
Posts: 127
Joined: Sun Jul 07, 2019 2:28 pm
Location: Norge

Re: Game Over Special Screen

Post by baardbi » Mon Jan 06, 2020 6:54 pm

Why isn't this working for me? I'm pretty sure I have done everything in the description here.

My character ends up in an undefined screen:

Image

My Game Over screen is screen number 254:

Image

Here are some screenshots from NESmaker. Have I messed up again? :oops: :oops:

Game Over variable:

Image

Script Settings:

Image

The PlayerLoseLife.asm code:

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	
User avatar
baardbi
Posts: 127
Joined: Sun Jul 07, 2019 2:28 pm
Location: Norge

Re: Game Over Special Screen

Post by baardbi » Mon Jan 06, 2020 7:17 pm

I see that I have written 254 instead of 255. So now I'm on the right screen, but my character is not deactivated, and can still be controlled on the Game Over screen.
User avatar
dale_coop
Posts: 5581
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Game Over Special Screen

Post by dale_coop » Mon Jan 06, 2020 8:17 pm

yep, exact... the constant value should be 255.
(In my game over, I display my player... he's spawned between walls of solid blocks)

But if you want something, better ;)
- in every input scripts you would like to disable... add this code at the begining:

Code: Select all

    ;; if on the GAME OVER screen
    LDA currentScreen
    CLC
    CMP #GAME_OVER_SCREEN
    BNE +
    RTS	;; skip the code
    +
    
- to make him disappear... modify the script assigned to the "Handle Sprite Drawing" element in the "Project Settings > Script Settings".
And after the "objectNotDeactivated:" line, add this block of code:

Code: Select all

	;; hide player when screen-type 255
	CPX player1_object
	BNE +
	LDA currentScreen
	CLC
	CMP #GAME_OVER_SCREEN
	BNE +
	RTS
	+
	
-----
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)
My son's game: KUBO 3
User avatar
baardbi
Posts: 127
Joined: Sun Jul 07, 2019 2:28 pm
Location: Norge

Re: Game Over Special Screen

Post by baardbi » Mon Jan 06, 2020 8:49 pm

Amazing! :) :) It works perfectly. Thank you so much for all your help Dale. I really appreciate it. :)
Post Reply