From a07d8c732b2018aaa4addf631c1e251b4303b69a Mon Sep 17 00:00:00 2001
From: Vivek Vardhan <91594529+vivekvardhan2810@users.noreply.github.com>
Date: Mon, 29 Jul 2024 13:13:38 +0530
Subject: [PATCH 1/4] Add files via upload
---
Games/Flying_Fish/index.html | 19 ++++++++
Games/Flying_Fish/script.js | 85 ++++++++++++++++++++++++++++++++++++
Games/Flying_Fish/styles.css | 56 ++++++++++++++++++++++++
3 files changed, 160 insertions(+)
create mode 100644 Games/Flying_Fish/index.html
create mode 100644 Games/Flying_Fish/script.js
create mode 100644 Games/Flying_Fish/styles.css
diff --git a/Games/Flying_Fish/index.html b/Games/Flying_Fish/index.html
new file mode 100644
index 0000000000..580051593e
--- /dev/null
+++ b/Games/Flying_Fish/index.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+ Flying Fish
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Games/Flying_Fish/script.js b/Games/Flying_Fish/script.js
new file mode 100644
index 0000000000..546879b5d8
--- /dev/null
+++ b/Games/Flying_Fish/script.js
@@ -0,0 +1,85 @@
+const fish = document.getElementById('fish');
+const game = document.getElementById('game');
+const scoreDisplay = document.getElementById('score');
+const startButton = document.getElementById('startButton');
+
+let fishTop = fish.offsetTop;
+let fishLeft = fish.offsetLeft;
+let gameHeight = game.clientHeight;
+let gameWidth = game.clientWidth;
+let score = 0;
+let gameInterval;
+let isGameRunning = false;
+
+startButton.addEventListener('click', startGame);
+
+function startGame() {
+ isGameRunning = true;
+ score = 0;
+ scoreDisplay.textContent = 'Score: ' + score;
+ fishTop = gameHeight / 2;
+ fishLeft = 50;
+ fish.style.top = fishTop + 'px';
+ fish.style.left = fishLeft + 'px';
+ startButton.style.display = 'none';
+ gameInterval = setInterval(gameLoop, 20);
+ document.addEventListener('keydown', controlFish);
+}
+
+function gameLoop() {
+ if (!isGameRunning) return;
+
+ // Gravity
+ fishTop += 2;
+ fish.style.top = fishTop + 'px';
+
+ // Check for collision with bottom of the game area
+ if (fishTop > gameHeight - fish.clientHeight) {
+ endGame();
+ }
+
+ // Increase score
+ score++;
+ scoreDisplay.textContent = 'Score: ' + score;
+}
+
+function controlFish(event) {
+ switch (event.code) {
+ case 'ArrowUp':
+ fishTop -= 20;
+ if (fishTop < 0) {
+ fishTop = 0;
+ }
+ fish.style.top = fishTop + 'px';
+ break;
+ case 'ArrowDown':
+ fishTop += 20;
+ if (fishTop > gameHeight - fish.clientHeight) {
+ fishTop = gameHeight - fish.clientHeight;
+ }
+ fish.style.top = fishTop + 'px';
+ break;
+ case 'ArrowLeft':
+ fishLeft -= 20;
+ if (fishLeft < 0) {
+ fishLeft = 0;
+ }
+ fish.style.left = fishLeft + 'px';
+ break;
+ case 'ArrowRight':
+ fishLeft += 20;
+ if (fishLeft > gameWidth - fish.clientWidth) {
+ fishLeft = gameWidth - fish.clientWidth;
+ }
+ fish.style.left = fishLeft + 'px';
+ break;
+ }
+}
+
+function endGame() {
+ isGameRunning = false;
+ clearInterval(gameInterval);
+ document.removeEventListener('keydown', controlFish);
+ startButton.textContent = 'Restart Game';
+ startButton.style.display = 'block';
+}
\ No newline at end of file
diff --git a/Games/Flying_Fish/styles.css b/Games/Flying_Fish/styles.css
new file mode 100644
index 0000000000..99e4eb0bbf
--- /dev/null
+++ b/Games/Flying_Fish/styles.css
@@ -0,0 +1,56 @@
+body {
+ margin: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ background-color: #000;
+ color: #0ff;
+ font-family: 'Courier New', Courier, monospace;
+}
+
+.game-container {
+ text-align: center;
+}
+
+#game {
+ position: relative;
+ width: 300px;
+ height: 500px;
+ border: 2px solid #0ff;
+ overflow: hidden;
+ background-color: #111;
+}
+
+#fish {
+ position: absolute;
+ width: 30px;
+ height: 30px;
+ background-color: #0ff;
+ border-radius: 50%;
+ top: 50%;
+ left: 50px;
+ transform: translateY(-50%);
+}
+
+#score {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ font-size: 20px;
+}
+
+#startButton {
+ margin-top: 20px;
+ padding: 10px 20px;
+ background-color: #0ff;
+ border: none;
+ color: #000;
+ font-size: 16px;
+ cursor: pointer;
+ border-radius: 5px;
+}
+
+#startButton:hover {
+ background-color: #0aa;
+}
\ No newline at end of file
From 7644c9fecf3d533fb8930e1fc654c95f82962215 Mon Sep 17 00:00:00 2001
From: Vivek Vardhan <91594529+vivekvardhan2810@users.noreply.github.com>
Date: Mon, 29 Jul 2024 13:17:52 +0530
Subject: [PATCH 2/4] Create README.md
---
Games/Flying_Fish/README.md | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 Games/Flying_Fish/README.md
diff --git a/Games/Flying_Fish/README.md b/Games/Flying_Fish/README.md
new file mode 100644
index 0000000000..94825e4f49
--- /dev/null
+++ b/Games/Flying_Fish/README.md
@@ -0,0 +1,28 @@
+# *Game_Name*
+Flying Fish
+
+---
+
+
+
+## *Description 📃*
+Flying Fish is an exhilarating game where players guide a fish through airborne obstacles using precise taps. Collect power-ups and avoid hazards to achieve the highest score.
+
+## *Functionalities 🎮*
+
+1. Click the "Start Game" button to begin.
+2. Guide the fish through airborne obstacles.
+3. Collect power-ups and avoid hazards.
+4. Monitor the score and remaining lives.
+5. When all lives are lost, the game ends, showing your final score and a button to restart the game.
+
+1. Controls: Use the spacebar to make the fish jump.
+2. Scoring: Each power-up collected increases your score by 10 points.
+3. Difficulty: As the game progresses, obstacles become more frequent and move faster.
+4. Timer: Players start with 3 lives. Hitting an obstacle deducts a life.
+5. Game Over: When all lives are lost, the final score is displayed with an option to play again.
+
+
+
+## *Screenshots 📸*
+![Flying_Fish](https://github.com/user-attachments/assets/abcd778b-f8c1-4670-ac23-70e6f6373c5f)
From a3910e9251bb70d8a776db6f131f556fa6fa6032 Mon Sep 17 00:00:00 2001
From: Vivek Vardhan <91594529+vivekvardhan2810@users.noreply.github.com>
Date: Mon, 29 Jul 2024 13:18:27 +0530
Subject: [PATCH 3/4] Add files via upload
---
assets/images/Flying_Fish.png | Bin 0 -> 8889 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 assets/images/Flying_Fish.png
diff --git a/assets/images/Flying_Fish.png b/assets/images/Flying_Fish.png
new file mode 100644
index 0000000000000000000000000000000000000000..1160056c56486f4293e5cb919be73b6711ad8706
GIT binary patch
literal 8889
zcmeHtX;c$gw>Gq`I6?z0h!Id}MVrYmPXU$531~$ofkc^QFpbENK!}PhAdqMygDnIF
z8-y@O5F%4T3nWOGA~S(RK}aA#2q6gxA-VMXt@W+@>)!j`@8{P)o>jF^?X%CRv!ANk
z^{kWei<`@Vy@&V8$;lnKc){_SoSZyPPVT$$-MhA1G}aT^wh!{L*Idra)$|`(*fzco
zJLh^%POc8UPjYMLw!P=q3%;>(a*7>)L!JzM8!RVx-0h;{x$BAG<>`IT1L6=YF5{=1
z-X9*GTmN~|PgxCKH}Za=vg((e5OpWo(OmC?+^(RD2mPLW%{%XJu$%7uZttnK3l$eG
z)_Oio`{s4+T!tyPuKnRoqo(}y#_q1e=@+}Ng#I2YOA2+j)abvWRrslp@r~!pCe9Zk
z1XfAKCOKP02!UNrO?voqdAZZBSmJkQFP-0YHsaq!5ts47RN`(d=K=Q4EfmzdY{$@S
za1l&x2>{}~?Ze#8Kg>GRm!8SDo9xk$tN7m|hcyjcEj4qHEzni5&?g4`VPKz)*)9%P
zldYvq7?>n`lRX$8em<-)f=AD-<#tdG1yvD64*aaM&K`Qf+CE3N>=WS*7Vn>lzgh%+
znc5dLRB1*PF2L=q&(E$Ykx6Yt_1GHZTZ}QP)J_$FFH%nx1}N7vaEw9ONjv7a6P1_g
zO%~VY@4jOc8p(NLHD@=n<&2(y%A!E3PpQLuCSF){J(i^;o36B2hicnE6Lt7yszIY`
zbe28ap^gg+!7Oytf8NuNawWIghSKj*6(v7tDW@W1?na3OB`nbFXI3*F(<p~kdZ0{zn3|8yV=|B5~lnV>fcg@
zIny&o37nr?i{q_&o}4(R?kw{IA8H%Js0Q%g#B7c2Xp~jItVfzIX0~HOA|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$0UyAYn#asX(yjk+h7U#Izp91u`+j*6E%)?Teq&+yGEN0>r
z7=Ld=P<<&q1*{paM~$?5@fyefmaX#OHLb_knWJ&QpuBl-rjfhEDkj3iV0U!$2MOhl
z5^T`-Z)>Y$x|fz-_SLvwg5j2qMVD4F%X=bye8*umtee^1h;as!y6Y-(YESWox82}y_?BxZKS`eY0Hljm6@Zp
zm-)Vpi}k;b#NZa|qx#swDD*SWQgL_3Ae%lD8%#?sgIZ)oym)-;-p6pO7$M3FkkN?N
z+&@85$$cH3o6YT3D8K^6MoHI^PP17muZu0F6N0C%M)$h72~P2hP6=Cr)}5Pe1tB^Q
zPVtg!F@)Bsgl|TES^A}W$rm;nQ`{n2pXSyzM}1-3uuFWwvj;egWUf~(tDoF%6b}*5P*>Xebr>2
zW~qr3kl$l~chvX!1@b^Ko?Wf%q8$K{Kk3ITT#EU)rvtE?6+AK!&adCQ9cDrYz$FNs
z3X|`4zD{%Q#RRxNx_G^4{HmrZmhL9`sJ@tSww%@aRKDG9)yi1zn(BWKmCOy9fS7YM
V-u!;q_I4Awi%xEiHRo?W{136(>$?B|
literal 0
HcmV?d00001
From 25021b2a534ecb41eb90c1a3b92c675e66e3556f Mon Sep 17 00:00:00 2001
From: Vivek Vardhan <91594529+vivekvardhan2810@users.noreply.github.com>
Date: Mon, 29 Jul 2024 13:19:41 +0530
Subject: [PATCH 4/4] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 7dd3d46bd4..a7a0a6a404 100644
--- a/README.md
+++ b/README.md
@@ -882,7 +882,7 @@ This repository also provides one such platforms where contributers come over an
|[Samurai_Fighting_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Samurai_Fighting_Game)| [Tic-tac-toe](https://github.com/kunjgit/GameZone/tree/main/Games/Tic-tac-toe)| [Quest_For_Riches](https://github.com/kunjgit/GameZone/tree/main/Games/Quest_For_Riches)| [Pattern Creation Game](https://github.com/kunjgit/GameZone/tree/main/Games/Pattern_Creation_Game)| [Magic_8_ball_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Magic_8_ball) |
| [Catch_Craze](https://github.com/kunjgit/GameZone/tree/main/Games/Catch_Craze) | [UNO game with computer](https://github.com/kunjgit/GameZone/tree/main/Games/UNO_game_with_Computer) | [Dice_Rolling_Simulator](https://github.com/priyashuu/GameZone/tree/main/Games/Dice_rolling_simulator)| [Space_Dominators](https://github.com/kunjgit/GameZone/tree/main/Games/Space_Dominators)| [Simon_Says](https://github.com/kunjgit/GameZone/tree/main/Games/Simon_Says) |
-|[Idle_miner](https://github.com/kunjgit/GameZone/tree/main/Games/Idle_miner)| [Five_Nights_at_Freddys](https://github.com/kunjgit/GameZone/tree/main/Games/Five_Nights_at_Freddys) | [Penalty_Shootout_Game] (https://github.com/kunjgit/GameZone/tree/main/Games/Penalty_Shootout_Game)| | [Circuit_Craze](https://github.com/kunjgit/GameZone/tree/main/Games/Circuit_Craze) |
+|[Idle_miner](https://github.com/kunjgit/GameZone/tree/main/Games/Idle_miner)| [Five_Nights_at_Freddys](https://github.com/kunjgit/GameZone/tree/main/Games/Five_Nights_at_Freddys) | [Penalty_Shootout_Game] (https://github.com/kunjgit/GameZone/tree/main/Games/Penalty_Shootout_Game)| | [Circuit_Craze](https://github.com/kunjgit/GameZone/tree/main/Games/Circuit_Craze) | | [Flying_Fish](https://github.com/kunjgit/GameZone/tree/main/Games/Flying_Fish) |
|[Idle_miner](https://github.com/kunjgit/GameZone/tree/main/Games/Idle_miner)| [Five_Nights_at_Freddys](https://github.com/kunjgit/GameZone/tree/main/Games/Five_Nights_at_Freddys) | [Penalty_Shootout_Game] (https://github.com/kunjgit/GameZone/tree/main/Games/Penalty_Shootout_Game)| |[Snake_Gun_Water](https://github.com/kunjgit/GameZone/tree/main/Games/Snake_Gun_Water)|
| [Drum_kit] (https://github.com/kunjgit/GameZone/tree/main/Games/Drum_kit)|