Yar's Revenge ASCII
I'm working on an homage to Yar's Revenge in ASCII. Here's my results so far.
randomize timer
screen 19,16,2
width 100,75
screenset 0,1
dim gameOver as integer
dim shared x as integer
dim shared y as integer
dim control as string
dim shared mousex as integer
dim shared mousey as integer
gameOver = 0
x = 10
y = 10
dim shared shieldx as single
dim shared shieldy as single
shieldx = 75
shieldy = 20
dim shared shieldmove as integer
shieldmove = 1
sub displayShield
if shieldmove then
shieldy += 0.2
if shieldy > 40 then shieldmove = 0
else
shieldy -= 0.2
if shieldy < 20 then shieldmove = 1
endif
color rgb(253,143,77)
locate int(shieldy),shieldx
print "#"
locate int(shieldy)+1,shieldx
print "#"
locate int(shieldy)+2,shieldx
print "#"
locate int(shieldy)+3,shieldx
print "#"
end sub
sub displayFly
locate y,x
print ">"
end sub
do while not gameOver
cls
for i = 1 to 75
for a = 40 to 50
locate i,a
colorr = int(rnd(1)*255)+1
colorg = int(rnd(1)*255)+1
colorb = int(rnd(1)*255)+1
color rgb(colorr,colorg,colorb)
if int(rnd(1)*10) then
print "#";
else
print " ";
endif
next a
next i
displayShield
displayFly
control = inkey
getmouse mousex, mousey
'if x < mousex/8+1 then x += 1
'if x > mousex/8+1 then x -= 1
'if y < mousey/8+1 then y += 1
'if y > mousey/8+1 then y -= 1
locate 1,1
print int(shieldy)
if multikey(32) then x += 1
if control ="q" then gameOver = 1
screencopy
sleep 50
loop




