first of all: "e.which" is one that shouldn't be used, so use "e.code" instead.
there are other stuff that seems weird, specially game over, why not the original
game over scene.
I need to test the plugin how it plays out.
even this line looks incorrect (never tried it, as switches are booleans (true/false)
if (!$gameSwitches || typeof $gameSwitches.value !== "function") { }
but if you check github, there are issues that was left in INTENTIONALLY.
so many things could be altered.
there is a tetris game made for MV though, works differently , but same principle
as the one you made with colors instead.
requestAnimationFrame might not work either for all browsers, and there are things
missing like score that I don't see, as those can be made in the way they want too.
so you need more research to make this fully functions for MV.
here is the
link to the tetris that was made.
thank you for replying again(i can't help but say thanks in every repliy when people are trying to help me.)(●'◡'●)
1.so i said that it gives me errors even tho it's playable, but when i changed 'which' to 'code', the control over the blocks was gone. they just fell down without us being able to move them
2.the line that seems off wasn't there before, but i wanted to use switch conditions for the game and it kept giving me the 'Uncaught TypeError: Cannot read property 'value' of null'
one of my guesses was that maybe some rpg maker functions weren't working properly yet,(at the very beginning of the game, before loading the game)
so i tried my hardest to search and add something to fix it
and it did work...
the types of errors (the value and the one i need help with now) are the same, am i right?
but i couldn't do ANYTHING to fix this one. this one is 'Uncaught TypeError: Cannot read property 'x' of undefined' (x as numbers)
in the value error, the condition wasn't actually working. but in this one it works!
it just seems like something extra.. a wrong error only covering the screen.. but that's not really possible.
3.also for the Harold tetris game, i'll try to see what i can do with that, but i doubt it's going to be what i wanted.
thank
1 - When you have errors, the Sources tab is not useful to use - show a screenshot of the full Console tab.
2 - Please don't post several hundred lines of code directly into your post. If you must put it there, put spoiler tags around it - or just attach the file itself.
3 - This is not great practice, trying to shoehorn code not written for RPG Maker into your project. At first glance, it's making its own input handlers which are going to either overwrite or conflict with RPG Maker's built-in input mappers. If all you want is this Tetris game and it's already written, there's no need to shove it into RPG Maker.
It's not "not ok" with code like it is for art in terms of having concerns about plagiarizing from people.
But it's also not a very smart idea - AI makes things up, it doesn't write code with educated knowledge that it's doing the right thing. That's pretty common knowledge, from all the articles and memes about how AI can't answer grade school math question correctly, gives you food recipes including gasoline, has conversations where it tells people to die, etc.
I've never seen AI-generated code of any complexity that actually worked correctly.
And it is against forum rules to ask for help with fixing AI-generated code.
1.these are actually helpful thanks!
2.i want to add the tetris game to the game i'm trying to make in rpg maker as a miniGame in between, so i think i need to somehow add it as a plugin or link it. if that's what you meant tho-
3. thank you for telling me that. i'll keep them in mind! '◡'