From abaca1e7a67015f24f8aa36c47ad26fcf280f31f Mon Sep 17 00:00:00 2001 From: Siddhi Khandelwal Date: Tue, 2 Dec 2025 12:59:42 +0530 Subject: [PATCH 01/24] Adding functionality to the animations --- home_page.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/home_page.js b/home_page.js index 0e568f2..31c2320 100644 --- a/home_page.js +++ b/home_page.js @@ -113,19 +113,23 @@ document.addEventListener("DOMContentLoaded", function () { } }); // END DOMContentLoaded +const knight = document.querySelector(".knight-wrapper"); const dustContainer = document.getElementById("dust-container"); + setInterval(() => { + const rect = knight.getBoundingClientRect(); + const d = document.createElement("div"); d.classList.add("dust"); - // spawn near character feet - d.style.left = (parseInt(getComputedStyle(document.querySelector(".pixel-character")).left) + 25) + "px"; + d.style.left = rect.left + 30 + "px"; + d.style.top = rect.bottom - 8 + "px"; dustContainer.appendChild(d); - setTimeout(() => d.remove(), 600); -}, 180); // rate of dust puffs -const knight = document.querySelector(".pixel-character"); + setTimeout(() => d.remove(), 500); +}, 180); + function idleSwordSwing() { knight.style.animation = "knightIdleSword 0.5s steps(2) 1"; From 550047d0ac3e58979cf6f73b73f0695164c80212 Mon Sep 17 00:00:00 2001 From: Siddhi Khandelwal Date: Tue, 2 Dec 2025 13:06:48 +0530 Subject: [PATCH 02/24] Fixing bugs and errors --- home_page.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/home_page.js b/home_page.js index 31c2320..327b108 100644 --- a/home_page.js +++ b/home_page.js @@ -113,23 +113,9 @@ document.addEventListener("DOMContentLoaded", function () { } }); // END DOMContentLoaded -const knight = document.querySelector(".knight-wrapper"); -const dustContainer = document.getElementById("dust-container"); -setInterval(() => { - const rect = knight.getBoundingClientRect(); - - const d = document.createElement("div"); - d.classList.add("dust"); - - d.style.left = rect.left + 30 + "px"; - d.style.top = rect.bottom - 8 + "px"; - - dustContainer.appendChild(d); - - setTimeout(() => d.remove(), 500); -}, 180); +const knight = document.querySelector(".pixel-character"); function idleSwordSwing() { knight.style.animation = "knightIdleSword 0.5s steps(2) 1"; @@ -143,4 +129,20 @@ function idleSwordSwing() { // Randomly swing sword every 3โ€“6 seconds setInterval(() => { if (Math.random() < 0.4) idleSwordSwing(); -}, 3000); \ No newline at end of file +}, 3000); +const knight = document.querySelector(".knight-wrapper"); +const dustContainer = document.getElementById("dust-container"); + +setInterval(() => { + const rect = knight.getBoundingClientRect(); + + const d = document.createElement("div"); + d.classList.add("dust"); + + d.style.left = rect.left + 30 + "px"; + d.style.top = rect.bottom - 8 + "px"; + + dustContainer.appendChild(d); + + setTimeout(() => d.remove(), 500); +}, 180); \ No newline at end of file From 374b5f79f960dd9cc9aeebfb7feb29bf2c45aa4f Mon Sep 17 00:00:00 2001 From: Siddhi Khandelwal Date: Tue, 2 Dec 2025 13:08:45 +0530 Subject: [PATCH 03/24] Fixing bugs and errors --- home_page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home_page.js b/home_page.js index 327b108..dcba293 100644 --- a/home_page.js +++ b/home_page.js @@ -130,7 +130,7 @@ function idleSwordSwing() { setInterval(() => { if (Math.random() < 0.4) idleSwordSwing(); }, 3000); -const knight = document.querySelector(".knight-wrapper"); +const knight1 = document.querySelector(".knight-wrapper"); const dustContainer = document.getElementById("dust-container"); setInterval(() => { From b978fa2f245a223f7735e0b6fedc0d79457e7988 Mon Sep 17 00:00:00 2001 From: Revaa Rathore Date: Wed, 3 Dec 2025 01:02:09 +0530 Subject: [PATCH 04/24] added medium difficulty all 5 levels --- home_page.html | 32 ++-- home_page.js | 61 +++++-- pages_script/game.js | 420 ++++++++++++++++++++++++++++--------------- 3 files changed, 337 insertions(+), 176 deletions(-) diff --git a/home_page.html b/home_page.html index af73f7e..caf6f7a 100644 --- a/home_page.html +++ b/home_page.html @@ -8,25 +8,26 @@ - - +
- +
- ฬฑ +
+ +
-
+
@@ -40,7 +41,6 @@

๐Ÿงฉ Code Quest: Debug the Matrix

Squash the bugs before they corrupt the world. Debug wiselyโ€ฆ the stability of the digital realm depends on you!

- | @@ -51,11 +51,13 @@

๐Ÿงฉ Code Quest: Debug the Matrix

+ + + + + + + +