colorback (255)
cls
color (10)
locate(10,24)
put"Welcome to.........."
delay(1000)
cls
locate(10,5)
put"Guy Who Runs From ''Bad'' People Who May Or May Not Violently Execute Him"
delay(5000)
cls
put"Instuctions"
locate(5,1)
put"Get to the goal without being seen by enemies."
delay(2000)
cls
put"These are the enemies"
drawfilloval(500,200,50,50,yellow)
drawfilloval(500,200,10,10,red)
delay(3000)
cls
put"This is what the enemy looks like"
drawfilloval(500,200,50,50,yellow)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,yellow)
delay(500)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,yellow)
delay(500)
drawfilloval(500,200,10,10,red)delay(500)
drawfilloval(500,200,50,50,yellow)
delay(500)
drawfilloval(500,200,10,10,red)
delay(750)
cls
put"This is the area where he will see or hear you"
drawfilloval(500,200,50,50,yellow)
drawfilloval(500,200,10,10,red)
delay(1500)
drawfilloval(500,200,50,50,black)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,yellow)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,black)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,yellow)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,black)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,yellow)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,black)
drawfilloval(500,200,10,10,red)
delay(500)
drawfilloval(500,200,50,50,yellow)
drawfilloval(500,200,10,10,red)
delay(750)
cls
put"If you go into his area of vision, or hearing, you will be caught and killed"
%borrowed
delay(1500)
Draw.FillBox (0, 0, maxx, maxy, 255)
colorback (255)
color (10)
var zz : int := 1
for i : 1 .. 100
delay (50)
Draw.FillBox (100, 15, 100 + zz, 25, 54)
Draw.Box (100, 15, 200, 25, 1)
zz := zz + 1
locate (23, 13)
put "Loading... ", zz, "%" ..
end for
locate (23, 13)
put "Done Loading! " ..
delay(1000)
colorback(white)
cls
%main character
var a,b : int
a:=100
b:=100
%enemy 1
var a2,b2: int
a2:=500
b2:=200
%enemy 2
var a3,b3: int
a3:=200
b3:=100
%goal
var g1,g2 : int
g1:=620
g2:=370
var chars : array char of boolean
loop
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
drawfilloval(a,b,10,10,white)
b:=b+3
end if
if chars (KEY_RIGHT_ARROW) then
drawfilloval(a,b,10,10,white)
a:=a+3
end if
if chars (KEY_LEFT_ARROW) then
drawfilloval(a,b,10,10,white)
a:=a-3
end if
if chars (KEY_DOWN_ARROW) then
drawfilloval(a,b,10,10,white)
b:=b-3
end if
drawfilloval(a,b,10,10,red)
delay(10)
drawfilloval(a2,b2,50,50,yellow)
drawfilloval(a2,b2,10,10,red)
drawfilloval(a3,b3,50,50,yellow)
drawfilloval(a3,b3,10,10,red)
drawoval(620,370,20,20,black)
var distance := ((a2-a)*(a2-a) + (b2-b)*(b2-b))**0.5
var distance2 := ((a3-a)*(a3-a) + (b3-b)*(b3-b))**0.5
var distance3 := ((g1-a)*(g1-a) + (g2-b)*(g2-b))**0.5
var radius1:=10
var radius2:=50
var radius3:=20
%you take the square of differences of X coordinates and add
%a square of differences of Y coordinates then take a square
%root of the sum
%%%%%%
%I did (x)*(x) instead of x**2 because exponents is a function
%and it takes up more resourses then *, thus its faster
%Also **0.5 is the same as sqrt() - learn your math guys
if distance < radius1 + radius2
%might be a good idea to save radious1+radious2 as const/var
then
colorback(black)
cls
put"You have been spotted, the enemy has captured and killed you."
delay(2000)
exit
elsif distance2 < radius1 + radius2
then
colorback(black)
cls
put"You have been spotted, the enemy has violently executed you."
delay(2000)
exit
elsif distance3 < radius1 + radius3
then
colorback(black)
cls
put"You made it to the goal."
delay(2000)
exit
end if
end loop
cls
delay(1000)
quit
|