Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Some Eyecandy's (DB)

Author
Message
MONOS
22
Years of Service
User Offline
Joined: 25th Oct 2002
Location: Outer Limits
Posted: 25th Oct 2002 18:17
REM Wormhole
REM by MONOS
REM
REM http://mic.ha.bei.t-online.de

sync on : sync rate 0 : hide mouse : randomize timer() : dim sin#(360)

dim cos#(360) : for a=0 to 360 : sin#(a)=sin(a) : cos#(a)=cos(a) : next a


rem Play with SIZE for speed!
size=25 : col=255/size : for b=1 to 4 : cls : for a=0 to size

if b=1 then ink rgb(256-a*col,256-a*col,256-a*col),0
if b=2 then ink rgb(256-a*col,0,0),0
if b=3 then ink rgb(0,256-a*col,0),0
if b=4 then ink rgb(0,0,256-a*col),0

circle size/2,size/2,a/2.0 : circle size/2+1,size/2,a/2.0 : next a : get image b,0,0,size+1,size+1 : next b

cls : pic=1 : start_x=rnd(320)+160 : start_y=rnd(240)+120 : click=1

x_vel=3 : y_vel=1


DO : if rnd(2)=1 then w=rnd(4)+31 else w=rnd(2)+21

for n=0 to 50 : for y=0 to 700 : angle=wrapvalue(angle+w) : x1=size*cos#(angle)+y*sin#(angle) : y1=size*sin#(angle)-y*cos#(angle)

paste image pic,start_x-x1,start_y+y1,1 : next y : sync : if counter 500 then x_vel=0-x_vel

if start_y 400 then y_vel=0-y_vel

next n : inc pic : if pic > 4 then pic=1

counter=wrapvalue(counter+20) : LOOP
MONOS
22
Years of Service
User Offline
Joined: 25th Oct 2002
Location: Outer Limits
Posted: 25th Oct 2002 18:19
Hmmm, The CODE-Button don't work here.....

MONOS
22
Years of Service
User Offline
Joined: 25th Oct 2002
Location: Outer Limits
Posted: 25th Oct 2002 18:23
Dammit....

if counter 500 then x_vel=0-x_vel
should be
if counter > 500 then x_vel=0-x_vel

and
if start_y 400 then y_vel=0-y_vel

if start_y > 400 then y_vel=0-y_vel

MONOS
22
Years of Service
User Offline
Joined: 25th Oct 2002
Location: Outer Limits
Posted: 25th Oct 2002 18:27
Last try:

REM SIN(thetic)
REM by MONOS
REM
REM http://mic.ha.bei.t-online.de

if check display mode(640,480,24) then set display mode 640,480,24 else set display mode 640,480,32

sync on : sync rate 0 : hide mouse : autocam off: randomize timer()

create bitmap 1,255,255 : dim value(3) : gosub Textur : objects=10 : count=1

for a=1 to objects : make object cube a,a*2 : texture object a,1 : set object a,1,0,0,0,0,0,0 : count=0-count

ghost object on a,count : next a

make object plain a,80,60 : set object a,1,0,0,0,0,0,0 : texture object a,2 : make object plain a+1,80,60 : set object a+1,1,0,0,1,0,0,0

texture object a+1,1 : backdrop off : move camera -30



DO : x1=wrapvalue(x1+1) : y1=wrapvalue(y1+1) : z1=wrapvalue(z1+1)

if x1=0 : count=0-count : inc counter : endif

if counter > 2 : counter=0 : gosub Textur :endif

for a=1 to objects : rotate object a,wrapvalue(x1+1*a),wrapvalue(y1+2*a),wrapvalue(z1+6*a) : next a

if count > 0 : show object a : hide object a+1 : copy bitmap 0,0,0,639,479,1,0,0,size/4-1,size/4-1 : get image 2,0,0,size/4,size/4

else : hide object a : show object a+1 : endif

SYNC : LOOP



Textur:

for a=255 to 0 step -3 : set gamma a,a,a : next a : size=rnd(200)+50

for x=0 to size : for y=0 to size : for a=1 to 3 : value(a) =127+64*sin(x*a)+64*sin(y*a) : next a

ink rgb(value(1),value(2),value(3)),0 : dot x,y : next y : next x : get image 1,0,0,size,size

get image 2,0,0,size,size : for a=0 to 255 step 5 : set gamma a,a,a : next a : return

The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 25th Oct 2002 22:16
For some reason the second one won't compile, it doesn't recognize 'Textur' as a label and gives an invalid syntax error. The first one is nice however .
MONOS
22
Years of Service
User Offline
Joined: 25th Oct 2002
Location: Outer Limits
Posted: 26th Oct 2002 03:29
Oh, the second one runs fine here....

But you can d/l the sources (9 at all, modemfriendly 6 kb ) here:

http://mic.ha.bei.t-online.de/20liner.zip

Login to post a reply

Server time is: 2024-11-21 13:06:05
Your offset time is: 2024-11-21 13:06:05