home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ultimate Game Collection
/
XULTI.ISO
/
396
/
gravity.rpp
< prev
next >
Wrap
Text File
|
1996-12-08
|
885b
|
89 lines
{ Gravity by Keebler }
var x1:number;
var y1:number;
var x2:number;
var y2:number;
var x3:number;
var y3:number;
var xv:number;
var yv:number;
x1:= 25;
y1:= 5;
x2:= x1-10;
y2:= y1+20;
x3:= x1+10;
y3:= y1+20;
xv:=1.8;
yv:=0;
setcolor(154);
$MainLoop
delay(30);
{ change this to 0 for no trails }
setcolor(159);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
{ simulate gravity }
yv := yv + (1.6);
x1:= x1+xv;
y1:= y1+yv;
if (y1>179)
y1:=179;
yv:=yv*-1;
yv:=yv*0.9;
endif;
x2:= x1-10;
y2:= y1+20;
x3:= x1+10;
y3:= y1+20;
if (x3>319)
x3:=319;
endif;
if((y1=179)and(xv>0.05))
xv:=xv-0.05;
endif;
setcolor(154);
line(x1,y1,x2,y2);
line(x2,y2,x3,y3);
line(x3,y3,x1,y1);
if (xv<0.05)
end;
endif;
if (x3=319)
end;
endif;
goto $MainLoop