Author Topic: Short Intro Challenge 7 line tunnel  (Read 5790 times)

0 Members and 1 Guest are viewing this topic.

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Short Intro Challenge 7 line tunnel
« 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



Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Short Intro Challenge 7 line tunnel
« Reply #1 on: June 13, 2006 »
Rel that's mad :) Love it!
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Optimus

  • DBF Aficionado
  • ******
  • Posts: 2456
  • Karma: 128
    • View Profile
    • Optimouse Demo Site
Re: Short Intro Challenge 7 line tunnel
« Reply #2 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!!!
Challenge Trophies Won:

Offline Tetra

  • DBF Aficionado
  • ******
  • Posts: 2532
  • Karma: 83
  • Pirate Monkey!
    • View Profile
Re: Short Intro Challenge 7 line tunnel
« Reply #3 on: June 13, 2006 »
Wow, never knew that could be done, Good going on the compact code and great effect  :)
Challenge Trophies Won:

Offline zparticle

  • Atari ST
  • ***
  • Posts: 168
  • Karma: 11
    • View Profile
    • ScottShaver2000
Re: Short Intro Challenge 7 line tunnel
« Reply #4 on: June 13, 2006 »
That is totally amazing.  :'(

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: Short Intro Challenge 7 line tunnel
« Reply #5 on: June 13, 2006 »
Welldone   :||
Challenge Trophies Won:

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Re: Short Intro Challenge 7 line tunnel
« Reply #6 on: June 14, 2006 »
Thanks!
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Short Intro Challenge 7 line tunnel
« Reply #7 on: June 14, 2006 »
Now that is impressive, very nicely done  O0

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
Re: Short Intro Challenge 7 line tunnel
« Reply #8 on: June 14, 2006 »
Excellent  :||
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: Short Intro Challenge 7 line tunnel
« Reply #9 on: November 04, 2006 »
Respect very clever...bit late I know but , well you get my vote :-)
Challenge Trophies Won: