Been playing around with the Pong game, trying to give
it a Christmas feel. Found a (rather sad) image of Disneyworld
all decked out but empty. Even jolly London is going down
this Christmas...
Need to get back to the automating the game problem!!
* * *
So I automated player2 (in the update function) so that the paddle y-coordinate is always the same
as that of the ball:
The result is pretty sweet for player2; he never misses. (The qualiry
of gameplay is jagged, because using the camera 'on top' lowers
the framerate on the game. It is supposed to be 60). Whatever!
I now need to make this a bit more interesting for player 1; no
doubt with a random variation on the y alignment so that P2 misses
sometimes.
The following code does that (P2 misses 60% of the time) but the paddle
wiggles and it is annoying...😒
No comments:
Post a Comment