Dark Bit Factory & Gravity

GENERAL => Challenges & Competitions => Topic started by: Shockwave on May 06, 2006

Title: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 06, 2006
No prizes, just kudos.
Code a tunnel effect in the language of your choice. Source or exe or both welcome.
You can attach a screenshot to your post if you like and upload it to the board (as long as it's under 60kb).

We'll leave this open for 2 weeks :)

Have fun.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 08, 2006
Just a note, you can attach your finished masterpiece as a .zip or .rar file to your post provided it is < 100kb  ;D
Title: Re: New Coding Challenge (Tunnel effects).
Post by: zparticle on May 10, 2006
anyone getting in on this?
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Rbz on May 10, 2006
anyone getting in on this?

I will try something  :)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 11, 2006
I'll do one (as you'd expect!), I've had an idea for it, it may end up looking odd but what the hell.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: ferris on May 13, 2006
Hmmm....Sounds like fun, this one - I better start on a texgen. This would be cool in 32k  ;) !
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 13, 2006
Excellent!
I haven't started on mine yet. Will be doing something soon.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Stonemonkey on May 14, 2006
Here's one using my engine.

EDIT: D/L removed and posted again below.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Rbz on May 14, 2006
Nice one !

I got 16 ~ 18 fps

P4 2.8 Ghz 512 MB
Geforce 6600GT 128MB
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Stonemonkey on May 14, 2006
Intel seems to be a fair bit slower for this stuff, on an amd@1.7 i get almost 30.
Anyway here's a slightly different lo res one too
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Clyde on May 14, 2006
Nice one mate, I'd never of thought to of used the insides of a torus for a Tunnel, usually peeps opt for cylinders.
And it is top stuff, looks awesome mate - really clever and welldone indeed.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 15, 2006
The low res full screen version was the best for me, it ran at about 120fps!
That's going to be very difficult to top.
The other version ran at about 42 fps, both versions were really smooth, you can really see the mip mapping working :)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: relsoft on May 15, 2006
Cool!!!!

Reminds me of something I made in OpenGL using a PQ torus. :*)

http://rel.betterwebber.com/junk.php?id=42

Title: Re: New Coding Challenge (Tunnel effects).
Post by: relsoft on May 15, 2006
Think I posted this on the old forum but here's the tunnel I made:


Code: [Select]
'squigly Flower tunnel
'relsoft 2006
'http://rel.betterwebber.com
'added light ;*)
defint a-z

OPTION EXPLICIT

'$include: 'tinyptc.bi'

declare sub DrawTunnel( Buffer() as integer, Texture() as integer,_                       
                       byval addx as integer, byval addy as integer)
declare sub Init_Texture()
declare function wrapdist(x as single,y as single, px as single,py as single) as single
declare function dist (byval x as single,byval  y as single,_
                   xc() as single, yc() as single,_
                  byref nearest_dist as single   ) as single



const SCR_WIDTH = 320  * 1
const SCR_HEIGHT = 240 * 1
const SCR_SIZE = SCR_WIDTH * SCR_HEIGHT

const TWID = SCR_WIDTH
const THEI = SCR_HEIGHT
const TWIDM1 = TWID - 1
const THEIM1 = THEI - 1


const TEXT_XMAX = 256
const TEXT_YMAX = 256


const MAXPOINTS = 32

const XMID = SCR_WIDTH \ 2
const YMID = SCR_HEIGHT \ 2



const PI = 3.141593
const TWOPI = (2 * PI)


   dim shared Buffer( 0 to SCR_SIZE-1 ) as integer
   dim shared Texture( 255, 255) as integer
   dim shared Distbuffer( 255, 255) as single
   dim shared xcoords(MAXPOINTS) as single
   dim shared ycoords(MAXPOINTS) as single     
   dim shared sqrt(-(XMID^2 + YMID^2)*2 to (XMID^2 + YMID^2)*2) as single
   dim shared atan(-YMID*2 to YMID*2, -XMID*2 to XMID*2) as single
   
   dim shared as integer current_time, time_scale
   
   dim as integer x,y
   
   for x = -XMID*2 to XMID*2
       for y = -YMID*2 to YMID*2
           atan(y,x) = atan2(y,x)
       next y
   next x
   
   for x = -(XMID^2 + YMID^2)*2 to (XMID^2 + YMID^2)*2
       sqrt(x) = sqr(x)
   next x
   
   
               
           
   if( ptc_open( "freeBASIC v0.01 - tunnel demo(Relsoft)", SCR_WIDTH, SCR_HEIGHT ) = 0 ) then
      end -1
   end if

    randomize timer

    init_texture()
    dim t as single
   
    do
               
        t = timer
       
        DrawTunnel Buffer(), Texture(), (TWID shr 1)* sin(t * .5),_
                   (t *.8)* (THEI shr 1)

        ptc_update @buffer(0)
        sleep 1
    loop until inkey$<>""


   ptc_close

end


private sub DrawTunnel(Buffer() as integer, Texture() as integer,_                       
                       byval addx as integer, byval addy as integer)
   
    dim x, y, tx, ty  as integer
   
    static as integer cx= 160, cy =120
    dim xdist as single
    dim cxmx, cymy, diamxscale as integer
    static frame as short
    static  as single fold_off = 0.02
    static  as single squig_off = 0.02
    static  as single fold_scale = 0.07' * sin(timer / 512.0)
    static  as single fold_num = 5
    static  as single rad_factor = 0
    dim as integer diameter
    static  as integer old_scale_sign = 0
   
    frame +=1
    diameter = 128
    diamxscale = 64 * diameter
    cx = (TWID\2)+ sin(addx/80)*50
    cy = (THEI\2)+ sin(addy/90)*50
    dim temp as short
    temp = 512/pi
    dim angle as single
    fold_off += 0.2
    fold_scale = 0.5 * sin(frame / 40)   
    dim as integer light
    dim as single inv_180 = 1/180
   
    if sgn(fold_scale)<>0 then
    if sgn(fold_scale)<> old_scale_sign then
        fold_num = (fold_num+1) mod 6
        old_scale_sign = sgn(fold_scale)
    end if
    end if
    dim p as integer ptr
    p = @buffer(0)
   for y = 0 to THEIM1
        cymy = cy - y
      for x = 0 to TWIDM1
            cxmx = cx -x                                                 
            xdist = sqrt((cxmx*cxmx) + (cymy*cymy))
            angle = atan(cymy,cxmx) + (((sin((fold_off) +  (fold_num-3) * xdist*inv_180)) * fold_scale)+1)             
            tx = int(angle * temp) + addx
            xdist = xdist * ((sin(fold_off + fold_num * angle) * fold_scale)+1)           
            light = xdist * 15
            if light > 255 then light = 255
            light = 255 - light
            ty =  (diamxscale / xdist) + addy                       
            tx = (tx) and 255
            ty = (ty) and 255                     
         *p  = texture(tx, ty) or (light shl 16 or light shl 8 or light )
         p += 1
      next x         
   next y


end sub

function dist ( byval x as single,byval  y as single,_
                xc() as single, yc() as single,_
            byref nearest_dist as single   ) as single

    dim mindist as single
    dim max as integer
    dim d as single
    dim dx as single, dy as single
    dim diff as single
    dim i as integer
    mindist = 1D+32
    max = ubound(xc)
    for i = 0 to max
        dx = abs(xc(i) - x)
        dy = abs(yc(i) - y)
        if dx > TEXT_XMAX/2.0 then dx = TEXT_XMAX-dx
       if dy > TEXT_YMAX/2.0 then dy = TEXT_YMAX-dy
       d = sqr( dx*dx + dy*dy )
        if d < mindist then
           nearest_dist = mindist
         mindist = d
      end if
    next i
    dist = mindist

end function


sub Init_Texture()

   dim i as integer
   dim frame as integer

    for i = 0 to MAXPOINTS
        xcoords(i) = rnd * (TEXT_XMAX + 1)
        ycoords(i) = rnd * (TEXT_YMAX + 1)
    next i

    frame = 0

   dim mindist as single
   dim maxdist as single

          mindist = 1D+32
          maxdist = 0

        dim tx as single
        dim ty as single
        dim x as integer
        dim y as integer
        dim distance as single
        dim distance2 as single
        dim nearest_dist as single
          for y = 0 to TEXT_YMAX - 1
          for x = 0 to TEXT_XMAX  - 1
              tx = x
              ty = y
              distance = dist(tx, ty, xcoords(), ycoords(), nearest_dist)
              distbuffer(x, y) = distance
              'distbuffer(x, y) = nearest_dist
              'distbuffer(x, y) = nearest_dist - distance
              'distbuffer(x, y) = sqr(nearest_dist * distance)
              'distbuffer(x, y) = sqr(nearest_dist^2 - distance^2)
              if distance < mindist then mindist = distance
              if distance > maxdist then maxdist = distance
          next x
          next y

        dim c as single
        dim as ubyte r,g, b
          for y = 0 to TEXT_YMAX - 1
          for x = 0 to TEXT_XMAX - 1
              c = (distbuffer(x, y) - mindist) / ((maxdist - mindist))
              'if c < 0.0 then c = 0.0
              'if c > 1.0 then c = 1.0
              r = 255 - (c * 255)
              g = (c * 255)
              'g = r
              b = r'255 - (c * (r-255))
              texture(x , y) = r shl 16 or g shl 8 or b
          next x
          next y

end sub
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 15, 2006
Really excellent tunnels but you know that :) Nice one Relsoft and again, props for posting the source.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 15, 2006
This is without a doubt the worst entry so far  O0
In my defence it only took 30 mins (and it shows!!!)

Exe is attached for those who don't have FB.

Code: [Select]
'
' Tunnel Routine For DBF Tunnel Challenge By Shockwave^DBF.
' =========================================================
'
' This is a much more basic type of tunnel than the others posted so far
' but still, I hope that you'll like it.
'
'------------------------------------------------------------------------------

'-------------------------------------
' Includes.
'-------------------------------------
        #define dbfcls   reDim Shared As Integer Buffer( 800 * 600 )
        '#define ptc_win
        #Include Once "tinyptc.bi"
        option dynamic

'-------------------------------------------------------------------------
' Open 800 X 600 Screen.
'-------------------------------------------------------------------------

        If( ptc_open( "DBF TUNNEL", 800, 600 ) = 0 ) Then
        End -1
        End If
   
'--------------------------------------------------------------------------
' Define Storage;
'--------------------------------------------------------------------------
        defint a-z
        Dim Shared As Integer Buffer( 800 * 600 )
        dim shared rings as integer     
        rings=50
        dim shared rx(rings) as double
        dim shared ry(rings) as double
        dim shared rz(rings) as double
        dim shared gadd as integer
        dim shared zsp as double
        dim shared zdiv as double
        dim shared move as double
        dim shared circx(1440) as double
        dim shared circy(1440) as double
        dim shared offs as integer
        offs=1
        for a=1 to 1440
            circx(a)=1600*sin(a*3.14/720)
            circy(a)=1600*cos(a*3.14/720)
        next
       
        move=0.0
        zsp=(rings+1)/2
        gadd=0
        for a=1 to rings
           
            rx(a)=500*sin(gadd/33)
            ry(a)=500*sin(gadd/35)
            rz(a)=zsp
            zsp=zsp-.5
            gadd=gadd+5
        next
       
'---------------
'-Debug Stuff; -
'---------------
    dim shared oldtime,newtime as double
    dim shared TST as string
    dim shared ticks as integer
    ticks=0
'-----------------------------------------------------------------
' Read In Our Font;
'-----------------------------------------------------------------
        dim shared FONT (81 * 59) as integer
        FOR LP=1 TO (81*59)
                READ FONT(LP)
        NEXT
   
'--------------------------------------------------------------------------
' Define Subs;
'--------------------------------------------------------------------------
   
declare sub DBFWPF(BYVAL BX AS INTEGER, BYVAL BY AS INTEGER , BYVAL CH AS INTEGER )
declare sub DBFTEXT(BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER , BYVAL CLR AS INTEGER)
declare SUB Millisecs()
declare sub draw_rings()

    oldtime=timer
    DO
        millisecs()
        draw_rings()
        Ptc_Update @Buffer(0)
        dbfcls
       
       
        ticks=ticks+1
    LOOP UNTIL INKEY$<>""

sub draw_rings()
       move=move+.05
    dim tx,ty as integer
    dim rst as integer
    offs=offs+1
    if offs>20 then offs=offs-20
   
   
   
    for a=1 to rings
        tx=(rx(a)/(rz(a)-move))+400
        ty=(ry(a)/(rz(a)-move))+300
        clr=a shl 2
        clr2=a
       
        for z=offs to 1440 step 20
           
            ttx=(circx(z)/(rz(a)-move))+tx
            tty=(circy(z)/(rz(a)-move))+ty
           
            dbfwpf(ttx,tty,rgb(clr,clr,clr))
            dbfwpf(ttx-1,tty,rgb(clr2,clr,clr2))
            dbfwpf(ttx+1,tty,rgb(clr2,clr,clr2))
            dbfwpf(ttx,tty-1,rgb(clr2,clr,clr2))
            dbfwpf(ttx,tty+1,rgb(clr2,clr,clr2))
       
        next
        dbfwpf(tx,ty,rgb(clr,clr,clr))
            dbfwpf(tx-1,ty,rgb(clr,clr,clr2))
            dbfwpf(tx+1,ty,rgb(clr,clr,clr2))
            dbfwpf(tx,ty-1,rgb(clr,clr,clr2))
            dbfwpf(tx,ty+1,rgb(clr,clr,clr2))
    next
 
    if move>=.5 then
        gadd=gadd-255
       for a=1 to rings
            rx(a)=500*sin(gadd/33)
            ry(a)=500*sin(gadd/35)
            gadd=gadd+5
        next
       
        move=move-.5
    end if
end sub


SUB Millisecs()
    t=timer

if  t-oldtime >=1 then
    newtime = ticks
    ticks=0
    oldtime=timer
end if

    TST = str( (newtime) )
    TST = "FPS "+TST
    for LP=1 to len(tst)
        CH=(ASC(MID(TST,LP,1)))-31
        DBFTEXT((LP*10),1,CH,&hFFFFFF)
    NEXT
   
end sub


   
'-------------------------------------------------------------------------
'Sub To Draw A Letter AnyWhere On The Screen (With Clipping);
'-------------------------------------------------------------------------
sub DBFTEXT(BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER , BYVAL CLR AS INTEGER)
dim blx,bly as integer
    '---------------------------------
    'Calculate Offset In Font Data;---
    '---------------------------------
    bm=(ch*81)-81
    FOR BLY=0 TO 8
    FOR BLX=1 TO 9
        '--------
        'Clip;---
        '--------
        IF (BX+BLX>0) AND (BX+BLX<799) AND (BY+BLY>0) AND (BY+BLY<599) THEN
           
            '----------------------------------------------------
            'Draw Pixel In Buffer If Onscreen And If Binary 1 ---
            '----------------------------------------------------
           
            MM= FONT(((BLY*9)+BLX)+BM)
            IF MM >0 THEN BUFFER (((BY+BLY)*800)+BX+BLX)=CLR
        END IF
    NEXT
    NEXT
END SUB

SUB DBFWPF (BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER)
   
    IF (BX>0) AND (BX<800) AND (BY>0) AND (BY<600) THEN
        BUFFER ((BY*800)+BX)=CH       
    END IF
   
END SUB


'==============================================================================
' Binary Font By Shockwave / DBF; (59 Chars)
'==============================================================================

'space
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'!
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
'"
data 0,1,1,0,1,1,0,0,0
data 0,1,1,0,1,1,0,0,0
data 0,1,1,0,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'#
data 0,0,0,0,0,0,0,0,0
data 0,1,1,0,0,0,1,1,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,0,0,0,1,1,0
data 0,0,0,0,0,0,0,0,0
'£
data 0,0,1,1,1,1,0,0,0
data 0,1,1,1,1,1,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,1,1,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
'%
data 0,0,0,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,1,0,0
data 0,0,0,0,0,1,0,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,0,1,0,0,0,0,0
data 0,0,1,0,0,0,1,1,0
data 0,0,0,0,0,0,1,1,0
data 0,0,0,0,0,0,0,0,0
'&
data 0,0,0,1,1,1,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,1,1,0,1,1,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,1,1,0,1,1,0,0
data 0,1,1,0,0,1,1,1,1
data 0,1,1,1,0,0,1,1,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,1,1,0,0,0
''
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'(
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,1,1,1,1,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,0,1,1,1,1,0
data 0,0,0,0,0,1,1,1,0
')
data 0,1,1,1,0,0,0,0,0
data 0,1,1,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,1,1,1,1,0,0,0,0
data 0,1,1,1,0,0,0,0,0
'*
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,1,0,1,0,1,0,0
data 0,0,0,1,1,1,0,0,0
data 0,1,1,1,1,1,1,1,0
data 0,0,0,1,1,1,0,0,0
data 0,0,1,0,1,0,1,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'+
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
''
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,1,0,0,0,0
'-
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'.
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
'/
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,1,0
data 0,0,0,0,0,0,1,1,0
data 0,0,0,0,0,1,1,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,1,1,1,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'0
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,0,0,0,1,0,1,1
data 1,1,0,0,1,0,0,1,1
data 1,1,0,1,1,0,0,1,1
data 1,1,1,1,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'1
data 0,0,0,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,1,1,1,1,1,1,0,0
data 0,1,1,1,1,1,1,0,0
'2
data 0,0,1,1,1,1,1,1,0
data 0,0,1,1,1,1,1,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 0,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
'3
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,1,1,1,1,0
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
'4
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,1,1,0,0,0
data 1,1,0,0,1,1,0,0,0
data 1,1,1,1,1,1,1,1,1
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
'5
data 0,1,1,1,1,1,1,0,0
data 0,1,1,1,1,1,1,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'6
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,0
data 1,1,0,0,0,0,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'7
data 0,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,1,1,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
'8
data 0,0,1,1,1,1,1,0,0
data 0,1,1,1,1,1,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,0,1,1,1,1,1,0,0
data 1,1,1,0,0,0,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'9
data 0,0,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
data 0,1,1,0,0,0,0,1,1
data 0,1,1,0,0,0,0,1,1
data 0,0,1,1,1,1,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
':
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
';
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,1,0,0,0,0
'<
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,1,1,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,0,0,1,1,0,0
data 0,0,0,0,0,0,0,0,0
'=
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'>
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,1,1,1,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'?
data 0,0,1,1,1,1,1,0,0
data 0,1,1,1,1,1,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,0,0,0,0,0,1,1,0
data 0,0,0,1,1,1,1,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
'@
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,1,0,0,0,0,0,0,0
data 0,1,0,0,1,1,1,0,0
data 0,1,0,1,0,0,0,1,0
data 0,1,0,1,1,1,0,1,0
data 0,1,0,0,0,0,0,1,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,0,0,0,0,0
'a
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'b
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'c
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
'd
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'e
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,1,1,1,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
'f
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,1,1,1,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
'g
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,1,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'h
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'i
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
'j
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'k
data 1,1,0,0,0,0,1,1,0
data 1,1,0,0,0,0,1,1,0
data 1,1,0,0,0,0,1,1,0
data 1,1,0,0,0,0,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'l
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
'm
data 0,1,1,1,0,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,1,0,0,1,1
data 1,1,0,0,1,0,0,1,1
data 1,1,0,0,1,0,0,1,1
data 1,1,1,0,1,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'n
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1

'o
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'p
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
'q
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,1,0,1,1
data 1,1,1,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'r
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
's
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 0,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
't
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
'u
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'v
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,0,0,1,1,1
data 0,1,1,1,1,1,1,1,0
data 0,0,1,1,1,1,1,0,0
'w
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,1,0,0,1,1
data 1,1,1,0,1,0,0,1,1
data 1,1,1,0,1,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,0,1,1,1,0
'x
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,0,0,1,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'y
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 0,1,1,1,1,1,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'z
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,1,1,1
data 0,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Clyde on May 15, 2006
Whats wrong with that dude, nice one and with one arm too. :D
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Stonemonkey on May 15, 2006
Cool @ the bit down the middle, and 150fps!. Thought it was only relsoft who coded 1 handed  :P
Title: Re: New Coding Challenge (Tunnel effects).
Post by: relsoft on May 15, 2006
Hey, that's nice. :*)  I like the denter line.  YOu could probably polygonize this and make a very fast(no sort, no zbuffer) textured tunnel ;*)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Rbz on May 15, 2006
Nice stuff dudes !
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 16, 2006
Thanks for the comments, I'm going to have a little bit of a play with this today, the frame rate will probably drop a bit but it might be worthwhile.

Just a point to note, I changed the method I've been using to clear the screen buffer to re-dimming the screen buffer, it saves about 80fps here on the 800 X 600 screen.

Probably it's being used widely anyway but just in case anyone else is still doing it the way I was (with a loop), redim seems to be a lot faster, especially when the buffer is big.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 16, 2006
Relsoft gave me the idea for this with his lines, this isn't as pretty but it uses a similar type of effect to blend three dot tunnels together.
(sorry for the lowres the speed took a hit!)
Code: [Select]
'
' Tunnel Routine For DBF Tunnel Challenge By Shockwave^DBF.
' =========================================================
'
' This is a much more basic type of tunnel than the others posted so far
' but still, I hope that you'll like it.
'
'------------------------------------------------------------------------------

'-------------------------------------
' Includes.
'-------------------------------------
        #define dbfcls   reDim Shared As Integer Buffer( 320 * 240 )
       
        #define dbfclsr   reDim Shared As Integer Bufferr( 320 * 240 )
        #define dbfclsg   reDim Shared As Integer Bufferg( 320 * 240 )
        #define dbfclsb   reDim Shared As Integer Bufferb( 320 * 240 )
       
        '#define ptc_win
        #Include Once "tinyptc.bi"
        option dynamic

'-------------------------------------------------------------------------
' Open 800 X 600 Screen.
'-------------------------------------------------------------------------

        If( ptc_open( "DBF TUNNEL", 320, 240 ) = 0 ) Then
        End -1
        End If
   
'--------------------------------------------------------------------------
' Define Storage;
'--------------------------------------------------------------------------
        defint a-z
        Dim Shared As Integer Buffer( 320 * 240 )
       
        Dim Shared As Integer Bufferr( 320 * 240 )
        Dim Shared As Integer Bufferg( 320 * 240 )
        Dim Shared As Integer Bufferb( 320 * 240 )
       
        dim shared rings as integer     
        rings=50
        dim shared rxr(rings) as double
        dim shared ryr(rings) as double
        dim shared rzr(rings) as double
        dim shared gaddr as integer
        dim shared zspr as double       
        dim shared mover as double
        dim shared offsr as integer
        offsr=1           
        mover=0.0
        zspr=(rings+1)/2
        gaddr=0
        for a=1 to rings
           
            rxr(a)=500*sin(gaddr/33)
            ryr(a)=500*sin(gaddr/35)
            rzr(a)=zspr
            zspr=zspr-.5
            gaddr=gaddr+5
        next

        dim shared rxg(rings) as double
        dim shared ryg(rings) as double
        dim shared rzg(rings) as double
        dim shared gaddg as integer
        dim shared zspg as double       
        dim shared moveg as double
        dim shared offsg as integer
        offsg=1           
        moveg=0.0
        zspg=(rings+1)/2
        gaddg=0
        for a=1 to rings
           
            rxg(a)=460*sin(gaddg/33)
            ryg(a)=460*sin(gaddg/35)
            rzg(a)=zspg
            zspg=zspg-.5
            gaddg=gaddg+5
        next
       
       
        dim shared rxb(rings) as double
        dim shared ryb(rings) as double
        dim shared rzb(rings) as double
        dim shared gaddb as integer
        dim shared zspb as double       
        dim shared moveb as double
        dim shared offsb as integer
        offsb=1           
        moveb=0.0
        zspb=(rings+1)/2
        gaddb=0
        for a=1 to rings
           
            rxb(a)=480*sin(gaddb/33)
            ryb(a)=480*sin(gaddb/35)
            rzb(a)=zspb
            zspb=zspb-.5
            gaddb=gaddb+5
        next
       

       
        dim shared circx(1440) as double
        dim shared circy(1440) as double
       
        for a=1 to 1440
            circx(a)=1600*sin(a*3.14/720)
            circy(a)=1600*cos(a*3.14/720)
        next
'---------------
'-Debug Stuff; -
'---------------
    dim shared oldtime,newtime as double
    dim shared TST as string
    dim shared ticks as integer
    ticks=0
'-----------------------------------------------------------------
' Read In Our Font;
'-----------------------------------------------------------------
        dim shared FONT (81 * 59) as integer
        FOR LP=1 TO (81*59)
                READ FONT(LP)
        NEXT
   
'--------------------------------------------------------------------------
' Define Subs;
'--------------------------------------------------------------------------
   
declare sub DBFWPF(BYVAL BX AS INTEGER, BYVAL BY AS INTEGER , BYVAL CH AS INTEGER )
declare sub DBFWPFR(BYVAL BX AS INTEGER, BYVAL BY AS INTEGER , BYVAL CH AS INTEGER )
declare sub DBFWPFG(BYVAL BX AS INTEGER, BYVAL BY AS INTEGER , BYVAL CH AS INTEGER )
declare sub DBFWPFB(BYVAL BX AS INTEGER, BYVAL BY AS INTEGER , BYVAL CH AS INTEGER )
declare sub DBFTEXT(BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER , BYVAL CLR AS INTEGER)
declare sub bufferin()
declare SUB Millisecs()
declare sub draw_ringsr()
declare sub draw_ringsg()
declare sub draw_ringsb()

    oldtime=timer
    DO
       
        draw_ringsr()
        draw_ringsg()
        draw_ringsb()
       
        bufferin()
        millisecs()
        Ptc_Update @Buffer(0)
        dbfcls
        'dbfclsr
        'dbfclsg
        'dbfclsb
       
       
        ticks=ticks+1
    LOOP UNTIL INKEY$<>""
   
sub bufferin()
    dim i as integer
    for i=1 to (320*240)
        buffer(i)=rgb(bufferr(i),bufferg(i),bufferb(i))
        'bufferr(i)= bufferr(i) shr 1
        if bufferr(i)>=5 then bufferr(i)=bufferr(i)-5
        if bufferg(i)>=5 then bufferg(i)=bufferg(i)-5
        if bufferb(i)>=5 then bufferb(i)=bufferb(i)-5
    next
       
end sub

sub draw_ringsr()
    mover=mover+.05
    dim tx,ty as integer
    offsr=offsr+1
    if offsr>20 then offsr=offsr-20
   
   
   
    for a=1 to rings
        tx=(rxr(a)/(rzr(a)-mover))+160
        ty=(ryr(a)/(rzr(a)-mover))+120
        clr=a shl 2
        clr2=a shl 1
       
        for z=offsr to 1440 step 20
           
            ttx=(circx(z)/(rzr(a)-mover))+tx
            tty=(circy(z)/(rzr(a)-mover))+ty
           
            dbfwpfr(ttx,tty,clr)
            dbfwpfb(ttx-1,tty,clr2)
            dbfwpfb(ttx+1,tty,clr2)
            dbfwpfb(ttx,tty+1,clr2)
            dbfwpfb(ttx,tty-1,clr2)

           
        next
           
           
    next
 
    if mover>=.5 then
        gaddr=gaddr-255
       for a=1 to rings
            rxr(a)=500*sin(gaddr/33)
            ryr(a)=500*sin(gaddr/35)
            gaddr=gaddr+5
        next
       
        mover=mover-.5
    end if
end sub


sub draw_ringsg()
    moveg=moveg+.05
    dim tx,ty as integer
    offsg=offsg+1
    if offsg>20 then offsg=offsg-20
   
   
   
    for a=1 to rings
        tx=(rxg(a)/(rzr(a)-moveg))+160
        ty=(ryg(a)/(rzr(a)-moveg))+120
        clr=a shl 2
        clr2=a shl 1
       
        for z=offsg to 1440 step 20
           
            ttx=(circx(z)/(rzg(a)-moveg))+tx
            tty=(circy(z)/(rzg(a)-moveg))+ty
           
            dbfwpfg(ttx,tty,clr)
            dbfwpfb(ttx-1,tty,clr2)
            dbfwpfb(ttx+1,tty,clr2)
            dbfwpfb(ttx,tty+1,clr2)
            dbfwpfb(ttx,tty-1,clr2)

           
        next
           
           
    next
 
    if moveg>=.5 then
        gaddg=gaddg-255
       for a=1 to rings
            rxg(a)=460*sin(gaddg/33)
            ryg(a)=460*sin(gaddg/35)
            gaddg=gaddg+5
        next
       
        moveg=moveg-.5
    end if
end sub

sub draw_ringsb()
    moveb=moveb+.05
    dim tx,ty as integer
    offsb=offsb+1
    if offsb>20 then offsb=offsb-20
   
   
   
    for a=1 to rings
        tx=(rxb(a)/(rzb(a)-moveb))+160
        ty=(ryb(a)/(rzb(a)-moveb))+120
        clr=a shl 2
        clr2=a shl 1
       
        for z=offsb to 1440 step 20
           
            ttx=(circx(z)/(rzb(a)-moveb))+tx
            tty=(circy(z)/(rzb(a)-moveb))+ty
           
            dbfwpfb(ttx,tty,clr)
            dbfwpfb(ttx-1,tty,clr2)
            dbfwpfb(ttx+1,tty,clr2)
            dbfwpfb(ttx,tty+1,clr2)
            dbfwpfb(ttx,tty-1,clr2)
           
        next
           
           
    next
 
    if moveb>=.5 then
        gaddb=gaddb-255
       for a=1 to rings
            rxb(a)=480*sin(gaddb/33)
            ryb(a)=480*sin(gaddb/35)
            gaddb=gaddb+5
        next
       
        moveb=moveb-.5
    end if
end sub




SUB Millisecs()
    t=timer

if  t-oldtime >=1 then
    newtime = ticks
    ticks=0
    oldtime=timer
end if

    TST = str( (newtime) )
    TST = "FPS "+TST
    for LP=1 to len(tst)
        CH=(ASC(MID(TST,LP,1)))-31
        DBFTEXT((LP*10),1,CH,&hFFFFFF)
    NEXT
   
end sub


   
'-------------------------------------------------------------------------
'Sub To Draw A Letter AnyWhere On The Screen (With Clipping);
'-------------------------------------------------------------------------
sub DBFTEXT(BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER , BYVAL CLR AS INTEGER)
dim blx,bly as integer
    '---------------------------------
    'Calculate Offset In Font Data;---
    '---------------------------------
    bm=(ch*81)-81
    FOR BLY=0 TO 8
    FOR BLX=1 TO 9
        '--------
        'Clip;---
        '--------
        IF (BX+BLX>0) AND (BX+BLX<319) AND (BY+BLY>0) AND (BY+BLY<239) THEN
           
            '----------------------------------------------------
            'Draw Pixel In Buffer If Onscreen And If Binary 1 ---
            '----------------------------------------------------
           
            MM= FONT(((BLY*9)+BLX)+BM)
            IF MM >0 THEN BUFFER (((BY+BLY)*320)+BX+BLX)=CLR
        END IF
    NEXT
    NEXT
END SUB

SUB DBFWPF (BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER)
   
    IF (BX>0) AND (BX<319) AND (BY>0) AND (BY<239) THEN
        BUFFER ((BY*320)+BX)=CH       
    END IF
   
END SUB


SUB DBFWPFR (BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER)
   
    IF (BX>0) AND (BX<319) AND (BY>0) AND (BY<239) THEN
        BUFFERR ((BY*320)+BX)=CH       
    END IF
   
END SUB

SUB DBFWPFG (BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER)
   
    IF (BX>0) AND (BX<319) AND (BY>0) AND (BY<239) THEN
        BUFFERG ((BY*320)+BX)=CH       
    END IF
   
END SUB

SUB DBFWPFB (BYVAL BX AS INTEGER , BYVAL BY AS INTEGER , BYVAL CH AS INTEGER)
   
    IF (BX>0) AND (BX<319) AND (BY>0) AND (BY<239) THEN
        BUFFERB ((BY*320)+BX)=CH       
    END IF
   
END SUB

'==============================================================================
' Binary Font By Shockwave / DBF; (59 Chars)
'==============================================================================

'space
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'!
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
'"
data 0,1,1,0,1,1,0,0,0
data 0,1,1,0,1,1,0,0,0
data 0,1,1,0,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'#
data 0,0,0,0,0,0,0,0,0
data 0,1,1,0,0,0,1,1,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,0,0,0,1,1,0
data 0,0,0,0,0,0,0,0,0
'£
data 0,0,1,1,1,1,0,0,0
data 0,1,1,1,1,1,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,1,1,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
'%
data 0,0,0,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,1,0,0
data 0,0,0,0,0,1,0,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,0,1,0,0,0,0,0
data 0,0,1,0,0,0,1,1,0
data 0,0,0,0,0,0,1,1,0
data 0,0,0,0,0,0,0,0,0
'&
data 0,0,0,1,1,1,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,1,1,0,1,1,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,1,1,0,1,1,0,0
data 0,1,1,0,0,1,1,1,1
data 0,1,1,1,0,0,1,1,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,1,1,0,0,0
''
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'(
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,1,1,1,1,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,0,1,1,1,1,0
data 0,0,0,0,0,1,1,1,0
')
data 0,1,1,1,0,0,0,0,0
data 0,1,1,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,1,1,1,1,0,0,0,0
data 0,1,1,1,0,0,0,0,0
'*
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,1,0,1,0,1,0,0
data 0,0,0,1,1,1,0,0,0
data 0,1,1,1,1,1,1,1,0
data 0,0,0,1,1,1,0,0,0
data 0,0,1,0,1,0,1,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'+
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,0,0,1,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
''
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,1,0,0,0,0
'-
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'.
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
'/
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,1,0
data 0,0,0,0,0,0,1,1,0
data 0,0,0,0,0,1,1,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,1,1,1,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'0
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,0,0,0,1,0,1,1
data 1,1,0,0,1,0,0,1,1
data 1,1,0,1,1,0,0,1,1
data 1,1,1,1,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'1
data 0,0,0,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,1,1,1,1,1,1,0,0
data 0,1,1,1,1,1,1,0,0
'2
data 0,0,1,1,1,1,1,1,0
data 0,0,1,1,1,1,1,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 0,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
'3
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,1,1,1,1,0
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
'4
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,1,1,0,0,0
data 1,1,0,0,1,1,0,0,0
data 1,1,1,1,1,1,1,1,1
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
'5
data 0,1,1,1,1,1,1,0,0
data 0,1,1,1,1,1,1,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,0,0,0,0,0,0
data 0,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'6
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,0
data 1,1,0,0,0,0,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'7
data 0,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,1,1,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
data 0,0,0,0,0,1,1,1,0
'8
data 0,0,1,1,1,1,1,0,0
data 0,1,1,1,1,1,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,0,1,1,1,1,1,0,0
data 1,1,1,0,0,0,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'9
data 0,0,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
data 0,1,1,0,0,0,0,1,1
data 0,1,1,0,0,0,0,1,1
data 0,0,1,1,1,1,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
':
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
';
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,1,0,0,0,0
'<
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,1,1,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,0,0,1,1,0,0
data 0,0,0,0,0,0,0,0,0
'=
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'>
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,0,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,0,1,1,0,0,0
data 0,0,0,0,1,1,1,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,1,1,1,0,0,0,0
data 0,1,1,1,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0
'?
data 0,0,1,1,1,1,1,0,0
data 0,1,1,1,1,1,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,0,0,0,0,0,1,1,0
data 0,0,0,1,1,1,1,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,0,0,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
'@
data 0,0,0,0,0,0,0,0,0
data 0,0,1,1,1,1,1,0,0
data 0,1,0,0,0,0,0,0,0
data 0,1,0,0,1,1,1,0,0
data 0,1,0,1,0,0,0,1,0
data 0,1,0,1,1,1,0,1,0
data 0,1,0,0,0,0,0,1,0
data 0,0,1,1,1,1,1,0,0
data 0,0,0,0,0,0,0,0,0
'a
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'b
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'c
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
'd
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'e
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,1,1,1,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
'f
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,1,1,1,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
'g
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,1,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'h
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'i
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
'j
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'k
data 1,1,0,0,0,0,1,1,0
data 1,1,0,0,0,0,1,1,0
data 1,1,0,0,0,0,1,1,0
data 1,1,0,0,0,0,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'l
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,1
'm
data 0,1,1,1,0,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,1,0,0,1,1
data 1,1,0,0,1,0,0,1,1
data 1,1,0,0,1,0,0,1,1
data 1,1,1,0,1,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'n
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1

'o
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'p
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
'q
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,1,0,1,1
data 1,1,1,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'r
data 1,1,1,1,1,1,1,1,0
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
's
data 0,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,0,0,0,0,0,0,0
data 1,1,0,0,0,0,0,0,0
data 0,1,1,1,1,1,1,1,0
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
't
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,0,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
data 0,0,0,1,1,1,0,0,0
'u
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,1,1,1,1,0
'v
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,1,0,0,1,1,1
data 0,1,1,1,1,1,1,1,0
data 0,0,1,1,1,1,1,0,0
'w
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,1,0,1,0,0,1,1
data 1,1,1,0,1,0,0,1,1
data 1,1,1,0,1,0,0,1,1
data 1,1,1,1,1,1,1,1,1
data 0,1,1,1,0,1,1,1,0
'x
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,0,0,0,1,1,0
data 0,1,1,1,1,1,1,1,0
data 1,1,1,1,0,0,1,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
data 1,1,1,0,0,0,0,1,1
'y
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 1,1,0,0,0,0,0,1,1
data 0,1,1,1,1,1,1,1,1
data 0,0,0,0,0,0,1,1,1
data 0,0,0,0,0,0,1,1,1
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,0
'z
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
data 0,0,0,0,0,0,0,1,1
data 0,0,0,0,0,0,1,1,1
data 0,1,1,1,1,1,1,1,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,0,0,0,0,0,0
data 1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 16, 2006
Ok, one more varient (this is the best one by me but still not as good as the others that have been submitted).

The source and the exe are in the attachment to this post.
Replaced the dots for bobs, added an unusual scroller.
FPS is about 160 here but I reckon it may be a lot slower than that on some systems.

Could be sped up by dropping the res.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: relsoft on May 16, 2006
Nice!!! I like the scroller!! Never thought of making a scroller that way!!! Kudos!
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 16, 2006
Cheers Relsoft :)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: TheArchitect on May 16, 2006
W O W
and 30 mins for that last one.....
 :o :o :o :o :o :o :o :o
You are a BEAST
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 16, 2006
Lol, I've been called worse :)
Seriously though, Relsoft and Stonemonkey's are both miles better.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Stonemonkey on May 16, 2006
As usual, with adding stuff and finding ways to test thought i'd mess around with this. Still working on this so exe only atm and all a bit random.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 16, 2006
Everyone should download that! It's great :)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: xteraco on May 16, 2006
woa! thats awesome! lol...   FBF is totally getting in on this tunnel thing, we'll have ours done by tommorow hopefully

fbf = Xteraco and Rattrapmax btw
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Clyde on May 16, 2006
@All yees' - Awesome tunnels folks.
@Xteraco - Invite Ratrtapmax over dude.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: zparticle on May 16, 2006
Stonemonkey - that is freaking cool
Title: Re: New Coding Challenge (Tunnel effects).
Post by: xteraco on May 18, 2006
well, we were planning to have our tunnel done yesterday, but life got in the way, we pushed the deadline up to friday... still alot to do, its gonna be pretty good for something we started on tuesday :)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 18, 2006
Looking forward to tomorrow then :)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Rbz on May 19, 2006
Here's my entrie, is just an OGL version from a BB code - box tunnel by Shockwave.
Hope you like it !

Compile with Dev 4.9.9.2, should work with VC6.0 too.



Quote
//
//  OpenGL Vector Tunnel by Rbraz - May 2006
//
//  Original BB code by Shockwave
// 
//



/**************************
 * Includes
 *
 **************************/
#include <windows.h>
#include <math.h>
#include <gl/gl.h>
#include <gl/glu.h>


/**************************
 * Function Declarations
 *
 **************************/
LRESULT CALLBACK WndProc (HWND hWnd, UINT message,
WPARAM wParam, LPARAM lParam);
void EnableOpenGL (HWND hWnd, HDC *hDC, HGLRC *hRC);
void DisableOpenGL (HWND hWnd, HDC hDC, HGLRC hRC);

void glInit();
void glDraw();   
void Init_Structure();
void Draw_Structure();

// Global screen variables
int width  = 640;
int height = 480;

//===================================================================================
// Define Box Storage;
//===================================================================================
float      off=0.0f;
const      int maxsegs=30;
float      genadd;
float      genadd2;

float      scale=200.0f;
float      celx [4][maxsegs];
float      cely [4][maxsegs];
float      celz[4][maxsegs];



/**************************
 * WinMain
 *
 **************************/
int WINAPI WinMain (HINSTANCE hInstance,
                    HINSTANCE hPrevInstance,
                    LPSTR lpCmdLine,
                    int iCmdShow)
{
    WNDCLASS wc;
    HWND hWnd;
    HDC hDC;
    HGLRC hRC;       
    MSG msg;
    BOOL bQuit = FALSE;

    /* register window class */
    wc.style = CS_OWNDC;
    wc.lpfnWndProc = WndProc;
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hInstance = hInstance;
    wc.hIcon = LoadIcon (NULL, IDI_APPLICATION);
    wc.hCursor = LoadCursor (NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH) GetStockObject (BLACK_BRUSH);
    wc.lpszMenuName = NULL;
    wc.lpszClassName = "OGL Vector Tunnel by Rbraz 2006";
    RegisterClass (&wc);

    /* create main window */
    hWnd = CreateWindow (
      wc.lpszClassName, wc.lpszClassName,
      WS_CAPTION | WS_POPUPWINDOW | WS_VISIBLE,
      0, 0, width, height,
      NULL, NULL, hInstance, NULL);

    /* enable OpenGL for the window */
    EnableOpenGL (hWnd, &hDC, &hRC);
   
    //Initialyze OGL
    glInit();

    /* program main loop */
    while (!bQuit)
    {
        /* check for messages */
        if (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
        {
            /* handle or dispatch messages */
            if (msg.message == WM_QUIT)
            {
                bQuit = TRUE;
            }
            else
            {
                TranslateMessage (&msg);
                DispatchMessage (&msg);
            }
        }
        else
        {
            /* OpenGL animation code goes here */

            glDraw();

            SwapBuffers (hDC);

            Sleep (1);
        }
    }

    /* shutdown OpenGL */
    DisableOpenGL (hWnd, hDC, hRC);

    /* destroy the window explicitly */
    DestroyWindow (hWnd);

    return msg.wParam;
}


/********************
 * Window Procedure
 *
 ********************/
LRESULT CALLBACK WndProc (HWND hWnd, UINT message,
                          WPARAM wParam, LPARAM lParam)
{

    switch (message)
    {
    case WM_CREATE:
        return 0;
    case WM_CLOSE:
        PostQuitMessage (0);
        return 0;

    case WM_DESTROY:
        return 0;

    case WM_KEYDOWN:
        switch (wParam)
        {
        case VK_ESCAPE:
            PostQuitMessage(0);
            return 0;
        }
        return 0;

    default:
        return DefWindowProc (hWnd, message, wParam, lParam);
    }
}


/*******************
 * Enable OpenGL
 *
 *******************/
void EnableOpenGL (HWND hWnd, HDC *hDC, HGLRC *hRC)
{
    PIXELFORMATDESCRIPTOR pfd;
    int iFormat;

    /* get the device context (DC) */
    *hDC = GetDC (hWnd);

    /* set the pixel format for the DC */
    ZeroMemory (&pfd, sizeof (pfd));
    pfd.nSize = sizeof (pfd);
    pfd.nVersion = 1;
    pfd.dwFlags = PFD_DRAW_TO_WINDOW |
      PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
    pfd.iPixelType = PFD_TYPE_RGBA;
    pfd.cColorBits = 24;
    pfd.cDepthBits = 16;
    pfd.iLayerType = PFD_MAIN_PLANE;
    iFormat = ChoosePixelFormat (*hDC, &pfd);
    SetPixelFormat (*hDC, iFormat, &pfd);

    /* create and enable the render context (RC) */
    *hRC = wglCreateContext( *hDC );
    wglMakeCurrent( *hDC, *hRC );

}

/******************
 * Disable OpenGL
 *
 ******************/
void DisableOpenGL (HWND hWnd, HDC hDC, HGLRC hRC)
{
    wglMakeCurrent (NULL, NULL);
    wglDeleteContext (hRC);
    ReleaseDC (hWnd, hDC);
}

void glInit()            
{
   // Start Of User Initialization
   glMatrixMode(GL_PROJECTION);                        // Select The Projection Matrix
   glLoadIdentity();                                 // Reset The Projection Matrix
   gluPerspective(45.0f, (float)width/(float)height, 0.1f,  100.0f); // Set Our Perspective
   glMatrixMode(GL_MODELVIEW);                           // Select The Modelview Matrix
   glLoadIdentity();                                 // Reset The Modelview Matrix

   glShadeModel(GL_SMOOTH);                     // Enable Smooth Shading
   glClearColor(0.0f, 0.0f, 0.0f, 0.0f);            // Black Background
   glClearDepth(1.0f);                           // Depth Buffer Setup
   glEnable(GL_DEPTH_TEST);                     // Enables Depth Testing
   glDepthFunc(GL_LEQUAL);                        // The Type Of Depth Testing To Do
   glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);   // Really Nice Perspective Calculations
    glEnable(GL_TEXTURE_2D);                     // Enable 2D Texture Mapping
   
    Init_Structure();         
}

void glDraw()                                        // Draw The Scene
{
   glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);      // Clear Screen And Depth Buffer
   glLoadIdentity();                                 // Reset The View   
   
    glPushMatrix();
     glTranslatef(0.0f,0.0f,-40.0f);
     genadd=genadd+0.01f;
     genadd2=genadd2+0.02f;
     Draw_Structure();
    glPopMatrix();
     
}

//===================================================================================
// Define Boxes Structure;
//===================================================================================
void Init_Structure()
{
    float zp=-((maxsegs+1)*2);
    int a;

 for (a=1; a <= maxsegs; a++)
 {
        celx[1][a]=-scale;
        celx[2][a]=scale;
        celx[3][a]=scale;
        celx[4][a]=-scale;
       
        cely[1][a]=-scale;
        cely[2][a]=-scale;
        cely[3][a]=scale;
        cely[4][a]=scale;

        celz[1][a]=zp;
        celz[2][a]=zp;
        celz[3][a]=zp;
        celz[4][a]=zp;
        zp=zp+2;       
 }
}

//===================================================================================
// Draw Boxes Structure;
//===================================================================================
void Draw_Structure()
{
GLfloat        tx1,tx2,tx3,tx4;
GLfloat        ty1,ty2,ty3,ty4;
GLfloat        tx5,tx6,tx7,tx8;
GLfloat        ty5,ty6,ty7,ty8;

GLfloat        otx1,otx2,otx3,otx4;
GLfloat        oty1,oty2,oty3,oty4;
GLfloat        otx5,otx6,otx7,otx8;
GLfloat        oty5,oty6,oty7,oty8;

GLfloat        xs1,xs2;
GLfloat        ys1,ys2;
int a=1;
GLfloat r,g,b;

     
 glBegin(GL_QUADS);

 for (a=1;a < maxsegs; a++)
 {
  xs1=sinf(genadd+(((float)a/10.0f)))*10.0f;
  xs2=sinf(genadd+(((float)a+1)/10.0f))*10;

  ys1=sinf(genadd2+(((float)a/10.0f)))*10;
  ys2=sinf(genadd2+(((float)a+1)/10.0f))*10;

                tx1= ((celx[1][a]/(celz[1][a]+off))+xs1);
                tx2= ((celx[2][a]/(celz[2][a]+off))+xs1);
                tx3= ((celx[3][a]/(celz[3][a]+off))+xs1);
                tx4= ((celx[4][a]/(celz[4][a]+off))+xs1);
                tx5= ((celx[1][a+1]/(celz[1][a+1]+off))+xs2);
                tx6= ((celx[2][a+1]/(celz[2][a+1]+off))+xs2);
                tx7= ((celx[3][a+1]/(celz[3][a+1]+off))+xs2);
                tx8= ((celx[4][a+1]/(celz[4][a+1]+off))+xs2);

                ty1= ((cely[1][a]/(celz[1][a]+off))+ys1);
                ty2= ((cely[2][a]/(celz[2][a]+off))+ys1);
                ty3= ((cely[3][a]/(celz[3][a]+off))+ys1);
                ty4= ((cely[4][a]/(celz[4][a]+off))+ys1);
                ty5= ((cely[1][a+1]/(celz[1][a+1]+off))+ys2);
                ty6= ((cely[2][a+1]/(celz[2][a+1]+off))+ys2);
                ty7= ((cely[3][a+1]/(celz[3][a+1]+off))+ys2);
                ty8= ((cely[4][a+1]/(celz[4][a+1]+off))+ys2);
               
                r= (float)a * 5  / 255.0f;
                g= (float)a * 6  / 255.0f;
                b= (float)a * 8  / 255.0f;
               
                glColor3f(r,g,b);
               
                 glTexCoord2f(0.0f, 0.0f); glVertex2f (tx1,ty1);
                 glTexCoord2f(1.0f, 0.0f); glVertex2f (tx2,ty2); 
                 glTexCoord2f(1.0f, 1.0f); glVertex2f (otx2,oty2);
                 glTexCoord2f(0.0f, 1.0f); glVertex2f (otx1,oty1);
         
                 glTexCoord2f(0.0f, 0.0f); glVertex2f (tx3,ty3);
                 glTexCoord2f(1.0f, 0.0f); glVertex2f (tx4,ty4);
                 glTexCoord2f(1.0f, 1.0f); glVertex2f (otx4,oty4);
                 glTexCoord2f(0.0f, 1.0f); glVertex2f (otx3,oty3);
                 
                 glTexCoord2f(0.0f, 0.0f); glVertex2f (tx1,ty1);
                 glTexCoord2f(1.0f, 0.0f); glVertex2f (tx4,ty4);
                 glTexCoord2f(1.0f, 1.0f); glVertex2f (otx4,oty4);
                 glTexCoord2f(0.0f, 1.0f); glVertex2f (otx1,oty1);                 

                 glTexCoord2f(0.0f, 0.0f); glVertex2f (tx2,ty2);
                 glTexCoord2f(1.0f, 0.0f); glVertex2f (tx3,ty3);
                 glTexCoord2f(1.0f, 1.0f); glVertex2f (otx3,oty3);
                 glTexCoord2f(0.0f, 1.0f); glVertex2f (otx2,oty2);                 

                 // grab the old values
                 otx1 = tx1; otx2 = tx2; otx3 = tx3; otx4 = tx4;
                 oty1 = ty1; oty2 = ty2; oty3 = ty3; oty4 = ty4;
                 
                 otx5 = tx5; otx6 = tx6; otx7 = tx7; otx8 = tx7;
                 oty5 = ty5; oty6 = ty6; oty7 = ty7; oty8 = ty7;
             
 }
 glEnd();
 
 off=off+0.15f;
 if (off > 2.0f)
 {
  off=off-2.0f;
  genadd=genadd-0.1f;
  genadd2=genadd2-0.1f;
 }
}
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 20, 2006
lol, I'm honoured that you'd port one of my old sources mate :) Yours is nicer.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: xteraco on May 21, 2006
well, after being late on our deadline, twice, we've got our 3rd demo in the demo linup for FBFusion, i say its not bad for being started tuesday, and finished on saturday.... :)

here is the link
http://www.xteraco.com/FBfusion/prods/fbf03%20the%20tunnel%20demo.rar

also, fbf's homepage should be up in a few days, it will be www.xteraco.com/fbfusion

let me know what ya think
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Stonemonkey on May 21, 2006
Hi exteraco, crashes here a couple of seconds after starting on both fullscreen and windowed.

AMD xp+ @1.7, 512Mb, Radeon 9600
Title: Re: New Coding Challenge (Tunnel effects).
Post by: xteraco on May 21, 2006
we've tested the software at each resolution on 4 different machines, with various hardware on each. We were not able to reproduce the bug you mentioned, its possible that it may be a video driver issue.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Rbz on May 21, 2006
@Shockie : thanks dude !  :)


@Xteraco: Works fine here, nice idea !

Btw, your bitmap font is hard to read for me :(

Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 22, 2006
Xteraco, sorry for the slow feedback, I've been busy trying to fix the slow forum speed, it's sorted now!
I like the tunnel, nice and gloomy and it runs nice and fast too.
The font spoils it a bit though, quite hard to read.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: xteraco on May 22, 2006
yeah, that font was a big mistake
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 23, 2006
Hey, good tunnel though mate. Never mind the font.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: TinDragon on May 24, 2006
had this kicking about in my old B2D demo code, was something me and zawran worked on and he did a demo with a better version but since it was there here's my tunnel effort. note it uses no 3d commands but is compiled with b3d since I dont have b2d installed anymore, hence the rather bloated exe size.   :-[

www.tindragons.com/demos/ttdtunnel.zip (http://www.tindragons.com/demos/ttdtunnel.zip)

Note the TTD site has reverted to a very old board site due to a major cock up by the hosts so please dont worry about visiting it. I will replace it at some point with a half decent site but cant be arsed at the moment  ;D

[EDIT] Stupid wireless keyboard missed half the letters  O0
Title: Re: New Coding Challenge (Tunnel effects).
Post by: zparticle on May 24, 2006
Very smooth and I love the green texture.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: TinDragon on May 24, 2006
Hehe, I tried to get that green tile texture in a TTD demo for ages but Zawran always came up with something that looked better, dont think he liked it that much but I finally got to use it  >:D
Title: Re: New Coding Challenge (Tunnel effects).
Post by: zawran on May 24, 2006
I have to admit that I wasn't that keen on it, and as Jon says, I always managed to make something else we ended up using. :)

Perhaps I should make a tunnel effect since everyone else is contributing. I will see if I have time for it before the week is over.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: zparticle on May 24, 2006
this is kind of cheating since I did this right before the compo got announced but - here is my entry

http://dbfinteractive.com/index.php?topic=61.0
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 24, 2006
Zparticle, that tunnel is wicked as you know :)

Jon I was amazed at your BB2D tunnel with what looks like a perfect perspective correct texture mapper and it's running here at over 100fps in 640X480 mode which is quicker than I can poke the screen buffer full of plain pixels, that's bloody impressive :)

Zawran, I'll look forward to seeing what you come up with.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: TinDragon on May 24, 2006
Yes I was very suprized at the speed I got here on this PC, on my old one when it had a GeforceFX 5200 card it was a struggle getting anywhere close to 60fps and generally was difficult getting over 43fps, but on my new PC it seems to fly along at about the 100fps mark. I can only assume that blitz had some form of optimizing go on or that newer drivers have better transfer rate. But I think you should be able to get at least as good in TinyPTC once you have the routines coded and I wouldn't be suprized to see faster.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: relsoft on May 25, 2006
Green voronoi!!! Woot!!! Nice!
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Rbz on May 25, 2006
www.tindragons.com/demos/ttdtunnel.zip

Why I can't download it ?   ???

Tried "Save target ..." without success 
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Ghost^BHT on May 25, 2006
Same here - can't dl  ???
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Clyde on May 25, 2006
Probably updating their site as mentioned earlier.

I also got full fps on the kermit tunnel, 75fps, which my monitor refresh rate is.

Cool tunnels everyone, grand efforts all round.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: TinDragon on May 25, 2006
I am not entirely sure whats happening with the site, philcom actually owns the domain and space and lets me use it for free but it's been a while since I have seen him about it, I do know that there are server upgrades going on in the data centre so perhaps it's offline for that. Hopefully it will be back up soon or I will have to find a new host  :(
Title: Re: New Coding Challenge (Tunnel effects).
Post by: relsoft on May 25, 2006
Here's another entry from me. This time C++. I got an FB ver too if you'd like to see it. :*)

http://rel.betterwebber.com/junk.php?id=48

 O0

TinDragon.  That voronoi texture could be generated procedurally so you'd be able to ditch external images. :*)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: TinDragon on May 25, 2006
Yes I have never really done much with texture generation in code, maybe I will look into it as it would be nice to create textures on the fly and use them, would be cool for making tiny demos and intro's with as little external media as possible, if only I could code a soft synth as well  ;)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 25, 2006
Yeah Rel, those are really cool! :)
When do you get the time to make all this stuff? I struggle for time always!
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Clyde on May 25, 2006
@Relsoft: You could always post the FB version in the Code place.
I was going to enter one, but looking at all those cool tunnel submissions, mine would look lost.

Congrats all.
Clyde.
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on May 25, 2006
I think you should still enter one if you have time Clyde :)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: relsoft on May 25, 2006
Yeah Rel, those are really cool! :)
When do you get the time to make all this stuff? I struggle for time always!

Nah. It's an old tunnel I made before I "disappeared" from the community for a while. I haven't been able to code for like 4-5 months. Never seen a computer at that time too. I had to do something for my wife's family back then. :*)

http://rel.betterwebber.com/index.php?action=viewmsg&num=335&forum=Announce

Thanks for the feedback.

BTW Clyde. I used to not be able to do these things.  In fact I can't do anything to impress you guys 5 years ago.  You'll get better as we all are. Practice makes perfect. In fact, I can see in you the makings of a great democoder someday. Just code for fun and it will come to you. :*)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: xteraco on June 03, 2006
i just wanted to say, while i'm thinking about it, that everyone has had great tunnels, and watching this thing pan out
has been very exciting :)   

keep on coding :)
Title: Re: New Coding Challenge (Tunnel effects).
Post by: Shockwave on June 03, 2006
Xteraco, have some good Karma for being such a good sport about the comments on your font!