Add 2 files
Browse files- index.html +41 -12
- prompts.txt +1 -3
index.html
CHANGED
|
@@ -550,7 +550,7 @@
|
|
| 550 |
<i class="fas fa-expand"></i>
|
| 551 |
</button>
|
| 552 |
<div class="timer">
|
| 553 |
-
Kalan Süre: <span id="time">
|
| 554 |
</div>
|
| 555 |
|
| 556 |
<div id="startScreen">
|
|
@@ -596,7 +596,7 @@
|
|
| 596 |
let joystick1Distance = 0;
|
| 597 |
let joystick2Distance = 0;
|
| 598 |
let catSpeed = 15;
|
| 599 |
-
let mouseSpeed =
|
| 600 |
let catPosition = { x: 0, y: 0 };
|
| 601 |
let mousePosition = { x: 0, y: 0 };
|
| 602 |
let joystick1Position = { x: 0, y: 0 };
|
|
@@ -606,7 +606,7 @@
|
|
| 606 |
let joystickRadius = 40;
|
| 607 |
let gameWidth = window.innerWidth;
|
| 608 |
let gameHeight = window.innerHeight;
|
| 609 |
-
let gameTime =
|
| 610 |
let timerInterval;
|
| 611 |
let countdownInterval;
|
| 612 |
let mouseCaught = false;
|
|
@@ -623,33 +623,33 @@
|
|
| 623 |
const difficultySettings = {
|
| 624 |
easy: {
|
| 625 |
catSpeed: 12,
|
| 626 |
-
mouseSpeed:
|
| 627 |
mouseIntelligence: 0.3,
|
| 628 |
-
gameTime:
|
| 629 |
letterSpeed: 2,
|
| 630 |
letterCount: 5
|
| 631 |
},
|
| 632 |
medium: {
|
| 633 |
catSpeed: 18,
|
| 634 |
-
mouseSpeed:
|
| 635 |
mouseIntelligence: 0.5,
|
| 636 |
-
gameTime:
|
| 637 |
letterSpeed: 3,
|
| 638 |
letterCount: 7
|
| 639 |
},
|
| 640 |
hard: {
|
| 641 |
catSpeed: 24,
|
| 642 |
-
mouseSpeed:
|
| 643 |
mouseIntelligence: 0.7,
|
| 644 |
-
gameTime: 30,
|
| 645 |
letterSpeed: 4,
|
| 646 |
letterCount: 10
|
| 647 |
},
|
| 648 |
extreme: {
|
| 649 |
catSpeed: 30,
|
| 650 |
-
mouseSpeed:
|
| 651 |
mouseIntelligence: 0.9,
|
| 652 |
-
gameTime:
|
| 653 |
letterSpeed: 5,
|
| 654 |
letterCount: 12
|
| 655 |
}
|
|
@@ -832,7 +832,7 @@
|
|
| 832 |
lastFrameTime = timestamp;
|
| 833 |
|
| 834 |
// Move cat based on joystick input
|
| 835 |
-
if (joystick1Active) {
|
| 836 |
const moveX = Math.cos(joystick1Angle) * catSpeed * (joystick1Distance / joystickRadius) * deltaTime;
|
| 837 |
const moveY = Math.sin(joystick1Angle) * catSpeed * (joystick1Distance / joystickRadius) * deltaTime;
|
| 838 |
|
|
@@ -889,6 +889,35 @@
|
|
| 889 |
mousePosition.x = Math.max(0, Math.min(gameWidth - 40, mousePosition.x));
|
| 890 |
mousePosition.y = Math.max(0, Math.min(gameHeight - 40, mousePosition.y));
|
| 891 |
} else if (!multiplayer && playerRole === "mouse") {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 892 |
// AI cat movement when player is mouse
|
| 893 |
moveCatAI(deltaTime);
|
| 894 |
} else if (!multiplayer) {
|
|
|
|
| 550 |
<i class="fas fa-expand"></i>
|
| 551 |
</button>
|
| 552 |
<div class="timer">
|
| 553 |
+
Kalan Süre: <span id="time">30</span>s
|
| 554 |
</div>
|
| 555 |
|
| 556 |
<div id="startScreen">
|
|
|
|
| 596 |
let joystick1Distance = 0;
|
| 597 |
let joystick2Distance = 0;
|
| 598 |
let catSpeed = 15;
|
| 599 |
+
let mouseSpeed = 30; // Reduced mouse speed
|
| 600 |
let catPosition = { x: 0, y: 0 };
|
| 601 |
let mousePosition = { x: 0, y: 0 };
|
| 602 |
let joystick1Position = { x: 0, y: 0 };
|
|
|
|
| 606 |
let joystickRadius = 40;
|
| 607 |
let gameWidth = window.innerWidth;
|
| 608 |
let gameHeight = window.innerHeight;
|
| 609 |
+
let gameTime = 30; // Increased to 30 seconds
|
| 610 |
let timerInterval;
|
| 611 |
let countdownInterval;
|
| 612 |
let mouseCaught = false;
|
|
|
|
| 623 |
const difficultySettings = {
|
| 624 |
easy: {
|
| 625 |
catSpeed: 12,
|
| 626 |
+
mouseSpeed: 30, // Reduced mouse speed
|
| 627 |
mouseIntelligence: 0.3,
|
| 628 |
+
gameTime: 30, // Increased to 30 seconds
|
| 629 |
letterSpeed: 2,
|
| 630 |
letterCount: 5
|
| 631 |
},
|
| 632 |
medium: {
|
| 633 |
catSpeed: 18,
|
| 634 |
+
mouseSpeed: 45, // Reduced mouse speed
|
| 635 |
mouseIntelligence: 0.5,
|
| 636 |
+
gameTime: 30, // Increased to 30 seconds
|
| 637 |
letterSpeed: 3,
|
| 638 |
letterCount: 7
|
| 639 |
},
|
| 640 |
hard: {
|
| 641 |
catSpeed: 24,
|
| 642 |
+
mouseSpeed: 60, // Reduced mouse speed
|
| 643 |
mouseIntelligence: 0.7,
|
| 644 |
+
gameTime: 30, // Increased to 30 seconds
|
| 645 |
letterSpeed: 4,
|
| 646 |
letterCount: 10
|
| 647 |
},
|
| 648 |
extreme: {
|
| 649 |
catSpeed: 30,
|
| 650 |
+
mouseSpeed: 75, // Reduced mouse speed
|
| 651 |
mouseIntelligence: 0.9,
|
| 652 |
+
gameTime: 30, // Increased to 30 seconds
|
| 653 |
letterSpeed: 5,
|
| 654 |
letterCount: 12
|
| 655 |
}
|
|
|
|
| 832 |
lastFrameTime = timestamp;
|
| 833 |
|
| 834 |
// Move cat based on joystick input
|
| 835 |
+
if (joystick1Active && (playerRole === "cat" || multiplayer)) {
|
| 836 |
const moveX = Math.cos(joystick1Angle) * catSpeed * (joystick1Distance / joystickRadius) * deltaTime;
|
| 837 |
const moveY = Math.sin(joystick1Angle) * catSpeed * (joystick1Distance / joystickRadius) * deltaTime;
|
| 838 |
|
|
|
|
| 889 |
mousePosition.x = Math.max(0, Math.min(gameWidth - 40, mousePosition.x));
|
| 890 |
mousePosition.y = Math.max(0, Math.min(gameHeight - 40, mousePosition.y));
|
| 891 |
} else if (!multiplayer && playerRole === "mouse") {
|
| 892 |
+
// Player controls mouse when in single player mouse mode
|
| 893 |
+
if (joystick1Active) {
|
| 894 |
+
const moveX = Math.cos(joystick1Angle) * mouseSpeed * (joystick1Distance / joystickRadius) * deltaTime;
|
| 895 |
+
const moveY = Math.sin(joystick1Angle) * mouseSpeed * (joystick1Distance / joystickRadius) * deltaTime;
|
| 896 |
+
|
| 897 |
+
// Check if mouse can move to new position (avoid letters)
|
| 898 |
+
const newMouseX = mousePosition.x + moveX;
|
| 899 |
+
const newMouseY = mousePosition.y + moveY;
|
| 900 |
+
|
| 901 |
+
let canMove = true;
|
| 902 |
+
|
| 903 |
+
for (let i = 0; i < letters.length; i++) {
|
| 904 |
+
const letter = letters[i];
|
| 905 |
+
if (checkCollisionWithObject(newMouseX, newMouseY, 40, 40, letter.x, letter.y, letter.size, letter.size)) {
|
| 906 |
+
canMove = false;
|
| 907 |
+
break;
|
| 908 |
+
}
|
| 909 |
+
}
|
| 910 |
+
|
| 911 |
+
if (canMove) {
|
| 912 |
+
mousePosition.x += moveX;
|
| 913 |
+
mousePosition.y += moveY;
|
| 914 |
+
}
|
| 915 |
+
|
| 916 |
+
// Keep mouse within bounds
|
| 917 |
+
mousePosition.x = Math.max(0, Math.min(gameWidth - 40, mousePosition.x));
|
| 918 |
+
mousePosition.y = Math.max(0, Math.min(gameHeight - 40, mousePosition.y));
|
| 919 |
+
}
|
| 920 |
+
|
| 921 |
// AI cat movement when player is mouse
|
| 922 |
moveCatAI(deltaTime);
|
| 923 |
} else if (!multiplayer) {
|
prompts.txt
CHANGED
|
@@ -1,3 +1 @@
|
|
| 1 |
-
|
| 2 |
-
Kalan süre kısmını küçült , kedi ye ve fareye animasyonlar ekle oyunu canlandır biraz , şimdi oyunun girisine ek olarak fare olma ozelligi ekleyelim ister kedi ister fare olalim , hatta ayni telefondan iki kisi oynamasi secenegini ekleyelim karsilikli cift analog koy , bunlarin hepsini secenek olarak sunalim oyun basinda , zorluk modlarini tekrar optimize et cok guzel calisir hale getir
|
| 3 |
-
Cift oyuncu kismin analogun biri altta biri ustte olsun kedi calisiyor ama fareyi kontrol edemiyoruz duzelt , fare olma secenegide calismiyor fareyi kontrol edicek kedi bizi kovalicak sekilde duzelt
|
|
|
|
| 1 |
+
Geri sayımı 30 saniyeye cıkart , farenin hızını düşür çok hızlı , fare ol modunda fare kontrol edemiyoruz düzelt
|
|
|
|
|
|