Nice but way too slow - use fillp to set gradient and draw the background with horizontal rectfills. Same for filled circles, much better to use clip per row with native circfill.
good luck
1
Also a heads up that if the member of a table you're initializing is keyed by a string, you don't have to use the [] format. So this:
add(buildings,{["x"]=128-i*4+flr(rnd(4))-2, ["height"]=3+flr(rnd(29)), ["width"]=12-flr(rnd(8)), ["depth"]=flr(rnd(4)) }) |
Can be expressed more concisely as:
add(buildings,{x=128-i*4+flr(rnd(4))-2, height=3+flr(rnd(29)), width=12-flr(rnd(8)), depth=flr(rnd(4)) }) |
It's just one of those syntactic-sugar things Lua has, mainly intended to make it feel more like an object than a table.
2
thanx to everybody
[Please log in to post a comment]