Monday, February 6, 2017

Pongcquetball

Time for another Pong update! Er, well, racquetball, I mean. Pongcquetball? Yeah, that sounds about right.

I am very happy with the way it's coming along. I have finally reached the point where I have a basic working game! Here's a list of changes and updates I made since my last post:
  • Reset the ball position back to the center of the screen when it goes out of bounds
  • Use a stopwatch to track seconds while the ball is in play and display this as the score (I love how C# has a stopwatch class built right into it)
  • Reset the score when the ball goes out of bounds
  • Increase the ball's speed (by 0.5) every time it hits the paddle (it's actually challenging now!), and reset that speed when it goes out of bounds
  • Display a static high score beneath the normal score
  • Add a simple title screen
  • Wait two seconds after the title screen disappears before showing and moving the ball; basically, give the player a couple of seconds before the game actually starts
So this is what it looks like now...




I'm especially happy with the font. It's called Press Start 2P. I happened to find it in the comments of a post on the gamedev subreddit the other day, and it's the perfect fit for this project.

So yeah, I have an actual playable game now! I know it's really simple, but it's something that I made, and I'm really proud of it. Overall, this hasn't been too challenging so far, but I know that's mostly because I'm only making a clone of Pong, of all things. Not exactly a complex game. And even then what I have so far is simpler than the actual game. But still, to have gotten this far means a lot to me.

So what am I going to do next? Well, my next immediate task is to save the high score when the game exits so that it isn't lost every time you quit; probably just in a text file. Nothing fancy. After that, I've made a nice little to-do list of other features I want to add and things to change, such as adding another small delay after the ball goes out of bounds and before the game starts over, and increasing the score counting speed, just because I feel that counting normal seconds is too slow. Also, my wife suggested that I make the color of the ball change every time it bounces off of something, just for fun, so I am going to see if that will be possible to do. :) And I have a few bugs to fix as well, the most amusing of which is the fact that if the ball's speed is very high and it hits the left wall in just the right way multiple times rapidly, it turns into The Flash and phases right through it, never to be seen again. So the whole game breaks. That's going to be a challenge to fix, I'm sure.