Dark Bit Factory & Gravity

GENERAL => Challenges & Competitions => Topic started by: relsoft on June 13, 2006

Title: Short Intro Challenge 7 line tunnel
Post by: relsoft on June 13, 2006
Just to show how to go around the line number limit....

Code: [Select]
'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



Title: Re: Short Intro Challenge 7 line tunnel
Post by: Shockwave on June 13, 2006
Rel that's mad :) Love it!
Title: Re: Short Intro Challenge 7 line tunnel
Post by: Optimus on June 13, 2006
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!!!
Title: Re: Short Intro Challenge 7 line tunnel
Post by: Tetra on June 13, 2006
Wow, never knew that could be done, Good going on the compact code and great effect  :)
Title: Re: Short Intro Challenge 7 line tunnel
Post by: zparticle on June 13, 2006
That is totally amazing.  :'(
Title: Re: Short Intro Challenge 7 line tunnel
Post by: Rbz on June 13, 2006
Welldone   :||
Title: Re: Short Intro Challenge 7 line tunnel
Post by: relsoft on June 14, 2006
Thanks!
Title: Re: Short Intro Challenge 7 line tunnel
Post by: TinDragon on June 14, 2006
Now that is impressive, very nicely done  O0
Title: Re: Short Intro Challenge 7 line tunnel
Post by: benny! on June 14, 2006
Excellent  :||
Title: Re: Short Intro Challenge 7 line tunnel
Post by: taj on November 04, 2006
Respect very clever...bit late I know but , well you get my vote :-)