Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

a. The programming language I used to create my app, Invasion Strike, was MIT App Inventor.

The purpose of my application is to create a fun and entertaining game that can be played by
people of all ages. In my video, I display how the app works and the different functions, such as
the movement and projectile la2unching, that the player can use in order to beat the game by
obtaining the necessary score. Through making this app I encountered many challenges,
specifically with developing a way to make the Image Sprites move as I intended them to, which
with the help of some of my classmates (as credited in 2e), I was able to resolve the issue be
redefining the Sprites intervals to match with that of the Clock I included in the app. I also
encountered troubles with the Balls and trying to make them fire from the Turret Image Sprite,
which I resolved independently by changing the x and y coordinates of the Balls so they lined up
with the Turret.
b. The process of creating my game was definitely not an easy one and required a lot of patience.
The first and definitely the most difficult part of the application was programming the
movements of the different Balls and Image Sprites contained in my app. I had to make it so the
Turret (the player) able to slide across the bottom of the screen while the targeting arrow
followed it so that it was always above it, and I had to make sure the Balls were always with the
Turret so that they could fire directly at the target. I also had to make sure the Enemy would
move randomly around the screen at a speed that was no too difficult to hit but would still make
the game a challenge, which my classmates Trevor Mendola and Sean McCarthy assisted me in
doing. This was also the part of the programming where I developed all of my different
procedures that I used to abstract code that was being reiterated. The second part of the
programming was adding in the character images and background, all of which I made using my
ASUS Zenpad, and adding in extra features, such as the ability to earn new projectiles, a reset
score feature, and having the Enemys speed increase as the score increases.
c. One of the most instrumental and vital lines of code in my app is that of the When FireBall
collides with something do ___. The reason that this code is so important to my app is because
it is the code that determines what happens when the Fire Ball collides with the Image Sprites.
The code makes it so if the Fire Ball collides with the enemy then it will add a point to the score,
change the score label so that it matches with the new score once the point is added, and it uses
the resetBall procedure so that the Fire Ball can return to its position on the Turret and be
ready to be fired again. It also makes it so if the Fire Ball hits the Target then it will perform
resetBall so that if the ball never hits the Target then it will return to the Turret to be fired
again. The next portion of the code programs the app so when the score reaches 20, then the user
will be allowed to access the Firex2 feature. When the Firex2 button is clicked the user can
fire two shots at once, and it sets the new Enemy interval to 1500. After that, the code says if the
score is greater than or equal to 35, the interval increases to 2000. The last line of the code shows
that if the score reaches 50, then it will open the VictoryScreen, which will congratulate you
for beating the game.
d. I developed several lines of code that I made into seven different procedures to help simplify
my code. One of these procedures that I found to be very useful was the procedure newScore.
This was a rather simple procedure that made it so when the procedure was called upon, the
global score would be set the global score plus one, and the label for the score would be changed
to Score: _ (the blank being what the new score would be). Even though this may not seem
like the most complex or useful procedure, I found it to be incredibly helpful when I was coding.
Due to the multiple different projectiles that I implemented into the game, it made the code much
simpler and easier to read the difference between lines of code. I also used a procedure called
moveRandom that proved to be very helpful by abstracting more code. This procedure allows
the Enemy to move randomly around the screen at an interval of 1000, and to move randomly
around the screen if it collides with the Target and/or if it collides with the Turret. Even though I
did not use moveRandom as many times as newScore, it still proved to be very helpful in
abstracting the code to make it easier to read.
e.

My classmates Trevor
Mendola and Sean McCarthy
helped me develop this line
of code

You might also like