2a. My program is an arkanoid type game. I wrote this game in C Sharp using Unity environment to write this code. The purpose of my program is to entertain the user with this challenging game and it also shows some basic physics concepts. The video illustrates how the user can play the game and whether they want to use AI to play a specific level. This game can be played by maneuvering the mouse to keep the ball bouncing to hit the blocks. In addition, the video demonstrates a significant feature of this game which is the different levels (there are three) the user can play with.
Describe the incremental and iterative development process of your program, focusing on two distinct points in that process. Describe the difficulties and/or …show more content…
I chose this algorithm because it is important to make sure that this game will not be rigged because many times the ball would go on an infinite loop which will the ball only move in one direction, causing this game to not function as a game, which this algorithm prevents this problem from occurring. Once the ball collides with the block or the wall, then it chooses a random number from the range specified Vector2 tweak = new Vector2 (Random.Range(0f, 0.2f), Random.Range(0f, 0.2f)); and it moves the ball slightly at a specific angle; this part of the code also shows mathematical concepts because it randomly determines how the ball is launched picking vector 2 numbers.. Also, when the ball collides an object, it makes sure that the audio is on que to play (the pay function and plays the sound). This part of the algorithm shows mathematical concepts because rigidbody2D.velocity += tweak; adds one to the velocity to single frame that is being updated during the game. These objections in the game prevent the ball from getting stuck in an infinite loop. This algorithm is complex, but it is just a list of steps that happen that makes the ball act a specific move after it collides with another