01-11-2025, 10:28 PM
Code: (Select All)
Dim As Integer u1, u2, j, ps, wd, ht, x, y, xm, ym
Dim As Long mfont
Randomize Val(Right$(Time$, 2))
ps = 20
xm = ps \ 2
ym = ps
wd = 640
ht = 400
Screen _NewImage(wd, ht, 32)
mfont = _LoadFont("CousineNerdFontMono-Regular.ttf", ps, "UNICODE")
_Font mfont
_PrintMode _KeepBackground
For j = 1 To 1600
u1 = &H25
u2 = Int(Rnd * 3) + &H71
If u2 <> &H72 Then
_UPrintString (x, y), Chr$(&H71) + Chr$(u1), ps, 16
End If
If u2 <> &H71 Then
_UPrintString (x, y), Chr$(&H72) + Chr$(u1), ps, 16
End If
x = x + xm
If x >= wd Then
x = 0
y = y + ym
If y >= ht Then Exit For
End If
Next
Sleep
System
I don't know why some folks are acting like it's difficult to get this demo to run on Windows. All one has to do is grab the proper font file (I've zipped it up and attached it here for convenience's sake, but it can be found following the link in the first post as well.), and then extract it into the QB64PE folder and change the path where it'll be found as above.
That's all there is to it!
1) Copy code above into IDE
2) Download and extract font here into your QB64PE folder.
3) Compile and Run.
Nothing complicated about any of that.