|
Post by tsh73 on Jan 18, 2023 21:16:47 GMT
If you run this program justbasiccom.proboards.com/thread/950/light-lenses-table-simulation-moreand pressed L, you saw how rays grow, one by one. But after drawing they stay static. I wonder about way to "liven it up", make it somehow sparkle. I dunno, make a sparkle (or short burst of sparkles) run along the ray during idle loop? I got something but it does not look any good. :( But it might be a start. (and by capturing and enlarging I found that dot with "size 3".."size 6" somehow take EVEN pixels height, so it impossible to align it properly over a line) nomainwin
NN=1000 dim x(NN), y(NN)
open "test" for graphics_nsb_fs as #gr #gr "home; down; posxy cx cy" #gr "fill black; flush" #gr "trapclose [quit]"
N=100 #gr "color white" #gr "line 0 ";cy-1;" ";2*cx;" ";cy-1 #gr "size 4" '#gr "size 5" #gr "rule XOR" 'works for black over white #gr "rule ";_R2_XORPEN 'for white over black?
'initial placement x=0 y=cy for i = 1 to N x=x+int(rnd(0)*100) if x > 2*cx then N=i: exit for 'initial N is too big x = x mod(2*cx) y=cy x(i)=x: y(i)=y #gr "set ";x(i);" ";y(i) next
'wait
dt=10
timer dt, [tick] wait
[tick] for i = 1 to N SCAN 'clear #gr "set ";x(i);" ";y(i) 'move x(i)=(x(i)+5) mod(2*cx) y(i)=cy 'redraw #gr "set ";x(i);" ";y(i) next
wait
wait
[quit] timer 0 close #gr end
|
|
|
Post by plus on Jan 19, 2023 18:36:32 GMT
eh! everything I can think that sparkles needs at least 2D graphics and jb not so fast with screen clear graphics, maybe a sparkle sprite or several! Actually I am seeing something like a burning fuse. Have I ever translated my Basic, Le Bomb, probably not, need lots of fast graphics for explosions.
|
|