I'm trying to make a tetris game in pico 8, and the way im doing it is with a 2d array. i can make the array fine, but i have no idea how to draw it on the screen. my array is 10x20, just like a normal tetris board, and the pieces that should be blocks are 1, everything else is 0.
please help me.
loop over the top TABLE (its a table, not an array. this is more important than it sounds) with
for x=1,#table do end |
then, inside that loop, loop over the inner table with
for y=1,#table[x] do end |
then, draw based on that loop
for x=1,#table do for y=1,#table do --draw stuff here --x*8 y*8 is your positions end end |
[Please log in to post a comment]