Up all night
Wow. Turns out that writing games is every bit as addictive as playing them. It’s gone 3am and I really should have been in bed hours ago, but I’ve been on a roll with my Pong clone and I didn’t want to stop while I was getting so much done.
Tonight I finished all the groundwork that I started yesterday. From there I implemented the basic graphics - flooding the screen with a background colour and drawing two bats and a ball on it. Once I’d done that, it seemed churlish to quit for the night before I’d made the bats move up and down when certain keys are pressed.
Then it would have been almost rude to stop without making the ball move, and once it was moving I needed to make it bounce off the top and bottom of the screen - and, of course, off the bats. And once I’d got that far it was a tiny extra step to make the ball position reset if it went out of play.
Also somewhere in the middle of all this I rewrote large chunks of my code so that, in theory, the graphics could adapt themselves to various different possible screen sizes.
And once all that was done, it was gone 3am and I really should be in bed.
But I retire to bed happy, with the main gameplay of my Pong clone implemented and feeling very pleased with my night’s efforts.