Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SierraKen

Pages: [1] 2 3 ... 97
1
Ah yeah, I know 9 won't work because it uses Windows internal commands. I would think 7 should work though, but I don't know hardly anything about Linux. Sorry they aren't much use. If you want, you can just look at the code and see how I used variables and circles and boxes, etc. You can break it apart if you wish and put it in your own code, etc.

2
Here is my Paint Pixels 9. It might take awhile to learn, maybe you can learn sections at a time if you want to. It's been a couple years since I made this, using help from this forum, so I myself would have to relearn some of it. It is attached as Paint Pixels 9.zip
Put all the files in the same directory.



3
Yeah, here's Paint Pixels 7, before I got into using window menus. I can't seem to find 8 or 9 on this forum, but I'll put 9 up after this post if you are interested.

https://qb64forum.alephc.xyz/index.php?topic=1992.msg112372#msg112372

4
Wow stuff like that is old old school. :) I remember my first online friend made something like that, but the grid was smaller and it wasn't ASCII, instead it was a Sprite Editor, to be used with other games and programs. Nowadays a sprite editor would have to be a bit larger though, because of the larger monitors and better graphics.

5
Programs / Re: Just a silly "Hello World" Marquis
« on: April 06, 2022, 08:33:29 pm »
LOL Steve and B+!

My history of using BASIC is a bit scattered, but here you go:

1987 - Used my friend's Texas Instruments to program with using magazines.
1988 - My parents bought a Franklin 2000 (Apple 2e compatible - which Franklin was sued a bit later by Apple but I never knew about that) from Sears. Remember the HOME command instead of CLS?
1988 - I took 2 programming classes in school, one in High School (Apple 2e BASIC) and one in the summer in college (BASICA on IBM's) (while I was still in High School).
1992 - We sold the Franklin.
1995 - We bought a Pentium 90 with Windows 95 and that is when I met my first online buddies on the comp.lang.basic.misc newsgroup and made my own GeoCities website with my new QBasic programs.
1996 - I found a free small BASIC language with a compiler called ASIC 5.0. It was based a lot on GW-BASIC. I added a lot of these to the old All Basic Code monthly packets and put them on my website.
Then I got bored and didn't like trying to fix programs until midnight all the time so I stopped for awhile.
Around 2005 or so I tried Visual Basic a little bit but not much.
Then finally in 2019 I found QB64! :D

6
Programs / Re: Just a silly "Hello World" Marquis
« on: April 05, 2022, 06:46:33 pm »
That's cool Charlie!

I still remember my first "Hello World" in my High School Apple 2e BASIC class in the 1980's:

10 PRINT "HELLO WORLD"
20 GOTO 10

Muahahahahaha... well, we thought we were cool. :D

7
Programs / Re: B+'s Matrix Rain With World Map Backdrop
« on: April 05, 2022, 01:25:49 pm »
Wow that is a lot faster. Probably has something to do with the graphics card memory.

8
Programs / Re: B+'s Matrix Rain With World Map Backdrop
« on: April 02, 2022, 05:04:54 pm »
You know, it kinda resembles the world, digitally connected through the Internet and non-stop traffic. :)

9
Programs / Re: B+'s Matrix Rain With World Map Backdrop
« on: April 02, 2022, 04:49:32 pm »
Here's an even BETTER version! I inverted the colors to the world map.
B+, I finally figured out why you load the file from within the program, I had no idea that the symbols, letters, and numbers all come from THIS program! LOL Awesome!

Make sure and name it the same as before: Matrix Rain 4 mod by SierraKen.bas

I added a 2 on the world_map.jpg so you can keep both.

Code: QB64: [Select]
  1. _Title "Matrix Rain 4 mod by SierraKen" 'B+ started 2019-03-16
  2. ' from Matrix Rain 2019-03-14
  3. ' or QB64 Purple Rain!
  4.  
  5. '>>> Save this file as: Matrix Rain 4 mod by SierraKen.bas, so the program can load the strings from it.  <<<
  6.  
  7. '2019-03-15 This will attempt to spin the drops as they fall
  8. '2019-03-16  Don't need no damn Character Set.DAT file!!!
  9. '2019-03-16 Ijust want to see the vertical code strings dangle and twist.
  10.  
  11. '2019-03-19 Matrix Rain 4
  12. ' + added randWeight to weight the random sizes chosen so many more on small side than large
  13. ' + draw letters on a transparent background so the background of the letter does not cover
  14. '   the drops behind it.
  15.  
  16. 'Mod by SierraKen - Added World Map as the backdrop. - April 2, 2022.
  17.  
  18. Const xmax = 1500
  19. Const ymax = 659
  20. Const nDrops = 500
  21. Type dropType
  22.     x As Single
  23.     sz As Single
  24.     curY As Integer
  25.     dxs As Single 'direction and change of spin some small fraction of 1, +-1/3, +-1/4, +-1/5...
  26.  
  27. 'SierraKen's World Map code with the array, GET, and DEST ---------------------------------------------
  28. Dim map As Long
  29.  
  30. map& = _LoadImage("world_map2.jpg", 32)
  31. Screen map&
  32. wide& = _Width(map&): deep& = _Height(map&)
  33.  
  34. Dim Array(wide& * deep&) As Long
  35.  
  36. _Source map& 'REQUIRED to GET the proper image area!
  37. Get (0, 0)-(wide& - 1, deep& - 1), Array(0)
  38.  
  39.  
  40. '-------------------------------------------------------------------------------------------------------
  41.  
  42. 'Screen _NewImage(xmax, ymax, 32)
  43. _ScreenMove 80, 0 'for snap shot
  44. '_FULLSCREEN 'as screen saver
  45.  
  46. ReDim Shared fileStrings$(1000) 'container for these program lines that will be dangling
  47. Open "Matrix Rain 4 mod by SierraKen.bas" For Input As #1
  48.     Line Input #1, fs$
  49.     If Len(LTrim$(fs$)) <> 0 Then 'less empty spaces
  50.         fileStrings$(i) = LTrim$(fs$)
  51.         i = i + 1
  52.     End If
  53. ReDim _Preserve fileStrings$(i - 1)
  54. ' check loading
  55. 'FOR i = 0 TO UBOUND(fileStrings$)
  56. '    PRINT i, fileStrings$(i)
  57. 'NEXT
  58. 'END
  59.  
  60. 'setup drops
  61. Dim Shared drop(nDrops) As dropType
  62. Dim Shared s$(nDrops)
  63.  
  64. For i = 0 To nDrops
  65.     newDrop i, 1
  66.  
  67. While _KeyDown(27) = 0
  68.     Cls
  69.     'SierraKen's PUT statement ----------------------------
  70.     Put (0, 0), Array(0), PSet , _RGB(0, 0, 0)
  71.     '------------------------------------------------------
  72.  
  73.     For i = 0 To nDrops
  74.         drawDrop (i)
  75.         drop(i).curY = drop(i).curY + 1
  76.         If drop(i).curY > Len(s$(i)) Then newDrop i, 0
  77.     Next
  78.     _Display
  79.     _Limit 25
  80.  
  81. Sub newDrop (i, start)
  82.     drop(i).x = Rnd * xmax 'set location
  83.     drop(i).sz = randWeight(.3, 5, 3) 'set size  weighted on small sizes
  84.     'length of text string can fit on screen
  85.     charLength = ymax \ (drop(i).sz * 16) + 1 'from size determine how many chars fit on screen
  86.     randLine = Int(Rnd * UBound(fileStrings$)) 'pick a random program line
  87.     s$(i) = Mid$(fileStrings$(randLine), 1, charLength) 'here is text string to dangle
  88.     While Len(s$(i)) < charLength
  89.         If randLine + 1 > UBound(fileStrings$) Then randLine = 0 Else randLine = randLine + 1
  90.         s$(i) = Mid$(s$(i) + " : " + fileStrings$(randLine), 1, charLength)
  91.     Wend
  92.     If start <> 0 Then drop(i).curY = Int(Rnd * (charLength)) + 1 Else drop(i).curY = 1 'flat and readable at curY
  93.     drop(i).dxs = 1 / (Int(Rnd * 7) + 3) 'change of spin rate +-1/3, +-1/4, ... +-1/9
  94.     If Rnd < .5 Then drop(i).dxs = -drop(i).dxs
  95.  
  96. Sub drawDrop (i)
  97.     For j = 1 To drop(i).curY
  98.         d = drop(i).curY - j
  99.         If d = 0 Then
  100.             c~& = _RGBA32(0, 255, 0, 225)
  101.         ElseIf d = 1 Then
  102.             c~& = _RGBA32(50, 255, 0, 205)
  103.         ElseIf d = 2 Then
  104.             c~& = _RGBA32(25, 255, 0, 180)
  105.         ElseIf d >= 3 Then
  106.             c~& = _RGBA32(0, 255, 0, 190 - d * 5)
  107.         End If
  108.         rot = 1: dir = -1
  109.         For k = 0 To d
  110.             rot = rot + drop(i).dxs * dir
  111.             If rot > 1 Then dir = -1 * dir: rot = 1 + drop(i).dxs * dir
  112.             If rot < -1 Then dir = dir * -1: rot = -1 + drop(i).dxs * dir
  113.         Next
  114.         drwChar Mid$(s$(i), j, 1), c~&, 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
  115.     Next
  116.  
  117. Sub drwChar (char$, c As _Unsigned Long, midX, midY, xScale, yScale, Rotation) 'what ever the present color is set at
  118.     I& = _NewImage(8, 16, 32)
  119.     _Dest I&
  120.     Color c, _RGBA32(0, 0, 0, 0)
  121.     _PrintString (0, 0), char$
  122.     _Dest 0
  123.     RotoZoom2 midX, midY, I&, xScale, yScale, Rotation
  124.     _FreeImage I&
  125.  
  126. Sub RotoZoom2 (X As Long, Y As Long, Image As Long, xScale As Single, yScale As Single, Rotation As Single)
  127.     Dim px(3) As Single: Dim py(3) As Single
  128.     W& = _Width(Image&): H& = _Height(Image&)
  129.     px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
  130.     px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
  131.     sinr! = Sin(-Rotation): cosr! = Cos(-Rotation)
  132.     For i& = 0 To 3
  133.         x2& = (px(i&) * cosr! + sinr! * py(i&)) * xScale + X: y2& = (py(i&) * cosr! - px(i&) * sinr!) * yScale + Y
  134.         px(i&) = x2&: py(i&) = y2&
  135.     Next
  136.     _MapTriangle (0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
  137.     _MapTriangle (0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
  138.  
  139. Function randWeight (manyValue, fewValue, power)
  140.     randWeight = manyValue + Rnd ^ power * (fewValue - manyValue)
  141.  

10
Programs / Re: B+'s Matrix Rain With World Map Backdrop
« on: April 02, 2022, 04:27:33 pm »
Here is a green version. I like it better myself because it's easier on the eyes with the white map background.
I'll add the map file also again.
Make sure and name this also: Matrix Rain 4 mod by SierraKen.bas

Code: QB64: [Select]
  1. _Title "Matrix Rain 4 mod by SierraKen" 'B+ started 2019-03-16
  2. ' from Matrix Rain 2019-03-14
  3. ' or QB64 Purple Rain!
  4.  
  5. '>>> Save this file as: Matrix Rain 4 mod by SierraKen.bas, so the program can load the strings from it.  <<<
  6.  
  7. '2019-03-15 This will attempt to spin the drops as they fall
  8. '2019-03-16  Don't need no damn Character Set.DAT file!!!
  9. '2019-03-16 Ijust want to see the vertical code strings dangle and twist.
  10.  
  11. '2019-03-19 Matrix Rain 4
  12. ' + added randWeight to weight the random sizes chosen so many more on small side than large
  13. ' + draw letters on a transparent background so the background of the letter does not cover
  14. '   the drops behind it.
  15.  
  16. 'Mod by SierraKen - Added World Map as the backdrop. - April 2, 2022.
  17.  
  18. Const xmax = 1500
  19. Const ymax = 659
  20. Const nDrops = 500
  21. Type dropType
  22.     x As Single
  23.     sz As Single
  24.     curY As Integer
  25.     dxs As Single 'direction and change of spin some small fraction of 1, +-1/3, +-1/4, +-1/5...
  26.  
  27. 'SierraKen's World Map code with the array, GET, and DEST ---------------------------------------------
  28. Dim map As Long
  29.  
  30. map& = _LoadImage("world_map.jpg", 32)
  31. Screen map&
  32. wide& = _Width(map&): deep& = _Height(map&)
  33.  
  34. Dim Array(wide& * deep&) As Long
  35.  
  36. _Source map& 'REQUIRED to GET the proper image area!
  37. Get (0, 0)-(wide& - 1, deep& - 1), Array(0)
  38.  
  39.  
  40. '-------------------------------------------------------------------------------------------------------
  41.  
  42. 'Screen _NewImage(xmax, ymax, 32)
  43. _ScreenMove 80, 0 'for snap shot
  44. '_FULLSCREEN 'as screen saver
  45.  
  46. ReDim Shared fileStrings$(1000) 'container for these program lines that will be dangling
  47. Open "Matrix Rain 4 mod by SierraKen.bas" For Input As #1
  48.     Line Input #1, fs$
  49.     If Len(LTrim$(fs$)) <> 0 Then 'less empty spaces
  50.         fileStrings$(i) = LTrim$(fs$)
  51.         i = i + 1
  52.     End If
  53. ReDim _Preserve fileStrings$(i - 1)
  54. ' check loading
  55. 'FOR i = 0 TO UBOUND(fileStrings$)
  56. '    PRINT i, fileStrings$(i)
  57. 'NEXT
  58. 'END
  59.  
  60. 'setup drops
  61. Dim Shared drop(nDrops) As dropType
  62. Dim Shared s$(nDrops)
  63.  
  64. For i = 0 To nDrops
  65.     newDrop i, 1
  66.  
  67. While _KeyDown(27) = 0
  68.     Cls
  69.     'SierraKen's PUT statement ----------------------------
  70.     Put (0, 0), Array(0), PSet , _RGB(0, 0, 0)
  71.     '------------------------------------------------------
  72.  
  73.     For i = 0 To nDrops
  74.         drawDrop (i)
  75.         drop(i).curY = drop(i).curY + 1
  76.         If drop(i).curY > Len(s$(i)) Then newDrop i, 0
  77.     Next
  78.     _Display
  79.     _Limit 25
  80.  
  81. Sub newDrop (i, start)
  82.     drop(i).x = Rnd * xmax 'set location
  83.     drop(i).sz = randWeight(.3, 5, 3) 'set size  weighted on small sizes
  84.     'length of text string can fit on screen
  85.     charLength = ymax \ (drop(i).sz * 16) + 1 'from size determine how many chars fit on screen
  86.     randLine = Int(Rnd * UBound(fileStrings$)) 'pick a random program line
  87.     s$(i) = Mid$(fileStrings$(randLine), 1, charLength) 'here is text string to dangle
  88.     While Len(s$(i)) < charLength
  89.         If randLine + 1 > UBound(fileStrings$) Then randLine = 0 Else randLine = randLine + 1
  90.         s$(i) = Mid$(s$(i) + " : " + fileStrings$(randLine), 1, charLength)
  91.     Wend
  92.     If start <> 0 Then drop(i).curY = Int(Rnd * (charLength)) + 1 Else drop(i).curY = 1 'flat and readable at curY
  93.     drop(i).dxs = 1 / (Int(Rnd * 7) + 3) 'change of spin rate +-1/3, +-1/4, ... +-1/9
  94.     If Rnd < .5 Then drop(i).dxs = -drop(i).dxs
  95.  
  96. Sub drawDrop (i)
  97.     For j = 1 To drop(i).curY
  98.         d = drop(i).curY - j
  99.         If d = 0 Then
  100.             c~& = _RGBA32(0, 255, 0, 225)
  101.         ElseIf d = 1 Then
  102.             c~& = _RGBA32(50, 255, 0, 205)
  103.         ElseIf d = 2 Then
  104.             c~& = _RGBA32(25, 255, 0, 180)
  105.         ElseIf d >= 3 Then
  106.             c~& = _RGBA32(0, 255, 0, 190 - d * 5)
  107.         End If
  108.         rot = 1: dir = -1
  109.         For k = 0 To d
  110.             rot = rot + drop(i).dxs * dir
  111.             If rot > 1 Then dir = -1 * dir: rot = 1 + drop(i).dxs * dir
  112.             If rot < -1 Then dir = dir * -1: rot = -1 + drop(i).dxs * dir
  113.         Next
  114.         drwChar Mid$(s$(i), j, 1), c~&, 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
  115.     Next
  116.  
  117. Sub drwChar (char$, c As _Unsigned Long, midX, midY, xScale, yScale, Rotation) 'what ever the present color is set at
  118.     I& = _NewImage(8, 16, 32)
  119.     _Dest I&
  120.     Color c, _RGBA32(0, 0, 0, 0)
  121.     _PrintString (0, 0), char$
  122.     _Dest 0
  123.     RotoZoom2 midX, midY, I&, xScale, yScale, Rotation
  124.     _FreeImage I&
  125.  
  126. Sub RotoZoom2 (X As Long, Y As Long, Image As Long, xScale As Single, yScale As Single, Rotation As Single)
  127.     Dim px(3) As Single: Dim py(3) As Single
  128.     W& = _Width(Image&): H& = _Height(Image&)
  129.     px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
  130.     px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
  131.     sinr! = Sin(-Rotation): cosr! = Cos(-Rotation)
  132.     For i& = 0 To 3
  133.         x2& = (px(i&) * cosr! + sinr! * py(i&)) * xScale + X: y2& = (py(i&) * cosr! - px(i&) * sinr!) * yScale + Y
  134.         px(i&) = x2&: py(i&) = y2&
  135.     Next
  136.     _MapTriangle (0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
  137.     _MapTriangle (0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
  138.  
  139. Function randWeight (manyValue, fewValue, power)
  140.     randWeight = manyValue + Rnd ^ power * (fewValue - manyValue)
  141.  
  142.  


11
Programs / B+'s Matrix Rain With World Map Backdrop
« on: April 02, 2022, 03:17:31 pm »
Almost all of this code is from B+'s Matrix Rain 4. I tried to find the original post but one link didn't work anymore. Anyhow, for 2 days I've tried to add a world map as the backdrop to it and  finally succeeded using GET and PUT from the QB64 Wiki pages. I remembered that back in the 1990's I used to use XOR to make a background image with moving graphics over it. But instead of having to use XOR, DEST works pretty similar, with PUT and GET. Here is the code, photo, and the required world_map.jpg needed in the same folder as the code. I tried to section-off where I added my own code to this. Thank you B+!

Make sure and name this file, it won't work if you don't: Matrix Rain 4 mod by SierraKen.bas

Code: QB64: [Select]
  1. _Title "Matrix Rain 4 mod by SierraKen" 'B+ started 2019-03-16
  2. ' from Matrix Rain 2019-03-14
  3. ' or QB64 Purple Rain!
  4.  
  5. '>>> Save this file as: Matrix Rain 4 mod by SierraKen.bas, so the program can load the strings from it.  <<<
  6.  
  7. '2019-03-15 This will attempt to spin the drops as they fall
  8. '2019-03-16  Don't need no damn Character Set.DAT file!!!
  9. '2019-03-16 Ijust want to see the vertical code strings dangle and twist.
  10.  
  11. '2019-03-19 Matrix Rain 4
  12. ' + added randWeight to weight the random sizes chosen so many more on small side than large
  13. ' + draw letters on a transparent background so the background of the letter does not cover
  14. '   the drops behind it.
  15.  
  16. 'Mod by SierraKen - Added World Map as the backdrop. - April 2, 2022.
  17.  
  18. Const xmax = 1500
  19. Const ymax = 659
  20. Const nDrops = 500
  21. Type dropType
  22.     x As Single
  23.     sz As Single
  24.     curY As Integer
  25.     dxs As Single 'direction and change of spin some small fraction of 1, +-1/3, +-1/4, +-1/5...
  26.  
  27. 'SierraKen's World Map code with the array, GET, and DEST ---------------------------------------------
  28. Dim map As Long
  29.  
  30. map& = _LoadImage("world_map.jpg", 32)
  31. Screen map&
  32. wide& = _Width(map&): deep& = _Height(map&)
  33.  
  34. Dim Array(wide& * deep&) As Long
  35.  
  36. _Source map& 'REQUIRED to GET the proper image area!
  37. Get (0, 0)-(wide& - 1, deep& - 1), Array(0)
  38.  
  39.  
  40. '-------------------------------------------------------------------------------------------------------
  41.  
  42. 'Screen _NewImage(xmax, ymax, 32)
  43. _ScreenMove 80, 0 'for snap shot
  44. '_FULLSCREEN 'as screen saver
  45.  
  46. ReDim Shared fileStrings$(1000) 'container for these program lines that will be dangling
  47.  
  48. 'Changed this name. ----------------------------------------
  49. Open "Matrix Rain 4 mod by SierraKen.bas" For Input As #1
  50. '----------------------------------------------------------------
  51.     Line Input #1, fs$
  52.     If Len(LTrim$(fs$)) <> 0 Then 'less empty spaces
  53.         fileStrings$(i) = LTrim$(fs$)
  54.         i = i + 1
  55.     End If
  56. ReDim _Preserve fileStrings$(i - 1)
  57. ' check loading
  58. 'FOR i = 0 TO UBOUND(fileStrings$)
  59. '    PRINT i, fileStrings$(i)
  60. 'NEXT
  61. 'END
  62.  
  63. 'setup drops
  64. Dim Shared drop(nDrops) As dropType
  65. Dim Shared s$(nDrops)
  66.  
  67. For i = 0 To nDrops
  68.     newDrop i, 1
  69.  
  70. While _KeyDown(27) = 0
  71.     Cls
  72.     'SierraKen's PUT statement ----------------------------
  73.     Put (0, 0), Array(0), PSet , _RGB(0, 0, 0)
  74.     '------------------------------------------------------
  75.  
  76.     For i = 0 To nDrops
  77.         drawDrop (i)
  78.         drop(i).curY = drop(i).curY + 1
  79.         If drop(i).curY > Len(s$(i)) Then newDrop i, 0
  80.     Next
  81.     _Display
  82.     _Limit 25
  83.  
  84. Sub newDrop (i, start)
  85.     drop(i).x = Rnd * xmax 'set location
  86.     drop(i).sz = randWeight(.3, 5, 3) 'set size  weighted on small sizes
  87.     'length of text string can fit on screen
  88.     charLength = ymax \ (drop(i).sz * 16) + 1 'from size determine how many chars fit on screen
  89.     randLine = Int(Rnd * UBound(fileStrings$)) 'pick a random program line
  90.     s$(i) = Mid$(fileStrings$(randLine), 1, charLength) 'here is text string to dangle
  91.     While Len(s$(i)) < charLength
  92.         If randLine + 1 > UBound(fileStrings$) Then randLine = 0 Else randLine = randLine + 1
  93.         s$(i) = Mid$(s$(i) + " : " + fileStrings$(randLine), 1, charLength)
  94.     Wend
  95.     If start <> 0 Then drop(i).curY = Int(Rnd * (charLength)) + 1 Else drop(i).curY = 1 'flat and readable at curY
  96.     drop(i).dxs = 1 / (Int(Rnd * 7) + 3) 'change of spin rate +-1/3, +-1/4, ... +-1/9
  97.     If Rnd < .5 Then drop(i).dxs = -drop(i).dxs
  98.  
  99. Sub drawDrop (i)
  100.     For j = 1 To drop(i).curY
  101.         d = drop(i).curY - j
  102.         If d = 0 Then
  103.             c~& = _RGBA32(255, 100, 255, 225)
  104.         ElseIf d = 1 Then
  105.             c~& = _RGBA32(255, 50, 255, 205)
  106.         ElseIf d = 2 Then
  107.             c~& = _RGBA32(255, 25, 255, 180)
  108.         ElseIf d >= 3 Then
  109.             c~& = _RGBA32(255, 0, 255, 190 - d * 5)
  110.         End If
  111.         rot = 1: dir = -1
  112.         For k = 0 To d
  113.             rot = rot + drop(i).dxs * dir
  114.             If rot > 1 Then dir = -1 * dir: rot = 1 + drop(i).dxs * dir
  115.             If rot < -1 Then dir = dir * -1: rot = -1 + drop(i).dxs * dir
  116.         Next
  117.         drwChar Mid$(s$(i), j, 1), c~&, 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
  118.     Next
  119.  
  120. Sub drwChar (char$, c As _Unsigned Long, midX, midY, xScale, yScale, Rotation) 'what ever the present color is set at
  121.     I& = _NewImage(8, 16, 32)
  122.     _Dest I&
  123.     Color c, _RGBA32(0, 0, 0, 0)
  124.     _PrintString (0, 0), char$
  125.     _Dest 0
  126.     RotoZoom2 midX, midY, I&, xScale, yScale, Rotation
  127.     _FreeImage I&
  128.  
  129. Sub RotoZoom2 (X As Long, Y As Long, Image As Long, xScale As Single, yScale As Single, Rotation As Single)
  130.     Dim px(3) As Single: Dim py(3) As Single
  131.     W& = _Width(Image&): H& = _Height(Image&)
  132.     px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
  133.     px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
  134.     sinr! = Sin(-Rotation): cosr! = Cos(-Rotation)
  135.     For i& = 0 To 3
  136.         x2& = (px(i&) * cosr! + sinr! * py(i&)) * xScale + X: y2& = (py(i&) * cosr! - px(i&) * sinr!) * yScale + Y
  137.         px(i&) = x2&: py(i&) = y2&
  138.     Next
  139.     _MapTriangle (0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
  140.     _MapTriangle (0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image& To(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
  141.  
  142. Function randWeight (manyValue, fewValue, power)
  143.     randWeight = manyValue + Rnd ^ power * (fewValue - manyValue)
  144.  

12
Programs / Re: Easter Egg Decorating
« on: April 01, 2022, 11:49:51 pm »
Awesome stuff B+. Way beyond what I know. I'm still learning the basics of the Matrix example Steve posted.

13
Programs / Re: Easter Egg Decorating
« on: April 01, 2022, 11:06:23 pm »
Dang B+, you surprise me all the time. I wasted a couple hours trying to figure out how to make the Matrix symbols flow over a map of the world, but the map always disappears because of the LINE command. LOL I think it's impossible, even with the BLEND command. I tried DEST and SOURCE in different places, etc, no luck. The best I could do is show the map and make the symbols go over it but without deleting anything, so eventually the symbols fill up the screen.

14
Programs / Re: Easter Egg Decorating
« on: April 01, 2022, 01:40:24 pm »
ROFL.... you might chuckle even more to find out that I'm a preacher at my Christian church. :)

Your other one is awesome! I might have to use your Matrix code on stuff sometimes.

15
Programs / Re: Easter Egg Decorating
« on: April 01, 2022, 01:29:24 pm »
Steve I found the problem, I accidentally didn't copy/paste the first line WorkScreen = _NewImage(800, 800, 32)   
LOL DOH.
I'll try your other one now.

Pages: [1] 2 3 ... 97