The objective of the game "Get the Fruits" is to control a main character to collect all the fruits that appear on the screen. The character is controlled by the keyboard and the fruit moves downwards over time. The game has three scripts: one for the main character, one for the fruit and one for the point count.In addition, there is a custom block that adds a point to the point count when the character touches the fruit.
Technologies | About | License
🚀 Technologies
This project is still in the development stage and using the following technologies
Modeled with
- JavaScript
- HTML
ℹ️ About
The game is called "Catch the fruits". It features two sprites: a main character and a fruit. The objective of the game is to move the main character to collect all the fruits that appear on the screen. If the character touches the fruit, it disappears and a score is added to the point count. The game is over when all the fruits are taken or time runs out.
The main character is controlled by the user using the arrow keys on the keyboard. The fruit is randomly generated on the screen and moves down over time. If the fruit leaves the screen, it is regenerated in a new random position.
The project uses three scripts: one for the main character, one for the fruit and one for counting points. The main character's script uses a conditional to check if the arrow keys are being pressed and move the character in the appropriate direction. The fruit script uses a variable to control the position of the fruit on the screen and a loop to make it move down over time. The point counting script uses a variable to store the number of fruits caught and a conditional one to check if the game is over.
The project also uses a custom block made via "Make a Block", which is invoked when the character touches the fruit. This block adds a point to the point count and makes the fruit disappear from the screen.
📝 License
This project is under the GPL v3.0 license. See the LICENSE for more information.
Made with ♥ by Marcos (Obel) 👋 Get in touch!