Games with real time played?
Games with real time played?
Hello,
Are there any (MC) games where the (real) time played was shown? Not a countdown.
TIA
Edit: FYI I'm interested in studying how these clock mechanisms work in code and wonder if the FRAMES system var is always used, or if there are also methods with interrupts disabled.
Are there any (MC) games where the (real) time played was shown? Not a countdown.
TIA
Edit: FYI I'm interested in studying how these clock mechanisms work in code and wonder if the FRAMES system var is always used, or if there are also methods with interrupts disabled.
Last edited by XoRRoX on Wed Jan 03, 2024 11:54 am, edited 2 times in total.
-
- Manic Miner
- Posts: 530
- Joined: Thu Feb 03, 2022 11:05 pm
Re: Games with real time played?
Project Future springs to mind.
Re: Games with real time played?
My 256 bytes F1 pitstopsimulator.
On the ZX81 better known as
"Max Verstappen Formula 1 pitstop simulator "
On the ZX81 better known as
"Max Verstappen Formula 1 pitstop simulator "
Re: Games with real time played?
Nice, thank you. On further inspection, when losing a life and its animation, that time doesn't seem to be counted.
Perhaps not a real issue for my purposes though.
Re: Games with real time played?
(sorry but... what's a "MC game"?)
Micronaut One featured a working clock. Jet Set Willy had a clock but I think it's more like a countdown behaving like a clock.
Also, a few text adventures had a clock that triggered if you waited too long.
Micronaut One featured a working clock. Jet Set Willy had a clock but I think it's more like a countdown behaving like a clock.
Also, a few text adventures had a clock that triggered if you waited too long.
Re: Games with real time played?
Stonkers
Re: Games with real time played?
Machine Code, as opposed to BASIC.
Re: Games with real time played?
I think the Spectrum doesn't have any real time clock mechanism other than the interrupts or counting the CPU cycles.
Re: Games with real time played?
Atic Atac gives you a completion time at the end of the game.
Looking at @pobtastic's disassembly it seems to make use of FRAMES.
Looking at @pobtastic's disassembly it seems to make use of FRAMES.
My Speccy site: thirdharmoniser.com
- jpnz
- Manic Miner
- Posts: 324
- Joined: Tue Nov 14, 2017 4:07 pm
- Location: Hamilt[r]on - City Of The Future - NZ
Re: Games with real time played?
Impossible Mission - 6 hours to complete the task at hand
Re: Games with real time played?
Thank you, all.
I've implemented it. I'm updating FRAMES in IM2 and update my clock (Seconds/Minutes/Hours) every 50 count of FRAMES.
I've implemented it. I'm updating FRAMES in IM2 and update my clock (Seconds/Minutes/Hours) every 50 count of FRAMES.
Re: Games with real time played?
Without an intrupt I checked if low byte was larger equal to 50 (in case of missed intrupt), if so subtract 50 and increase highbyte.
Re: Games with real time played?
Sorry, I'm not quite understanding this.
Re: Games with real time played?
IM1 will do the update,
so you can check the update without an intruptroutine.
In case your code misses an intrupt you can use this test
Code: Select all
ld hl,23672 : 50th time counter
ld a,(hl)
sub 50
jr c,nosec
ld (hl),a ; new start counter
ld hl,seccount
inc(hl)
nosec
Re: Games with real time played?
I see. I'm either turning off interrupts or use IM2. And as far as I see the ROM part IM1 calls is also just updating FRAMES on the interrupt. So I'm now doing that instead in my IM2 routine.
- ParadigmShifter
- Manic Miner
- Posts: 671
- Joined: Sat Sep 09, 2023 4:55 am
Re: Games with real time played?
The interrupt routine also scans the keyboard and handles auto-repeat etc.
If you don't use the default interrupt you can put your frame counter anywhere (and it doesn't need to be 24 bits then either), you can safely use IY (unless you also call ROM routines), and ignore the sysvars entirely - gaining some more memory (again, assuming you don't use the ROM).
If you need to use the ROM you can stash IY (it's a constant) and restore it before calling the ROM anyway. You can't trash the sysvars then though unless you know which ones are important. You also can't return to basic if you trash the sysvars of course.
If you don't use the default interrupt you can put your frame counter anywhere (and it doesn't need to be 24 bits then either), you can safely use IY (unless you also call ROM routines), and ignore the sysvars entirely - gaining some more memory (again, assuming you don't use the ROM).
If you need to use the ROM you can stash IY (it's a constant) and restore it before calling the ROM anyway. You can't trash the sysvars then though unless you know which ones are important. You also can't return to basic if you trash the sysvars of course.