Dark Bit Factory & Gravity

PROGRAMMING => Purebasic => Topic started by: benny! on March 14, 2007

Title: something round.
Post by: benny! on March 14, 2007
Just a little small conversion of an old demoFX. Enjoy!

Exe attached for those without purebasic


; something round.
; a conversion of an old demoFX
; by benny|weltenkonstrukteur.de
; o8.o6.o5

winTitle.s  = "something round."
#LOOPTIME   = 1000/14  ; 40 Frames in 1000ms (1second)

hwnd.l = OpenWindow(0, 0,0, 320, 240, winTitle.s, #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If hwnd
  If InitSprite()
    If OpenWindowedScreen(hwnd, 0, 0, 320, 240, 0, 0, 0)
     
        Dim px.f(15)
        Dim py.f(15)
       
        Repeat   
         
          Select WindowEvent()
            Case #PB_Event_CloseWindow
              Quit = #True
          EndSelect
         
          FlipBuffers()
          If IsScreenActive() 
            ClearScreen(RGB(0,0,0) )
            StartDrawing(ScreenOutput())
                DrawingMode( #PB_2DDrawing_XOr)
                px(0) = 160+8*Cos(a.f)
                py(0) = 120+8*Sin(a.f)
                For i=1 To 14 Step 2
                  px(i-1) = px (i)
                  py(i-1) = py (i)
                  px(i) = 160+8*Cos (a.f * (1+i*0.1))
                  py(i) = 120+8*Sin (a.f * (1+i*0.1))
                  Circle(px(i), py(i), 110-i*8, RGB(155,155,155))
                Next i
                a + 0.4
                StopDrawing()
          EndIf
         
          ; Run Program at a constant rate 
          While ( ElapsedMilliseconds()-LoopTimer )<#LOOPTIME : Delay(1) : Wend 
          LoopTimer = ElapsedMilliseconds()
        Until Quit = #True
       
    EndIf
  EndIf
EndIf
End
Title: Re: something round.
Post by: mike_g on March 14, 2007
Thats a cool wobbly effect  :)
Title: Re: something round.
Post by: Shockwave on March 14, 2007
Hehe, classic effect :D Nicely done Benny.
Title: Re: something round.
Post by: zawran on March 14, 2007
Cool effect.
Title: Re: something round.
Post by: benny! on March 14, 2007
Thanks, mates!
Title: Re: something round.
Post by: rdc on March 14, 2007
Cool one there.
Title: Re: something round.
Post by: Clyde on March 14, 2007
Ace effect dude.
Title: Re: something round.
Post by: benny! on March 15, 2007
Glad you like it  ;)
Title: Re: something round.
Post by: Paul on March 15, 2007
hehe, nice :)