Author Topic: Little Demo  (Read 4497 times)

0 Members and 1 Guest are viewing this topic.

Offline Clanky

  • Laser Guided Memories
  • Amiga 1200
  • ****
  • Posts: 340
  • Karma: 16
  • kiss that sound that pounds your senses
    • View Profile
Little Demo
« on: December 12, 2006 »
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...

Code: [Select]
'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
« Last Edit: December 13, 2006 by ClanKy »
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Little Demo
« Reply #1 on: December 12, 2006 »
Makes me think of broken window panes :) Nice one.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Little Demo
« Reply #2 on: December 13, 2006 »
Argh!  My eyes.  My hangover...

Nice effect.

Jim
Challenge Trophies Won:

Offline Galileo

  • ZX 81
  • *
  • Posts: 22
  • Karma: 0
    • View Profile
Re: Little Demo
« Reply #3 on: September 05, 2014 »
It is a stunning effect. And with so few lines of code!  :clap: