Fixes - QinusAxia/DevelopmentProject GitHub Wiki
This page is related to the Functional Issues and Bugs
These are the changes that I have made for this project.
Changed the resolution size of the screen:
I have changed the resolution size of the screen from width of 480 and height of 270 to width of 640 and height of 480. this.canvas.width and this.canvas.height has been used to show the screen size.
Changed the gravity value
I have changed this.canvas.gravity from 0.05 to 1 to make the object levitate faster.
Prevented the object from going over the screen
I have added this.hitTop function which will stop the object from going past the top part of the screen. This with making sure that if the this.y is less than or equal to rockTop variable, which is 0, the this.y value will be equal to rockTop and this.gravitySpeed will equal to 0. Then I added the this.hitTop function into the this.newPos function to make it work as the this.newPos function handles how the object moves.
Separated Javascript code into an external Javascript file
This is by putting all the Javascript code into Javascript and adding src = "game.js" into the script lines of html.