Page 1 of 1

Tetris! (1 bug, also need help)

Posted: Thu May 23, 2013 11:55 pm
by LuaWeaver
Hello! I'm very happy because I finally finished an actual game : a very-ugly-coded-version of Tetris.
There is one bug in which some tetrominoes can ignore collision on certain parts of itself... it's odd, and I can't figure it out. However, in the code, you can add "I" to the shapes table in main.lua to see what I mean. When not rotated, the entire thing goes through, which is why it's currently now in-game.

You can look at/use the code in any way, just don't take credit.

Controls:
Left arrow : Move left
Right arrow : Move right
Down arrow : Speed up
Space + Left arrow : Rotate
Space + Right arrow : Rotate

Anyways, this my first actually finished project, so here it is!
Tetris.love
(6.76 KiB) Downloaded 260 times

Re: Tetris! (1 bug, also need help)

Posted: Fri May 24, 2013 12:36 am
by jasonisop
getting an error as soon as the first block falls to the bottom

main.lua:58 You lose! Final score : 0

error trace back starts at main.lua:204 update
main.lua:120 addPartToWorld
main.lua:85 checkForRowWin
main.lua:58 checkForLose

Re: Tetris! (1 bug, also need help)

Posted: Fri May 24, 2013 12:38 am
by LuaWeaver
I had packaged the wrong version, it's fixed in the new .love.

Re: Tetris! (1 bug, also need help)

Posted: Fri May 24, 2013 1:16 pm
by Hexenhammer
I think I have never seen an ASCII version of Tetris before! :awesome:
a very-ugly-coded-version
Not an empty promise! :ultrashocked:

Re: Tetris! (1 bug, also need help)

Posted: Fri May 24, 2013 11:23 pm
by LuaWeaver
Hexenhammer wrote:I think I have never seen an ASCII version of Tetris before! :awesome:
a very-ugly-coded-version
Not an empty promise! :ultrashocked:
I'm not so good at this whole 'code for the public' thing. Those comments and function groupings were added to make it better than what it was before. :oops: