Random header image... Refresh for more!

One Down…

if (uncalculatedFrameCount > 20 && uncalculatedFrameCount < 60)
{
    robot.SendMotorCommand(0, (sbyte)30);
}

That seems to be fixing the lost paddle problem. This code will spin the paddle to the right after the gameboard gets confused. I had tried a variant of this before, but it turns out that the gameboard gets confused after every goal, so the paddle would wildly move out of place after every goal, which is not good.

So, I tried it again, with a lower bound of lost frames. This way the game has to be really confused before it tries to recover the paddle. The upper bound is there to prevent it from going wild if the playfield can’t be recovered. Otherwise, when the game ends, the robot will spin right until something breaks, which is not good.

I just ran another game with this logic and watched the robot correctly recover from a lost paddle in the middle of the game.

0 comments

There are no comments yet...

Kick things off by filling out the form below.

Leave a Comment