Simple clock. Moves around the screen and setup so that mouse movement of keystrokes cause it to exit out. I made it with the intention of having a screen saver and then I compressed it to 5. Probably could compress it more. Anyway here it is
hide mouse : set display mode 1024, 768, 32 : white as dword : grey as dword : red as dword : black as dword : white = rgb(255, 255, 255) : grey = rgb(150, 150, 150) : red = rgb(255, 0, 0) : black = rgb(0, 0, 0) : rad = 300 : x = screen width() / 2 : y = screen height() / 2 : set text size 48 : xmove = 1 : ymove = -1 : mx = mousex() : my = mousey() : do : cls : if mousex() <> mx or mousey() <> my : end : endif
for w = 1 to 200 : if keystate(w) = 1 : end : endif : next w : inc x, xmove : inc y, ymove : if x + rad > screen width() : xmove = -1 : endif : if x - rad < 0 : xmove = 1 : endif : if y + rad > screen height() : ymove = -1 : endif : if y - rad < 0 : ymove = 1 : endif
ink white, 0 : circle x, y, rad : ink grey, 0 : for z = 0 to 359 step 30 : ox = sin(z) * rad : oy = cos(z) * rad : ox2 = sin(z) * (rad - 60) : oy2 = cos(z) * (rad - 60) : line x + ox, y + oy, x + ox2, y + oy2 : next z : center text x, y + 50, get time$() : ink white, 0 : minox = sin((val(left$(right$(get time$(), 5), 2)) * -6) - 180) * rad : minoy = cos((val(left$(right$(get time$(), 5), 2)) * -6) - 180) * rad : line x, y, x + minox, y + minoy
if val(right$(left$(get time$(), 2), 8)) <= 12 : houox = sin((val(left$(right$(get time$(), 8), 2)) * -30) - 180) * (rad / 2) : houoy = cos((val(left$(right$(get time$(), 8), 2)) * -30) - 180) * (rad / 2) : line x, y, x + houox, y + houoy : else : hour = val(right$(left$(get time$(), 2), 8)) : dec hour, 12 : houox = sin(hour * -30 - 180) * (rad / 2) : houoy = cos(hour * -30 - 180) * (rad / 2) : line x, y, x + houox, y + houoy : endif
ink red, 0 : secox = sin((val(right$(get time$(), 2)) * -6) - 180) * rad : secoy = cos((val(right$(get time$(), 2)) * -6) - 180) * rad : line x, y, x + secox, y + secoy : ink grey, 0 : center text x, y - 224, "12" : center text x + 99, y - 193, "1" : center text x + 185, y - 123, "2" : center text x + 200, y - 25, "3" : center text x + 185, y + 74, "4" : center text x + 100, y + 153, "5" : center text x, y + 188, "6" : center text x - 99, y + 153, "7" : center text x - 185, y + 75, "8" : center text x - 200, y - 25, "9" : center text x - 185, y - 123, "10" : center text x - 100, y - 193, "11" : loop