|
Post by carlgundel on Dec 22, 2021 18:46:48 GMT
|
|
|
Post by Rod on Dec 23, 2021 15:25:23 GMT
A bit clumsy but I am out of time.
nomainwin WindowWidth = 800 WindowHeight = 600 UpperLeftX = int((DisplayWidth-WindowWidth)/2) UpperLeftY = int((DisplayHeight-WindowHeight)/2) open "Matrix" for graphics_nsb as #1 #1 "down ; trapclose [quit]" #1 "font courier_new 12 " s=250 dim s(s,3) for n= 1 to s #1 "color black ; backcolor white" c=int(rnd(0)*65+65) #1 "place 0 14;\";chr$(c) #1 "color green ; backcolor black" #1 "\";chr$(c) #1 "getbmp b";n;" 0 0 11 36" #1 "addsprite s";n;" b";n s(n,1)=int(rnd(0)*60)*13 s(n,2)=int(rnd(0)*33)*18 s(n,3)=int(rnd(0)*20)+2 #1 "spritexy s";n;" ";s(n,1);" ";s(n,2) next #1 "fill black ; getbmp bac 0 0 800 600 ; background bac" #1 "drawsprites"
timer 56, [frame] wait
[frame] for n= 1 to s s(n,2)=s(n,2)+s(n,3) if rnd(0)>.75 then if rnd(0)>.5 then #1 "spriteorient s";n;" mirror" else #1 "spriteorient s";n;" normal" if s(n,2)>600 then s(n,2)=s(n,2)=0-rnd(0)*100 #1 "spritexy s";n;" ";s(n,1);" ";s(n,2) next #1 "drawsprites" wait
[quit] timer 0 close #1 end
|
|
|
Post by tsh73 on Dec 23, 2021 17:02:49 GMT
Interesting
Then I run this on a netbook (win 10, fonts set to 125%) all sprites have white (or gray?) "hat" - single pixel line above. Then I run nit on a desktop (Win XP, font set to 100%) all sprites has vertical 1 pixel line right-hand.
Got to fix it with
#1 "getbmp b";n;" 0 0 10 36"
Looks really nice.
|
|
|
Post by Rod on Dec 23, 2021 18:34:25 GMT
Had the same thing myself and fudged it with choice of bmp size. Something to measure, or know, font pixel size would be
|
|
|
Post by carlgundel on Dec 24, 2021 14:47:44 GMT
Had the same thing myself and fudged it with choice of bmp size. Something to measure, or know, font pixel size would be Yeah. Font selection and sizing is not a precisely predictable effect depending on which fonts you have installed on your system, and perhaps also the video driver might sometimes affect things. If we draw a larger black area around the sprites when we generate them that might give us a better result.
|
|
|
Post by Brandon Parker on Dec 25, 2021 2:45:20 GMT
If we draw a larger black area around the sprites when we generate them that might give us a better result. This is exactly what I did on the LB forum... {:0) Brandon Parker
|
|