Qbasicnews.com
December 05, 2019, 05:44:24 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 [2] 3 4 ... 6
  Print  
Author Topic: wormhole  (Read 28882 times)
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #15 on: March 27, 2005, 02:08:56 PM »

Smiley Seems to like mine, which spirals into the screen were a black hole is...
Logged

Kevin (x.t.r.GRAPHICS)

Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #16 on: March 27, 2005, 02:10:12 PM »

Nice....sorry I couldn't see it Rattra :cry:
Logged

i]"But...it was so beautifully done"[/i]
DefHo
Member
*
Posts: 74



« Reply #17 on: March 28, 2005, 03:54:01 AM »

Here's my entry:

Code:
SCREEN 9
'This sets the first five colors to gray shade and the last eleven to white.
'For some reason SCREEN 9 wont let me change the other colors using OUT.
OUT 968, 0
FOR i = 0 TO 15
  OUT 969, i * 8 / 3
  IF i > 4 THEN PALETTE i, 7
NEXT
DEFINT A-Z
DIM x(50), y(50), z(50)
FOR i = 0 TO 50
  z(i) = i * 40
NEXT
p1 = 1
DO
 a! = a! + .05
 SWAP p1, p2
 SCREEN 9, 0, p1, p2   'This handy little trick switches between video pages.
 CLS
 FOR i = 0 TO 50
   z(i) = z(i) - 10
   IF z(i) < 0 THEN
      x(i) = COS(a!) * (100 + SIN(a!) * 50)
      y(i) = SIN(a!) * (100 + SIN(a! * 1.1 * 50))
      z(i) = z(i) + 2000
      furthest = i
   END IF
 NEXT
 FOR i = furthest TO 50  'Draw them in the right order.
   'Only draw if it's been going long enough for the circles to be in place.
   'Ugly, ugly line!
   IF a! > 10 THEN CIRCLE ((256 * (x(i) / (56 + z(i))) + 320), (256 * (y(i) / (56 + z(i))) + 175)), ABS((256 * (x(i) / (56 + z(i))) + 320) - (256 * ((x(i) + 200) / (56 + z(i))) + 320)), (2000 - z(i)) * .0075
 NEXT
 FOR i = 0 TO furthest - 1
   IF a! > 10 THEN CIRCLE ((256 * (x(i) / (56 + z(i))) + 320), (256 * (y(i) / (56 + z(i))) + 175)), ABS((256 * (x(i) / (56 + z(i))) + 320) - (256 * ((x(i) + 200) / (56 + z(i))) + 320)), (2000 - z(i)) * .0075
 NEXT
LOOP UNTIL LEN(INKEY$)  '33 lines not counting comments.




and some other wormholes that have way to many lines for this cahllenge:
Code:
DECLARE SUB ffix (Mode%)
DECLARE SUB flatpoly (x%(), y%(), c%, np%)
SCREEN 13


ffix 0

FOR i = 0 TO 63
 OUT 968, i
 OUT 969, i
 OUT 969, i
 OUT 969, i
 OUT 968, i + 64
 OUT 969, 0
 OUT 969, 0
 OUT 969, i
NEXT

DIM SHARED luy(199) AS LONG

FOR i = 0 TO 199
 luy(i) = i * 320
NEXT

DIM luc(6000, 2) AS INTEGER

FOR i = 0 TO 3000
 n = (3000 - i) * 63 / 3000
 luc(i, 0) = n
 luc(i, 1) = n + 64
 luc(i, 2) = n + 128
NEXT


DEFINT A-Z

REDIM scrn(32001)
scrn(0) = 2560
scrn(1) = 200

DEF SEG = VARSEG(scrn(2))

DIM SHARED offset AS LONG
offset = VARPTR(scrn(2))


REDIM SHARED span(199, 1)


DIM sine!(359), cosi!(359)
CONST pi = 3.14159

FOR i = 0 TO 359
 sine!(i) = SIN(i * pi / 180)
 cosi!(i) = COS(i * pi / 180)
NEXT

TYPE vector
 x AS INTEGER
 y AS INTEGER
 z AS INTEGER
END TYPE

DIM v(9, 9) AS vector
DIM cent(9) AS vector
DIM rx(9, 9), ry(9, 9)

FOR i = 0 TO 9
 cent(i).z = ((9 - i) * 100 + 100) * 3 + 3000
 FOR j = 0 TO 9
  v(i, j).x = cosi!(j * 36) * 190 + cent(i).x
  v(i, j).y = sine!(j * 36) * 190 + cent(i).y
  v(i, j).z = cent(i).z
 NEXT
NEXT

furthest = 0

zv = -50


t! = TIMER


DO
 zc = zc + 50
 a! = a! + .07
 b! = b! + .05
 cx = COS(a!) * 80
 cy = SIN(b!) * 60
 f = f + 1
 FOR i = 0 TO 9
  FOR j = 0 TO 9
   v(i, j).z = v(i, j).z + zv
  NEXT
  IF v(i, 0).z < 1 THEN
   furthest = i
   FOR j = 0 TO 9
    v(i, j).x = cosi!(j * 36) * 190 + cx
    v(i, j).y = sine!(j * 36) * 190 + cy
    v(i, j).z = v(i, j).z + 3000
   NEXT
  END IF
  FOR j = 0 TO 9
   rx(i, j) = 350 * (v(i, j).x / (v(i, j).z)) + 160
   ry(i, j) = 350 * (v(i, j).y / (v(i, j).z)) + 100
  NEXT
 NEXT
 ri = furthest
 FOR i = 0 TO 8
  ri2 = (ri + 1) MOD 10
  FOR j = 0 TO 9
   j2 = (j + 1) MOD 10
   x(0) = rx(ri, j)
   y(0) = ry(ri, j)
   x(1) = rx(ri, j2)
   y(1) = ry(ri, j2)
   x(2) = rx(ri2, j2)
   y(2) = ry(ri2, j2)
   x(3) = rx(ri2, j)
   y(3) = ry(ri2, j)
   IF zc + v(ri, j).z < 20000 THEN
    'IF (ri XOR j) AND 1 THEN
     c = (ri XOR j) AND 1
     flatpoly x(), y(), luc(v(ri, j).z, c), 4
    'END IF
   END IF
  NEXT
  ri = (ri + 1) MOD 10
 NEXT
 WAIT &H3DA, 8
 PUT (0, 0), scrn, PSET
 REDIM scrn(32001)
 scrn(0) = 2560
 scrn(1) = 200
LOOP UNTIL LEN(INKEY$) OR zc > 20000

fps! = f / (TIMER - t!)
SCREEN 0
PRINT fps!, zc
ffix -1

SLEEP

SUB ffix (Mode%) STATIC
'FFix by Dav,Plasma and v1ctor
IF Mode% = 0 THEN
    DIM isr(0 TO 5) AS LONG
    isr(0) = &H53EC8B55: isr(1) = &H83025E8B
    isr(2) = &H8E0602EB: isr(3) = &HC7260446
    isr(4) = &H79B9007: isr(5) = &HCF9B5D5B
    DEF SEG = 0
    OldISR1 = PEEK(&HF4)
    OldISR2 = PEEK(&HF5)
    OldISR3 = PEEK(&HF6)
    OldISR4 = PEEK(&HF7)
    POKE &HF4, VARPTR(isr(0)) AND 255
    POKE &HF5, (CLNG(VARPTR(isr(0))) AND &HFF00&) \ 256
    POKE &HF6, VARSEG(isr(0)) AND 255
    POKE &HF7, (CLNG(VARSEG(isr(0))) AND &HFF00&) \ 256

ELSE

DEF SEG = 0
POKE &HF4, OldISR1
POKE &HF5, OldISR2
POKE &HF6, OldISR3
POKE &HF7, OldISR4


END IF

END SUB

SUB flatpoly (x(), y(), c, np)

spanmin = 199
spanmax = -1

FOR i = 0 TO 199
 span(i, 0) = 320
 span(i, 1) = -1
NEXT

FOR i = 0 TO np - 1
 i2 = (i + 1) MOD np
 IF y(i) < y(i2) THEN
  sx! = x(i)
  ex! = x(i2)
  sy = y(i)
  ey = y(i2)
 ELSE
  sx! = x(i2)
  ex! = x(i)
  sy = y(i2)
  ey = y(i)
 END IF
 length = (ey - sy)
 IF length <> 0 THEN
  xinc! = (ex! - sx!) / length
 ELSE
  xinc! = 0
 END IF

 FOR y = sy TO ey
  IF spanmin > y THEN spanmin = y
  IF spanmax < y THEN spanmax = y
  IF y > 0 AND y < 199 THEN
   IF span(y, 0) > sx! THEN
    span(y, 0) = INT(sx!)
   END IF
   IF span(y, 1) < sx! THEN
    span(y, 1) = INT(sx!)
   END IF
  END IF
  sx! = sx! + xinc!
 NEXT
NEXT

IF spanmin < 0 THEN spanmin = 0
IF spanmax > 199 THEN spanmax = 199
FOR y = spanmin TO spanmax
 IF span(y, 0) < 0 THEN span(y, 0) = 0
 IF span(y, 1) > 319 THEN span(y, 1) = 319
 o& = offset + span(y, 0) + luy(y)
 FOR x = span(y, 0) TO span(y, 1)
  POKE o&, c
  o& = o& + 1
 NEXT
NEXT


END SUB



Code:

DECLARE SUB ffix (Mode%)
SCREEN 13

ffix 0

DIM luy(199) AS LONG

FOR i = 0 TO 199
 luy(i) = i * 320
NEXT

DEFINT A-Z

REDIM SHARED scrn(32001) AS INTEGER
scrn(0) = 2560
scrn(1) = 200

DIM SHARED offset AS LONG
offset = VARPTR(scrn(2))

DIM sine!(360), cosi!(360)

FOR i = 0 TO 360
 sine!(i) = SIN(i * 3.1415926535897# / 180)
 cosi!(i) = COS(i * 3.1415926535897# / 180)
NEXT

TYPE xyz
 x AS INTEGER
 y AS INTEGER
 z AS INTEGER
END TYPE

DIM cent(30) AS xyz

FOR i = 1 TO 30
 cent(i).x = cosi!(i * 12) * 40
 cent(i).y = sine!(i * 6) * 60 - 30
 cent(i).z = i * 1000 / 30
NEXT

DIM star(30, 60) AS xyz

FOR i = 1 TO 30
 FOR j = 1 TO 60
  star(i, j).x = cosi!(j * 6) * 100 + cent(i).x
  star(i, j).y = sine!(j * 6) * 100 + cent(i).y
  star(i, j).z = cent(i).z
 NEXT
NEXT

DEF SEG = VARSEG(scrn(2))

zv = 10

fade! = 0

t! = TIMER
FOR over = 1 TO 1500
 f = f + 1
 a! = a! + .01
 xc = SIN(a! * 2) * 100
 yc = (SIN(a!)) * 100
 IF fade! < 1 THEN fade! = fade! + .01
  FOR i = 1 TO 63
   OUT 968, i
   OUT 969, i * fade!
   OUT 969, i * fade!
   OUT 969, i * fade!
  NEXT
  FOR i = 1 TO 30
  FOR j = 1 TO 60
   star(i, j).z = star(i, j).z - zv
   IF star(i, j).z < 1 AND over < 1400 THEN
    IF over < 1250 THEN
      star(i, j).z = star(i, j).z + 1000
      star(i, j).x = cosi!(j * 6) * 100 + cent(i).x
      star(i, j).y = sine!(j * 6) * 100 + cent(i).y
    END IF
    IF over >= 1250 THEN
      star(i, j).x = INT(RND * 2000 - 1000)
      star(i, j).y = INT(RND * 500 - 250)
      star(i, j).z = 1000 - INT(RND * 20)
    END IF
   END IF
   IF star(i, j).z < 1 THEN star(i, j).z = 1
   rx = 256 * ((star(i, j).x + xc) / (10 + star(i, j).z)) + 160
   ry = 256 * ((star(i, j).y + yc) / (10 + star(i, j).z)) + 100
   IF rx >= 0 AND rx < 320 AND ry >= 0 AND ry < 200 THEN
    c = (1000 - star(i, j).z) / 600 * (((j / 4) AND 1) * 24 + 16)
    POKE offset + rx + luy(ry), c
   END IF
  NEXT
 NEXT
 PUT (0, 0), scrn, PSET
 REDIM scrn(32001) AS INTEGER
 scrn(0) = 2560
 scrn(1) = 200
 IF LEN(INKEY$) THEN EXIT FOR
NEXT

fps! = f / (TIMER - t!)

ffix -1

SCREEN 0
PRINT fps!
SLEEP

DEFSNG A-Z
SUB delay (n)
t! = TIMER * 100
DO
LOOP WHILE TIMER * 100 - t! < n
END SUB

DEFINT A-Z
SUB ffix (Mode%) STATIC
'FFix by Dav,Plasma and v1ctor
IF Mode% = 0 THEN
    DIM isr(0 TO 5) AS LONG
    isr(0) = &H53EC8B55: isr(1) = &H83025E8B
    isr(2) = &H8E0602EB: isr(3) = &HC7260446
    isr(4) = &H79B9007: isr(5) = &HCF9B5D5B
    DEF SEG = 0
    OldISR1 = PEEK(&HF4)
    OldISR2 = PEEK(&HF5)
    OldISR3 = PEEK(&HF6)
    OldISR4 = PEEK(&HF7)
    POKE &HF4, VARPTR(isr(0)) AND 255
    POKE &HF5, (CLNG(VARPTR(isr(0))) AND &HFF00&) \ 256
    POKE &HF6, VARSEG(isr(0)) AND 255
    POKE &HF7, (CLNG(VARSEG(isr(0))) AND &HFF00&) \ 256

ELSE

DEF SEG = 0
POKE &HF4, OldISR1
POKE &HF5, OldISR2
POKE &HF6, OldISR3
POKE &HF7, OldISR4


END IF

END SUB



Code:
DECLARE SUB ffix (Mode%)
SCREEN 13

ffix 0

DIM luy(199) AS LONG

FOR i = 0 TO 199
 luy(i) = i * 320
NEXT

DEFINT A-Z

REDIM SHARED scrn(32001) AS INTEGER
scrn(0) = 2560
scrn(1) = 200

DIM SHARED offset AS LONG
offset = VARPTR(scrn(2))

DIM sine!(360), cosi!(360)

FOR i = 0 TO 360
 sine!(i) = SIN(i * 3.1415926535897# / 180)
 cosi!(i) = COS(i * 3.1415926535897# / 180)
NEXT

TYPE xyz
 x AS INTEGER
 y AS INTEGER
 z AS INTEGER
END TYPE


DIM star(30, 120) AS xyz

xr = 40
yr = 60

DIM xc(99) AS SINGLE
DIM yc(99) AS SINGLE

FOR i = 99 TO 0 STEP -1
  xa = (xa + 2) MOD 360
  ya = (ya + 1) MOD 360
  xc(i) = cosi!(xa) * xr
  yc(i) = sine!(ya) * yr
NEXT


FOR i = 1 TO 30
 FOR j = 1 TO 120
  star(i, j).x = cosi!(j * 3) * 100 + xc((30 - i) * 99 / 30)
  star(i, j).y = sine!(j * 3) * 100 + yc((30 - i) * 99 / 30)
  star(i, j).z = i * 1000 / 30
 NEXT
NEXT

DEF SEG = VARSEG(scrn(2))


zv = 10

fade! = 0

t! = TIMER

DO
 f = f + 1
 IF fade! < 1 THEN fade! = fade! + .01
  FOR i = 1 TO 63
   OUT 968, i
   OUT 969, i * fade!
   OUT 969, i * fade!
   OUT 969, i * fade!
  NEXT

  xa = (xa + 2) MOD 360
  ya = (ya + 1) MOD 360
  xc(0) = cosi!(xa) * xr
  yc(0) = sine!(ya) * yr

  IF f MOD 10 = 0 THEN
   xr = xr + 1
   yr = yr + 1
  END IF

 
  FOR i = 99 TO 1 STEP -1
   xc(i) = xc(i - 1)
   yc(i) = yc(i - 1)
  NEXT

  FOR i = 1 TO 30
  FOR j = 1 TO 120
   star(i, j).z = star(i, j).z - zv
   IF star(i, j).z < 1 AND f < 1400 THEN
    IF f < 1250 THEN
      star(i, j).z = star(i, j).z + 1000
      star(i, j).x = cosi!(j * 3) * 100 + xc(0)
      star(i, j).y = sine!(j * 3) * 100 + yc(0)
    END IF
    IF f >= 1250 THEN
      star(i, j).x = INT(RND * 2000 - 1000)
      star(i, j).y = INT(RND * 500 - 250)
      star(i, j).z = 1000 - INT(RND * 20)
    END IF
   END IF
   IF star(i, j).z < 1 THEN star(i, j).z = 1
   rx = 256 * ((star(i, j).x - xc(99)) / (10 + star(i, j).z)) + 160
   ry = 256 * ((star(i, j).y - yc(99)) / (10 + star(i, j).z)) + 100
   IF rx > -1 AND rx < 320 AND ry > -1 AND ry < 200 THEN
    c = (1000 - star(i, j).z) / 600 * (((j / 4) AND 1) * 24 + 16)
    POKE offset + rx + luy(ry), c
   END IF
  NEXT
 NEXT
 PUT (0, 0), scrn, PSET
 REDIM scrn(32001) AS INTEGER
 scrn(0) = 2560
 scrn(1) = 200
LOOP WHILE INKEY$ = "" AND f < 1500


fps! = f / (TIMER - t!)

SCREEN 0
PRINT fps!
ffix -1
SLEEP

DEFSNG A-Z
SUB delay (n)
t! = TIMER * 100
DO
LOOP WHILE TIMER * 100 - t! < n
END SUB

DEFINT A-Z
SUB ffix (Mode%) STATIC
'FFix by Dav,Plasma and v1ctor
IF Mode% = 0 THEN
    DIM isr(0 TO 5) AS LONG
    isr(0) = &H53EC8B55: isr(1) = &H83025E8B
    isr(2) = &H8E0602EB: isr(3) = &HC7260446
    isr(4) = &H79B9007: isr(5) = &HCF9B5D5B
    DEF SEG = 0
    OldISR1 = PEEK(&HF4)
    OldISR2 = PEEK(&HF5)
    OldISR3 = PEEK(&HF6)
    OldISR4 = PEEK(&HF7)
    POKE &HF4, VARPTR(isr(0)) AND 255
    POKE &HF5, (CLNG(VARPTR(isr(0))) AND &HFF00&) \ 256
    POKE &HF6, VARSEG(isr(0)) AND 255
    POKE &HF7, (CLNG(VARSEG(isr(0))) AND &HFF00&) \ 256

ELSE

DEF SEG = 0
POKE &HF4, OldISR1
POKE &HF5, OldISR2
POKE &HF6, OldISR3
POKE &HF7, OldISR4


END IF

END SUB




Enjoy Smiley
Logged

hat were we arguing about again?
TheBigBasicQ
*/-\*
*****
Posts: 4550



WWW
« Reply #18 on: March 28, 2005, 12:35:52 PM »

What the hell was that? =P Nice program dude. Next time please put a link :roll:
Logged
DefHo
Member
*
Posts: 74



« Reply #19 on: March 28, 2005, 02:09:51 PM »

Quote from: "TBBQ"
Next time please put a link :roll:

Yeah, sorry about that. I don't have access to a web page at the moment so I wouldn't  have anything to link to.
Logged

hat were we arguing about again?
xteraco
Ancient QBer
****
Posts: 450



WWW
« Reply #20 on: March 28, 2005, 08:15:41 PM »

hey, kool entry's DefHo, if you need a place to stash some files, i got an uploads section on my webpage.. just upload the files and you can link em anywhere... just remember, whatever you upload is shared with all, so if its soemthing private.... dont put it on..here's the link

http://68.102.38.232:8080/upload

-cheers


btw, official compo end date is april 5  :wink:  and official prize is, well, nothing but pride..lol..
Logged

url=http://www.random-seed.net][/url]
Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #21 on: March 28, 2005, 09:50:22 PM »

Yo! Those were EXCELLENT! Cheesy Nice work!
Logged

i]"But...it was so beautifully done"[/i]
xteraco
Ancient QBer
****
Posts: 450



WWW
« Reply #22 on: March 28, 2005, 10:20:38 PM »

wow  Shocked  all very beautiful...stunning!!! absolutly brilliant  :bounce:
Logged

url=http://www.random-seed.net][/url]
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #23 on: March 29, 2005, 02:30:49 PM »

Shocked AH! I'm being sucked thru my screen!!!

Those were alsome...... :wink:

At least I had the start of point, the black hole, heh....
*Goes back to drawing board(FB)* :lol:
Logged

Kevin (x.t.r.GRAPHICS)

Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #24 on: March 29, 2005, 03:46:18 PM »

Smiley I have yet another:

Code:
PRINT "(F)ull screen /(W)indow" 'Standard PRINT
DO 'Start wait LOOP
   press$ = INKEY$ 'Promt INKEY$
LOOP UNTIL press$ <> "" 'LOOP until keypress
'Check for F, if ture set FullScreen
IF UCASE$(press$) = "F" THEN SCREEN 19, 32, 2, 1
'Check for W, if true set Window
IF UCASE$(press$) = "W" THEN SCREEN 19, 32, 2, 0
'Check for other presses, if true, then END
IF UCASE$(press$) <> "F" AND UCASE$(press$) <> "W" THEN END
x = 20 'Set X cord
y = 20 'Set Y cord
z = 0 'Set Z cord
ang = 0 ' Set Angle
LENS = 256 'Set camera
T! = TIMER 'Set Start time..
DO
   press$ = INKEY$ ' Promt INKEY$
   rang! = ang * 3.41/ 180 'Degrees to Radians
   cosz! = COS(rang!) 'Set COS
   sinz! = SIN(rang!) 'Set SIN
   
   z = z + 1 'Add Z cord
   Dist = LENS - z 'Set Distant
   IF z > 256 THEN z = 0 'Reduce Z cord on reaching camera
           
   Tx! = x 'Store X
   Ty! = y 'Store Y
   sx! = (Tx! * cosz!) - (Ty! * sinz!) 'Rotate X on Z
   sy! = (Ty! * cosz!) + (Tx! * sinz!) 'Rotate Y on Z
   
   IF Dist > 0 THEN 'Check Distance
      xp = 400 + (LENS * sx! / Dist) 'New X
      yp = 300 - (LENS * sy! / Dist) 'New Y
   ELSE 'Prevent divide by 0
END IF 'End if, like it says ;D
ang = ang + av 'Rotate angle
IF ang = 0 THEN av = 1 'Rotate foward
IF ang = 900 THEN av = -1 'Rotate backward
 
   PSET (xp, yp), RGB(0, 0, z) 'Set Blue Pixel
   PSET (xp + 1, yp + 1), RGB(0, z, 0) 'Set Green Pixel
   F = F + 1 'Frame Counter
LOOP UNTIL press$ <> "" 'END on keypress.....
PRINT "Average FPS"; F / (TIMER - T!) 'Calculate FPS
SLEEP 'Wait for keypress


There is lots of REMs and White spacing to make it easier to read, that takes a few lines... Enjoy!  Cheesy

It works both Fullscreen and Window,.. If you can, use Fullscreen,. seems to go better, but thats probaly just me(slow comp).. :wink:
Logged

Kevin (x.t.r.GRAPHICS)

TheBigBasicQ
*/-\*
*****
Posts: 4550



WWW
« Reply #25 on: March 29, 2005, 04:35:14 PM »

Quote from: "DefHo"
Quote from: "TBBQ"
Next time please put a link :roll:

Yeah, sorry about that. I don't have access to a web page at the moment so I wouldn't  have anything to link to.


answer to your problem is: http://qh2.qbtk.com
Logged
Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #26 on: March 29, 2005, 06:34:23 PM »

Hey Rattra...Can you .exeify it please....I want to see it! :bounce:
Logged

i]"But...it was so beautifully done"[/i]
Rattrapmax6
__/--\__
*****
Posts: 2577



WWW
« Reply #27 on: March 29, 2005, 09:56:29 PM »

Smiley Heh, I'm thinking of making a master EXE of all my demo thus far.. :wink: ..That be cool, heh...

But as you should have been more clear, my first (Black hole(begining of wormhole) or my second, (the wormhole itself)..  :wink:
Logged

Kevin (x.t.r.GRAPHICS)

Mitth'raw'nuruodo
Ancient Guru
****
Posts: 515



WWW
« Reply #28 on: March 29, 2005, 10:09:24 PM »

Both of course  Cheesy
Logged

i]"But...it was so beautifully done"[/i]
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #29 on: March 30, 2005, 08:08:41 AM »

Here's mine. 7 Lines.

Code:

'7 line tunnel demo
'FreeBASIC pwnz!
'Relsoft 2005

1 if i = 0 then screen 14, 32 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) =  (256 * 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





Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Pages: 1 [2] 3 4 ... 6
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!