This is a web based game developed using HTML, CSS and JavaScript without any external libraries or frameworks. The game begins with the development of the cannon mechanics. The players can move the cannon left to right using the keyboad's arrow keys, while the turret angle can be adjusted up or down within specific limits for aiming. The cannon moves responsively, adapting to browser resizing without scrollbars. Using the spacebar, players launch cannonballs, which go in the direction of the turret on a predetermined trajectory independent of gravity. Only one cannonball can be in flight at a time. Every shot has a sound effect that ends after the cannonball exits the screen. Basic gameplay components, sound integration, and responsive controls are introduced in this fundamental design. There is a dynamic balloon target that has been added. The balloon drops from a random position at the top of the screen and must be shot down before they reach the ground. If the ballon is hit, it explodes with a visual animation and sound effect, awarding a point to the player. However, if a ballon reaches the bottom of the screen, it explodes and the player loses a life. The game starts with five lives, and when all lives are lost, a "Game Over" message is displayed. Only one balloon drops at a time, ensuring a focused challenge. The balloon’s behavior and the overall game logic remain responsive to changes in browser dimensions, maintaining a seamless user experience.
Luvveer/Caanon-Game
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|