Creation of A Pong Game Through Visual: Antony Gardner May 27, 2014
Creation of A Pong Game Through Visual: Antony Gardner May 27, 2014
Basic.NET
Antony Gardner
May 27, 2014
Abstract
This is the trials of creating a simple Pong game in six days time.
there were severak errors along the way, and the game itself was never
actually completed, but it was a fantastic learning experience that will
prepare me for future programming courses.
1 Introduction
I started this project thinking that it would be a rather easy way of getting
the project dome while still having fun with it. But I soon found out that
programming is much more complex that I had originaly remembered it to be.
1
3 The Code
3.1 First Attempt
My first attempt at creating the walls and paddle for this pong game was ... less
than stellar. I origionally thought that it was simple enough to draw each shape,
with certain variables set for the paddle in place of numbers, and then have a
KeyDown Sub linked to to an update function that would show the movement
of the paddle when the user pressed either the left or right arrow keys. This
ended up being a problem, because in order to do that, you would have to call
the variables used in the paint sub again in the update funtion. Since these
variables are services and aspects of the system itself, the program would crash
when the variable was called a second time in the same class.
4 Final Thoughts
This project, if anything, has taught me that it takes consitency to be not just
good, but efficent in your programming. You are always finding better ways
to do things. Would it be better to use and if ... then statment or a select ...
case form? What about for loops? Is there a specific exception to be noted?
All steps taken in the condesation and easy execution of the code. Not only
is it less haphazard, it is easier to find when and where you made a mistake.
Furthermore, it has given me enlightment as to what the next four years will be
like at Champlain. I fell better prepared to tackle the more complex aspects of
programming in the future.