Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a faster way to do this glow circle effect?
#5
here it is with no fade, like laser spot light
Code: (Select All)
Screen _NewImage(1000, 700, 32)

'draw a background
For x = 0 To _Width Step 25
    For y = 0 To _Height Step 25
        Line (x, y)-Step(25, 25), _RGBA(Rnd * 255, Rnd * 255, Rnd * 255, 150), BF
    Next
Next

back& = _CopyImage(_Display) 'image to use

rsearch = 100

Do
    Cls
    _PutImage , back&, 0

    'get mouse input
    While _MouseInput: Wend
    mx = _MouseX: my = _MouseY

    'point to the work screen
    If work& Then _FreeImage work&
    work& = _NewImage(_Width, _Height, 32) 'faded area image
    _Dest work&

    'place background first
    Circle (mx, my), rsearch, _RGB32(0, 0, 0)
    If mx < 2 * rsearch And my < 2 * rsearch Then
        Paint (_Width - 1, _Height - 1), _RGB32(0, 0, 0), _RGB32(0, 0, 0)
    Else
        Paint (0, 0), _RGB32(0, 0, 0), _RGB32(0, 0, 0)
    End If

    'go back to main screen
    _Dest 0

    'put faded area& onto screen
    _PutImage , work&, 0

    _Display
    _Limit 30

Loop Until InKey$ <> ""
b = b + ...
Reply


Messages In This Thread
RE: Is there a faster way to do this glow circle effect? - by bplus - 06-16-2024, 03:01 PM



Users browsing this thread: 3 Guest(s)