Log In  


Cart #retrowave_demo-0 | 2020-05-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
11

11


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


thnx i'll try it


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

Cart #kogoyejeta-0 | 2020-05-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


thanx to everybody


ah now we are talking ;)



[Please log in to post a comment]