Joined
·
133 Posts
Hi,
I recently resurrected an old laptop and installed BASIC-256.
It took me back to playing around with my ZX Spectrum in the 1980s!
The laptop is running a Linux based operating system and I can't seem to get it to work with Windows based timing programs.
So I thought I'd have a go at making a timing program for rally stages myself!
You'll need to download and install BASIC-256 (see link above) for it to work and then copy and paste the program below.
The car is counted by pressing the right mouse button (an old mouse could be converted to attach a 'switch' to the start/finish line).
#Slot Rally Stage Timer 2011 v1.01
#written in BASIC-256
#by Alan Murrell
rallystagetimer:
cls
clg
colour red
rect 30,0,250,35
colour white
font "times" ,20,100
text 35,0, "Rally Stage Timer"
print "Move mouse to Graphics Output area"
say "move mouse 2 graphics output area"
say "how many laps"
input "How many laps?", distance
say distance+"laps"
starter=5
x=50
clg
countdownloop:
for x=50 to 260 step 52
if clickb=2 then goto falsestart
clickclear
colour red
circle x,50,25
say starter
starter=starter-1
pause 1
if starter<1 then goto start
next x
start:
if clickb=2 then goto falsestart
clickclear
colour green
for x=50 to 260 step 52
circle x,50,25
next x
say "go"
tenths=0
laps=distance
goto timeloop
falsestart:
cls
clg
colour red
font "times" ,20,100
text 35,0, "FALSE START"
pause 1
text 35,25, "RE-STARTING"
starter=5
x=50
pause 2
clickclear
cls
clg
goto countdownloop
timeloop:
#pause 0.06 represents 0.1 seconds please adjust to suit your pc
tenths=tenths+.1
if tenths<3.0 then laps=distance #ignores lap counting for first 3 seconds
colour red
font "times",25,100
text 0,100, "Time"
text 0,125, tenths
text 100,75, "Laps"
text 100,100,"remaining"
text 100,125, laps
If laps = 0 then goto results
if clickb=2 then laps=laps-1
clickclear
pause 0.06
clg
goto timeloop
results:
cls
print distance+" laps in "+tenths+" seconds"
say distance
say "laps in"
say tenths
say "seconds"
raceagain:
say "do you want to race again"
input "Do you want to race again? ",k$
if k$="y" then goto rallystagetimer
if k$="Y" then goto rallystagetimer
if k$<>"y" then goto clearscreens
if k$<>"Y" then goto clearscreens
clearscreens:
cls
clg
end
I recently resurrected an old laptop and installed BASIC-256.
It took me back to playing around with my ZX Spectrum in the 1980s!
The laptop is running a Linux based operating system and I can't seem to get it to work with Windows based timing programs.
So I thought I'd have a go at making a timing program for rally stages myself!
You'll need to download and install BASIC-256 (see link above) for it to work and then copy and paste the program below.
The car is counted by pressing the right mouse button (an old mouse could be converted to attach a 'switch' to the start/finish line).
#Slot Rally Stage Timer 2011 v1.01
#written in BASIC-256
#by Alan Murrell
rallystagetimer:
cls
clg
colour red
rect 30,0,250,35
colour white
font "times" ,20,100
text 35,0, "Rally Stage Timer"
print "Move mouse to Graphics Output area"
say "move mouse 2 graphics output area"
say "how many laps"
input "How many laps?", distance
say distance+"laps"
starter=5
x=50
clg
countdownloop:
for x=50 to 260 step 52
if clickb=2 then goto falsestart
clickclear
colour red
circle x,50,25
say starter
starter=starter-1
pause 1
if starter<1 then goto start
next x
start:
if clickb=2 then goto falsestart
clickclear
colour green
for x=50 to 260 step 52
circle x,50,25
next x
say "go"
tenths=0
laps=distance
goto timeloop
falsestart:
cls
clg
colour red
font "times" ,20,100
text 35,0, "FALSE START"
pause 1
text 35,25, "RE-STARTING"
starter=5
x=50
pause 2
clickclear
cls
clg
goto countdownloop
timeloop:
#pause 0.06 represents 0.1 seconds please adjust to suit your pc
tenths=tenths+.1
if tenths<3.0 then laps=distance #ignores lap counting for first 3 seconds
colour red
font "times",25,100
text 0,100, "Time"
text 0,125, tenths
text 100,75, "Laps"
text 100,100,"remaining"
text 100,125, laps
If laps = 0 then goto results
if clickb=2 then laps=laps-1
clickclear
pause 0.06
clg
goto timeloop
results:
cls
print distance+" laps in "+tenths+" seconds"
say distance
say "laps in"
say tenths
say "seconds"
raceagain:
say "do you want to race again"
input "Do you want to race again? ",k$
if k$="y" then goto rallystagetimer
if k$="Y" then goto rallystagetimer
if k$<>"y" then goto clearscreens
if k$<>"Y" then goto clearscreens
clearscreens:
cls
clg
end