• Welcome to Dark Bit Factory & Gravity.
 

Short Intro Challenge 7 line tunnel

Started by relsoft, June 13, 2006

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

relsoft

Just to show how to go around the line number limit....

'7 line tunnel demo
'FreeBASIC pwnz!
'Relsoft

1 if i = 0 then screen 14, 32,1,1 else if i = 1 then  dim Tangle( 320, 240) else if i = 2 then dim Tdepth( 320, 240) else if i = 3 then dim Texture( 320, 240)
2 if x = 0 then randomize timer else i = (i + 1) and &H7FFFFFFF
3 for y = 0 to 239
4 for x = 0 to 319
5 if i = 1 then Tangle(x, y) = (int(atan2((120) - y, (160) - x) * 256 / 3.141593 )) else if i = 2 then Tdepth(x, y) =  (128 * 64 / (sqr((x-(160))*(x-(160)) + (y-(120))*(y-(120))))) else if i = 3  then texture(x, y) = (x or y) shl 16 or (x xor y)* i*2 shl 8 or (x or y)*i else if i > 3 then pset(x, y), texture(((Tangle(x,y) + (160* sin(i * .05))) and 255), ((Tdepth(x,y) + (i *.08 * 120)) and 255))
6 next x, y
7 if inkey$ ="" then 1




Challenge Trophies Won:

Shockwave

Shockwave ^ Codigos
Challenge Trophies Won:

Optimus

OMG! That's the way people do these stuff in 7 lines. Now I can understand the code more. With those if tricks. Slick. Marvelous!!!
Challenge Trophies Won:

Tetra

Wow, never knew that could be done, Good going on the compact code and great effect  :)
Challenge Trophies Won:

zparticle


Rbz

Challenge Trophies Won:

relsoft

Challenge Trophies Won:

TinDragon

Now that is impressive, very nicely done  O0

benny!

[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

taj

Respect very clever...bit late I know but , well you get my vote :-)
Challenge Trophies Won: