Countdown Timer WORKING

User avatar
PewkoGames
Posts: 42
Joined: Thu Sep 13, 2018 9:16 am

Re: Countdown Timer WORKING

Post by PewkoGames » Wed Feb 20, 2019 11:50 am

Image
User avatar
MistSonata
Posts: 312
Joined: Fri Feb 16, 2018 7:10 am

Re: Countdown Timer WORKING

Post by MistSonata » Wed Feb 20, 2019 11:55 am

Make sure you set up "myTimer" in your hud correctly. It's case sensitive.
User avatar
PewkoGames
Posts: 42
Joined: Thu Sep 13, 2018 9:16 am

Re: Countdown Timer WORKING

Post by PewkoGames » Wed Feb 20, 2019 1:20 pm

Its fixed! Thank you!
User avatar
dale_coop
Posts: 3058
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Countdown Timer WORKING

Post by dale_coop » Wed Feb 20, 2019 1:26 pm

Bucket Mouse wrote:
Tue Feb 19, 2019 10:09 pm
Okay, that stops the timer during the text.....but it's still going during Victory. I don't know why FF is what we're comparing player1 to...what does FF represent?

If it's checking to see if the player isn't there, shouldn't the number be 00 instead? Of course, that doesn't work either.
The player1_object is set to #$FF when he's destroyed. But looks like it's not yet there.
What's module are you using? the maze? the simple platformer?
-----
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
Bucket Mouse
Posts: 288
Joined: Wed Mar 07, 2018 2:25 am

Re: Countdown Timer WORKING

Post by Bucket Mouse » Wed Feb 20, 2019 7:37 pm

dale_coop wrote:
Wed Feb 20, 2019 1:26 pm
Bucket Mouse wrote:
Tue Feb 19, 2019 10:09 pm
Okay, that stops the timer during the text.....but it's still going during Victory. I don't know why FF is what we're comparing player1 to...what does FF represent?

If it's checking to see if the player isn't there, shouldn't the number be 00 instead? Of course, that doesn't work either.
The player1_object is set to #$FF when he's destroyed. But looks like it's not yet there.
What's module are you using? the maze? the simple platformer?
The maze. What else should I try?
User avatar
dale_coop
Posts: 3058
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Countdown Timer WORKING

Post by dale_coop » Fri Feb 22, 2019 1:27 pm

You could modify Handle Player Win script, adding this code, just after the "DeactivateCurrentObject" line:

Code: Select all

LDA #$FF
STA player1_object
Then the timer code I proposed some days ago, should work.


PS: sorry guys for the late reply... I was on a flight back home (Japan -> Amsterdam -> France... about 16 hours). And now jet lagged (>_<)
-----
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
Bucket Mouse
Posts: 288
Joined: Wed Mar 07, 2018 2:25 am

Re: Countdown Timer WORKING

Post by Bucket Mouse » Sat Feb 23, 2019 6:17 am

dale_coop wrote:
Fri Feb 22, 2019 1:27 pm
You could modify Handle Player Win script, adding this code, just after the "DeactivateCurrentObject" line:

Code: Select all

LDA #$FF
STA player1_object
Then the timer code I proposed some days ago, should work.


PS: sorry guys for the late reply... I was on a flight back home (Japan -> Amsterdam -> France... about 16 hours). And now jet lagged (>_<)
I have interesting news. This didn't work either, so for kicks I tried temporarily erasing the entire contents of HandlePlayerWin to see what would happen. Nothing changed. THE GAME IS NOT USING HANDLEPLAYERWIN.

So what IS the game using that activates the victory animation? I entered CreateObject temp, temp1, #$10 into the Search box....and came up with nothing. Because, as it turns out, that particular bit is actually listed as #OBJ_PLAYER_VICTORY, not #$10.

Then I had to test out all the potential places where this code I needed could be hiding. Suspects were HandleNoMorePrizeTiles.asm, CreateVictoryObject.asm, and NoMorePrize_CreateVictoryObject.asm. I experimented with them all in that order, and of course, it was the very last one I was looking for. Pasting LDA #$FF into that code made the trick work.

BUT it bugs out the timer again. Maybe monkeying with player1_object was causing it.

Alternate strategy! I made a new variable called "ifVictoryNoTimer." I put it in the same places the player1_object check was. Then I put this into the beginning of WarpToScreen, to reset the trigger:

Code: Select all

    LDA #$00
STA ifVictoryNoTimer
Works now. Total time spent: over one hour
User avatar
dale_coop
Posts: 3058
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Countdown Timer WORKING

Post by dale_coop » Sat Feb 23, 2019 8:34 am

Glad you found out :)
-----
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
Bucket Mouse
Posts: 288
Joined: Wed Mar 07, 2018 2:25 am

Re: Countdown Timer WORKING

Post by Bucket Mouse » Sun Mar 03, 2019 11:21 pm

dale_coop wrote:
Sat Feb 23, 2019 8:34 am
Glad you found out :)
UPDATE: The timer displays on the Start and Win screens too, unless you use these checks:

Code: Select all

    LDA #$00
    CMP newScreen
    BEQ dontUpdateGameTimer
    
        LDA #$01
    CMP newScreen
    BEQ dontUpdateGameTimer
Be aware that once you do, you can't use screens 0,0 or 0,1 in the grid......because for some reason, they have the same numbers as the Start and Win screens, so the timer will no longer work on them.
User avatar
justadude
Posts: 28
Joined: Sun Jan 20, 2019 2:26 pm

Re: Countdown Timer WORKING

Post by justadude » Fri Mar 15, 2019 7:39 am

where do you write this script?
Post Reply