AI 程式設計
Using Gemini CLI to generate a spaceship shooter game (index(spaceship(.html))
index(spaceship).htmlSpaceship Shooter: Game Rules (Details)
(1) How to Play, Lives, Levels, and Difficulty
Objective: Your goal is to shoot down as many enemy spaceships as possible, survive for as long as you can, and achieve a high score.
Controls:
Move Left: Use the 'A' key or the Left Arrow key.
Move Right: Use the 'D' key or the Right Arrow key.
Shoot: Press the Spacebar.
Lives:
You begin the game with 3 lives.
Each time your spaceship is hit by an enemy ship, you will lose one life.
The game ends when you have lost all of your lives.
Levels & Difficulty:
The game consists of 5 levels. You start at Level 1.
You advance to the next level for every 200 points you score.
As you progress to a higher level, the difficulty increases: the speed of the enemy spaceships and the rate at which they appear will both increase.
(2) Accuracy Rate
Your Shooting Accuracy is displayed in real-time at the top of the screen.
This percentage is calculated based on the number of enemy ships you have successfully shot down compared to the total number of enemies that have appeared.
(3) High Score List
If you successfully reach Level 5 and the game ends, you will be prompted to enter your name.
The list saves the top 5 players based on their final score.
For each high score entry, the player's name, final score, and shooting accuracy are recorded and displayed on the "Game Over" screen.