Reffering a JavaScript, where the exclamation mark placed before a value or expression is used as a logical NOT operator, indicating negation, i have created and developed this game called !VEGAN NAME.
Playing, you will be able to manipulate a barbecue that must try to avoid as many vegetables as possible, thus achieving the goal of cooking your meat in time. The game is inspired by Argentine barbecues and their connection with Lionel Messi, soccer player and the typical customs of this Latin American country.
The player will be provided with a virtual barbecue interface that can be controlled from right to left using the arrow keys on the keyboard.
The player must maneuver the barbecue skillfully to dodge the vegetables and prevent them from touching the grill. Players will be awarded points for successfully avoiding vegetables and achieving timely meat cooking.
In the game, random targets (representing meat) and enemies (representing vegetables) will descend from the top to the bottom of the screen until they disappear. After disappearing, they will regenerate and reappear.
The player will start with a score of 0 and will have to increase it.
Colliding with the targets will subtract 1 point from our score, while colliding with the enemies will also subtract the same value from the player's score.
The score will update as actions are executed, and players must strive to reach the goal of 12 points to successfully complete the game. Conversely, if the player's score falls below 0, they will lose the game,upon losing, you will have the option to activate the "Restart" button to start the game again.
-
Click on the COOK button on the screen to start the game. Once started, the targets will automatically fall from the sky.
-
Use the RIGHT ARROW key on the keyboard to move the player towards the right side until reaching the width of the screen.
-
Use the RIGHT ARROW key to move the player towards the left side until reaching the width of the screen.
-
Click on the RESTART button after losing the game to begin a new game.
## Development
index.html: Contain elements and tags that define the structure, layout, and presentation of the game content. Can involve buttons, menus, scoreboards, player avatars and another elements.
style.css: It contains styling instructions that dictate how background images, player and enemy characters, widths, heights, padding, and other elements should be displayed on the screen.
.js (game, script, player, obstacles):
game.js: This file contains the main functions that provide gameplay and interaction to the game, such as game loop, collision detection to make elements disappear and display of the differents screens
script.js: Includes keydown event listeners to move the players and restart button. Additionally, it includes the creation of intervals to spawn new enemies and the function to initiate the game.
player.js: This file contains functions related to the player, such as movement speed within the screen, alignment to the gameplay width, and player position adaptation.
obstacles.js: It incorporates functions for creating new scores and enemies, as well as variables related to their appearance and drop.
Rodrigo Cancio Web Developer

