• Welcome to Dark Bit Factory & Gravity.
 

Little Demo

Started by Clanky, December 12, 2006

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Clanky

not very long, but then again, not very good!  ::)
lol! don't know what attracts me to like this demo?
hope you enjoy.

EDIT: Changed the bit with the 3 line commands... duh! To one triangle command... much neater!
         Also, you can change the TRI value to change the amount of triangle being displayed...


'Black and White Tri Scroller
'Coded by Sir Johnah

open window 640,512

tri=100

dim x1(tri),y1(tri),x2(tri),y2(tri),x3(tri),y3(tri)

  for i=1 to tri
    x1(i)=ran(640):y1(i)=ran(512)
    x2(i)=ran(640):y2(i)=ran(512)
    x3(i)=ran(640):y3(i)=ran(512)
  next i

label loop
  setdrawbuf db
  db=1-db
  setdispbuf db
  clear window
  for i=1 to tri
    y1(i)=y1(i)+6
    y2(i)=y2(i)+6
    y3(i)=y3(i)+6
    if y1(i)>=512 then:y1(i)=0:x1(i)=ran(640):fi
    if y2(i)>=512 then:y2(i)=0:x2(i)=ran(640):fi
    if y3(i)>=512 then:y3(i)=0:x3(i)=ran(640):fi
    fill triangle x1(i),y1(i) to x2(i),y2(i) to x3(i),y3(i)
    j=1-j
    setrgb 1,250*j,250*j,250*j
    triangle x1(i),y1(i) to x2(i),y2(i) to x3(i),y3(i)
  next i
goto loop
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

Shockwave

Makes me think of broken window panes :) Nice one.
Shockwave ^ Codigos
Challenge Trophies Won:

Jim

Argh!  My eyes.  My hangover...

Nice effect.

Jim
Challenge Trophies Won:

Galileo

It is a stunning effect. And with so few lines of code!  :clap: