—-Pong

Conclusions and Recommendations for the Pong Game:

Conclusions:

The Pong Game was created after following the guide of the flowchart, observing other Pong Games, and trying to recreate the effect of velocity on a ball. We used numerous pong games on the internet as a reference and attempted to study the effects of the paddle on the ball’s motion. This led us to concluding that velocity can be split into two factors, x and y motion. After discovering this we researched whether or not MATLAB was capable of doing such a task: it was. Once the ball’s motion was established we had to add a limiter so that it could not escape the screen unless it had passed the side with the paddle. In order to do this we created if-statements, blocking the ball from passing certain x,y coordinates. And then to code the actual paddle, we decided that we had to have a general knowledge of the location of the paddle. Thus we decided to keep track of the paddle’s center. From this we were able to constrict it within the same y-values as the ball. Initially, the game would run for a few seconds and then freeze, this is because the ball ran on a tic-toc while-loop and being initially unfamiliar with the full effect of it we had unknowingly set it to stop at 5 seconds. This problem was easily fixed by setting the time equal to zero and then initiating the loop. Other bugs persisted however, for instance, after adding the level system the ball would loop around the screen even if the paddle had not hit it back. This issue required far more research through the MATLAB help pages and team communication.

Recommendations:

The primary things we should improve upon for this game is to add a multiplayer feature, alongside a sound feature. These were intended features but the multiplayer feature was difficult to establish over a wireless connection and the sound feature was simply omitted due to time.