This is a simple version of a pocket pet thing. Its can be condensed even more and could be expanded to make it funner. The objective is to keep the pet alive.
health=30 ; stamina=10 ; higene=10 ; hunger=10 ; actions=1 ; lvl=1 ; didit=0 ; dim times#(5) ; time#=timer() ; for i=1 to 5 ; times#(i)=time#+10000 ; next i
sync on
sync rate 60
do
cls ; x=mousex() ; y=mousey()
ink rgb(255,255,255),0 ; circle 300,150,50 ; circle 280,145,10 ; circle 320,145,10 ; circle 280,149,3 ; circle 320,149,3 ; ellipse 300,160,5,10 ; ellipse 300,185,15,5 ; ellipse 300,300,100,100 ; ellipse 220,290,10,50 ; ellipse 380,290,10,50 ;
print "Health "+str$(health) : print "Stamina "+str$(stamina) : print "Higene "+str$(higene) : print "Hunger "+str$(hunger) : text 10,350,"Actions points: "+str$(actions)
if (x>=10 and x<=80 and y>=440 and y<=460) ; if (mouseclick()=1) ; didit=1 ; endif ; ink rgb(255,0,0),0 ; endif ; text 10,445,"Feed Pet"
if (x>=110 and x<=180 and y>=440 and y<=460) ; if (mouseclick()=1) ; didit=2 ; endif ; ink rgb(255,0,0),0 ; else ; ink rgb(255,255,255),0 ; endif ; text 110,445,"Wash Pet"
if (x>=210 and x<=280 and y>=440 and y<=460) ; if (mouseclick()=1) ; didit=3 ; endif ; ink rgb(255,0,0),0 ; else ; ink rgb(255,255,255),0 ; endif ; text 210,445,"Sleep Pet"
if (didit=1 and actions=1) ; didit=0 ; actions=0 ; hunger=hunger+1 ; endif ; if (didit=2 and actions=1) ; didit=0 ; actions=0 ; higene=higene+1 ; endif ; if (didit=3 and actions=1) ; didit=0 ; actions=0 ; stamina=stamina+1 ; endif
didit=0
if (times#(2)< time#); times#(2)=time#+20000 ; stamina=stamina-1 ; endif
if (times#(3)< time#); times#(3)=time#+10000 ; higene=higene-1 ; endif
if (times#(4)< time#); times#(4)=time#+15000 ; hunger=hunger-1 ; endif
if (times#(5)< time#); times#(5)=time#+5000 ; actions=actions+1 ; if (actions>lvl) ; actions=1 ; endif ; endif
health=stamina+higene+hunger ;
if (health<=0) ; cls ; print "Game over!" : endif
time#=timer()
sync ; LOOP
mfield