Hi all,
a long time ago I wrote an AI to play Tetris in Java. Worked really well, often clearing over a million lines at 1000 lines per second (without knowing what the next piece is). I now wanted to port that AI to Lua and hook it up to Bizhawk. Everything seems to work really well except...
Once I hit level 29 though (the max speed level for NES Tetris), the speed becomes too high the way I implemented the pushing of the buttons. Example, I need to push
A Left Left Left Left Left to put an
I tetromino vertically on the far left.
"push one button"
emu.advanceframe
With the example above I need to push 6 buttons. Meaning 6 emu.advanceframes. At lvl 29 this means my tetromino has dropped already way too far to comfortably make the entire move.
So question is, how can I do several pushes of the same button before doing an
emu.advanceframe and have the game know I pushed
Left 5 times?
If needed or someone is interested in it, I can put a link to the source code here.