Welcome to the 2DChampion Game Development Repository! This is a public repository where developers can contribute to the development of 2D games that will be featured on the 2DChampion website.
GNU General Public License v3.0
4
stars
10
forks
source link
Fixed bug with play button; also changed jpg to png on OIP #19
There was a bug in highway hero, where when you started, it started off at a really fast speed, and would only get faster if you kept pressing the play button while it wasn't paused. I fixed this so that when you pressed play while you were playing a game it wouldn't affect the game, basically disabling the button.
There was also a jpg car that I converted to a png because the background was still visible in game. The white border is now no longer visible.
In the keyX statement, I converted the ifelse chunk to a switch statement, and removed the player.speed = 15 case, since based on the instructions, it seems like keyZ is supposed to handle that case.
There was also some code that wasn't really doing anything that I had gotten rid of (the button.disabled booleans weren't used, the moveEnemy function in initializeGame also didn't do anything but I forgot to remove that line).
To explain more;
There was a bug in highway hero, where when you started, it started off at a really fast speed, and would only get faster if you kept pressing the play button while it wasn't paused. I fixed this so that when you pressed play while you were playing a game it wouldn't affect the game, basically disabling the button.
There was also a jpg car that I converted to a png because the background was still visible in game. The white border is now no longer visible.
In the keyX statement, I converted the ifelse chunk to a switch statement, and removed the player.speed = 15 case, since based on the instructions, it seems like keyZ is supposed to handle that case.
There was also some code that wasn't really doing anything that I had gotten rid of (the button.disabled booleans weren't used, the moveEnemy function in initializeGame also didn't do anything but I forgot to remove that line).