GGZiron's Tetris Minigame (discontinued)

a
This is great! The only problem is for some reason when I try to move the blocks (or click past the menu) I get a TypeError (cannot read property NaN of undefined) On a blank one it works, but on my current project it just crashes and burns but I'm curious on what the incompatibility could possibly be.
Do you mean New Game vs Continue Saved Game? Some plugins require you to start a new game after adding.

If you trigger the error, hit F8 and go to the Console tab and get a screenshot to post here, as that will highlight the line that triggered it.

Also, did you install the GGZCore plugin? That's required.
If my core is not there, it will bring error message on project launch, so it shouldn't be that.
I also initialize data in older saves, after recieved such bug report in my Ace version.

If I know which plugin conflicts with mine, could try to patch it.
The error message from the console would help too.

Edit: Apparently, the older save initialize code I wrote was broken. Now should be fixed. But it shouldn't be that the reason, because it was refusing to load older save files.
Do you mean New Game vs Continue Saved Game? Some plugins require you to start a new game after adding.

If you trigger the error, hit F8 and go to the Console tab and get a screenshot to post here, as that will highlight the line that triggered it.

Also, did you install the GGZCore plugin? That's required.
So just to make sure that there weren't any abnormalities I did both just to be safe, and the error has shown up twice. The plugin is also installed! In the plugin parameters, I made sure to also leave the optional sections blank.

Screenshot_13.png
Think the culprit is my IN loop in the move method.
JavaScript:
for(index in tetromino){
        let x = tetromino[index].x; let y = tetromino[index].y;
        tetromino[index] = this.block(x + xOffset, y + yOffset);
        tetromino[index].colorID = this.type;
        tetromino[index].active = true;
    };
Here i forgot to declare properly the index variable with let, and is global, and everything can mess with it. Will fix and ASAP. Will investigate my other loops too.

Edit: Well, not actually sure that is the causer (after all this for goes on one go), but there were many other for loops where I forgot to do that. Just published new version that should have fixed it. It may not be the causer of the reported bug error, but it still was bug.
Hi, the plugin is really awesome, thanks. Can you add an option where the score is bound to a variable
Hi, the plugin is really awesome, thanks. Can you add an option where the score is bound to a variable
Glad you like it.

As about your suggest, will think about it.
Currently, you can do this:
JavaScript:
let bestScores = GGZiron.Tetris.Process.bestScores;
$gameVariables.setValue(1, bestScores);
This way you assign best scores to variable 1.
I am thinking between extracting them via plugin command instead, or really binding to variables.


We had private communication and he told me that my last update fixed his issue.
Hello.
Great plugin. Thank you.
I've been looking for one for a long time.
There is one request. Is it possible to add a PvE fight with an NPC. like in this tetris?
Tetris Battle Gaiden


I've always dreamed of such a combat system. If it's very expensive, then don't. Thanks.
Hello! Thank you for your feedback!

I too, want to make this more RPG-friendly, by giving such features. But can't promise, as I never done AI, and also I will need to re-organise my code to be able to handle more players. That may be my next "grand project", but right now can only fix bugs and add small features.
You misspelled Cleared Lines.
You misspelled Cleared Lines.
Ahh!

Idk where I been looking.
You can fix that in the vocab settings.

I will fix when I get back at it.

Edit: Just posted new version.
The changes can be seen here.
@TheHQ98 , this should add the feature you wanted.

As about the typo, it is fixed in the code. Will replace my screenshots too, when I get the time.
Hello! Thank you for your feedback!

I too, want to make this more RPG-friendly, by giving such features. But can't promise, as I never done AI, and also I will need to re-organise my code to be able to handle more players. That may be my next "grand project", but right now can only fix bugs and add small features.
Thanks. I'll be looking forward to it.
Hey , Thanks for the great mod. After a game over the game freezes while it calculates something i assume? is there a way to speed this up? and in the future maybe have an option to remove the newgame or exit commands so they can be made in Mz instead?
Hey , Thanks for the great mod. After a game over the game freezes while it calculates something i assume? is there a way to speed this up? and in the future maybe have an option to remove the newgame or exit commands so they can be made in Mz instead?
Hmmm, for some reason, I didn't recieve notification for your message, that's why replying late.

After game over it should display the text game over, the freeze time is on purpose so the music plays some minimal length, then additional freeze if best scores. There is option to reduce or set to zero. In Speed Data parameter, there is game lock, and game lock extended. The extended is for when player achieve best scores. Set to lower value, and should be okay. Or you mean actual freeze? Like endless loop type of freeze?

and in the future maybe have an option to remove the newgame or exit commands so they can be made in Mz instead?
Hmmm, will think about it. That, and maybe should add some parameters when launching via plugin command. Thank you for your feedback!

Closed at OP's request.

Original thread: https://forums.rpgmakerweb.com/threads/ggzirons-tetris-minigame-discontinued.143249/