Discuss Scratch

JavierR100
Scratcher
500+ posts

Errors with Line clearing/cutter on tetris

I'm making an tetris game and it's working perfectly, but when i clear few lines it spawns some blocks from the nothing, i looked the script like some times and i don't see any errors with it, this is my Project
(Umm…, this is enough information?)

DuckiesGames
Scratcher
38 posts

Errors with Line clearing/cutter on tetris

JavierR100 wrote:

I'm making an tetris game and it's working perfectly, but when i clear few lines it spawns some blocks from the nothing, i looked the script like some times and i don't see any errors with it, this is my Project
(Umm…, this is enough information?)

Hi There,
If I recall your problem you have cleared the pen and it spawns random blocks. Go into your blocks sprite, make sure it is hidden and delete all clones.
Hope this helps,
DuckiesGames
JavierR100
Scratcher
500+ posts

Errors with Line clearing/cutter on tetris

DuckiesGames wrote:

JavierR100 wrote:

I'm making an tetris game and it's working perfectly, but when i clear few lines it spawns some blocks from the nothing, i looked the script like some times and i don't see any errors with it, this is my Project
(Umm…, this is enough information?)

Hi There,
If I recall your problem you have cleared the pen and it spawns random blocks. Go into your blocks sprite, make sure it is hidden and delete all clones.
Hope this helps,
DuckiesGames
It has no clone scripts and it's completely hidden
deck26
Scratcher
1000+ posts

Errors with Line clearing/cutter on tetris

Why the forever loop in the Map script?

Are the blocks appearing in particular rows? My impression is that they're in the rows above row 10 but I haven't discovered why.
deck26
Scratcher
1000+ posts

Errors with Line clearing/cutter on tetris

I added, in Tetromino, the script

whenIreceivemensaje1waituntilkeyspacepressed?
so I could monitor the contents of Lines. When you do that and let the blocks build up a bit you'll find the Lines data gets corrupted after a while. I haven't checked whether that's as you get to a certain height or as columns get filled - my gut feeling is that it's the height and your colour coder sprite is not working as well as you'd like.
deck26
Scratcher
1000+ posts

Errors with Line clearing/cutter on tetris

I'm not clear why you're using the coder block when your Lines list already gives you all you need. Once you've deleted the full rows clear the screen and add blocks according to the current contents of the list.
Ignore this one, I forgot for a moment that that's how you load the list!

Last edited by deck26 (June 29, 2016 10:30:01)

deck26
Scratcher
1000+ posts

Errors with Line clearing/cutter on tetris

Items 7 and 15 are being made the same in the list - the detector colours are probably too close to each other. This has no effect until you clear a line because that's when you redraw the screen. There may be other lines which match - 8 and 16 seem to as well.

This will work both ways - a block in line 15 that isn't there in line 7 will be marked as if it is.
deck26
Scratcher
1000+ posts

Errors with Line clearing/cutter on tetris

Make the colours a bit lighter for lines 7 and 8 both in the costume and in the ‘code’ script and it should improve things. Then test and see if there's still a problem. If there is pay particular attention to which line the extra blocks appear on and see which colour in the coder sprite is close to that colour.

Powered by DjangoBB