46
Programs / Re: B+'s Matrix Rain With World Map Backdrop
« on: April 05, 2022, 05:00:29 pm »
Here's what it was before color change by Ken, Purple Rain light (not white sorry) at the drop end = 0 and growing darker going up.
So try this:
It is so fast need to slow down to catch effects ;-))
Code: QB64: [Select]
- d = drop(i).curY - j
So try this:
Code: QB64: [Select]
- ' Ken added great background and changed rain color
- ' 2022-04-05 b+ adjusted screen for x width 1024 for speedier graphics
- ' from Matrix Rain 2019-03-14
- ' or QB64 Purple Rain!
- '>>> Save this file as: Matrix Rain 4 mod by SierraKen.bas, so the program can load the strings from it. <<<
- '2019-03-15 This will attempt to spin the drops as they fall
- '2019-03-16 Don't need no damn Character Set.DAT file!!!
- '2019-03-16 Ijust want to see the vertical code strings dangle and twist.
- '2019-03-19 Matrix Rain 4
- ' + added randWeight to weight the random sizes chosen so many more on small side than large
- ' + draw letters on a transparent background so the background of the letter does not cover
- ' the drops behind it.
- 'Mod by SierraKen - Added World Map as the backdrop. - April 2, 2022.
- Type dropType
- 'SierraKen's World Map code with the array, GET, and DEST ---------------------------------------------
- Screen WorkScreen
- '_FullScreen '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< optional full screen but out of proportion with map
- i = i + 1
- Close #1
- ' check loading
- 'FOR i = 0 TO UBOUND(fileStrings$)
- ' PRINT i, fileStrings$(i)
- 'NEXT
- 'END
- 'setup drops
- newDrop i, 1
- 'Cls , 0
- 'SierraKen's PUT statement ----------------------------
- _PutImage , map&
- '------------------------------------------------------
- drawDrop (i)
- drop(i).curY = drop(i).curY + 1
- fps = fps + 1
- _Limit 15
- drop(i).sz = randWeight(.3, 5, 3) 'set size weighted on small sizes
- 'length of text string can fit on screen
- charLength = ymax \ (drop(i).sz * 16) + 1 'from size determine how many chars fit on screen
- d = drop(i).curY - j
- rot = 1: dir = -1
- rot = rot + drop(i).dxs * dir
- dir = -1 * dir: rot = 1 + drop(i).dxs * dir
- dir = dir * -1: rot = -1 + drop(i).dxs * dir
- drwChar Asc(s$(i), j), d, drop(i).x + 4 * drop(i).sz, drop(i).sz * 16 * (j - 1) + 8 * drop(i).sz, rot * drop(i).sz, drop(i).sz, 0
- Else 'beyond this value, the 190 - d * 5 becomes a negative value?
- 'For values beyond this, I'm just going to exit the sub and whistle innocently, uncertain what they're supposed to be.... *whistle*
- _Dest temp
- _Dest 0
- RotoZoom2 midX, midY, I(c, char), xScale, yScale, Rotation
- px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
- px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
- x2& = (px(i&) * cosr! + sinr! * py(i&)) * xScale + X: y2& = (py(i&) * cosr! - px(i&) * sinr!) * yScale + Y
- px(i&) = x2&: py(i&) = y2&
- _MapTriangle (0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
- _MapTriangle (0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
It is so fast need to slow down to catch effects ;-))