OK that was done using _PutImage, many ways to skin a cat!
Here is what can be done by saving pixels to an array:
Once again QBJS fails to run a simple peice of code. @dbox I find you more to fix
QBJS can do POINT stuff I think. Did not like Common, God how old is this code? I was still using Common, replace with DIM Shared. DefInt was a problem too, commented out and just the plasma works but no points loaded in array???
Here is what can be done by saving pixels to an array:
Code: (Select All)
_Title "WELCOME"
Randomize Timer
Const xmax = 1200
Const ymax = 600
_Define A-Z As INTEGER
Common Shared cN, pR!, pG!, pB!
Screen _NewImage(xmax, ymax, 32)
mess$ = " Amazing.bas how sweet thou art... "
Print mess$
w = 8 * Len(mess$): h = 16
Dim p(w, h)
black&& = Point(0, 10)
For y = 0 To h
For x = 0 To w
If Point(x, y) <> black&& Then
p(x, y) = 1
End If
Next
Next
Cls
xo = 5: yo = 235: m = 4
resetPlasma
While 1
For y = 0 To h - 1
For x = 0 To w - 1
If p(x, y) Then
changePlasma
Else
Color 0
End If
Line (xo + x * m, yo + y * m)-(xo + x * m + m, yo + y * m + m), , BF
Next
Next
_Limit 10
lc = lc + 1
If lc Mod 30 = 0 Then resetPlasma
Wend
Sub changePlasma ()
cN = cN + 1
Color _RGB(127 + 127 * Sin(pR! * .3 * cN), 127 + 127 * Sin(pG! * .3 * cN), 127 + 127 * Sin(pB! * .3 * cN))
End Sub
Sub resetPlasma ()
pR! = Rnd ^ 2: pG! = Rnd ^ 2: pB! = Rnd ^ 2
End SubOnce again QBJS fails to run a simple peice of code. @dbox I find you more to fix
QBJS can do POINT stuff I think. Did not like Common, God how old is this code? I was still using Common, replace with DIM Shared. DefInt was a problem too, commented out and just the plasma works but no points loaded in array???
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

