Update the board.
updateboard x,y,width,height;
I haven't done anything of this sort in a while, but I am thinking at the end you can do (at the end):
PHP Code:
updateboard 0,0,64,64;
or (asumming you are using nested 'for' loops with the variables: 'this.bx' and 'this.by'), then you can do after each tile update:
PHP Code:
updateboard this.bx,this.by,1,1;