0 Members and 3 Guests are viewing this topic.
i've found a picture on the internet from the android tetris app, and it looks really nice. Should i try to make the graphics more like this one, or is that too riscy for tetris himself to do it? otherwise, i think i would love to, but i don't want to do something completely illegal does someone has any idea if it is allowed or not?for now i'm cleaning up the code, cause that was necessary, so if you'd like i'll post it tonight or tomorrow or something, so you can have a look at it and maybe even try to help the debugging I'm also trying to insert a ghostblock (like i like to call it) the one that shows you where it is gonna fall, but it's kinda hard xs so you'll have to wait a whilebtw, you can see one at the picture in the right bottom corner--edit--got the code from 15.2 Kb to 13.1 Kb started on the re-designing
Go ahead! You don't have to make the ghost colored, it could just be a white outline or something like that If you want me to test again I'm here
--variables: fallingblock[8]=width of the falling blockfallingblock[6]=y-value of the blockfallingblock[7]==1 or 2 checks of it is an L or reversed L blockghostblock[6]=y-value of the ghostblockghostblock[5]=x-value og the ghostblockfallingblock[9]=height of the falling blockl and m are just for loop variablesfunction on.ghostBlock() highest = 21 for l=1,20 do for m=1,fallingblock[8] do if (fallingblock[6]+l)<21 then if blocks[fallingblock[6]+l][fallingblock[5]+m-1]~=0 then if (fallingblock[6]+l)<highest then highest = fallingblock[6]+l if fallingblock[fallingblock[9]][m]==0 then highest = highest+1 end if fallingblock[7]==2 or fallingblock[7]==3 then if end end end end end end end ghostblock[6] = highest-fallingblock[9] ghostblock[5] = fallingblock[5]end