Spaces:
Running
on
T4
Running
on
T4
cosimotaiuti
commited on
Upload 111 files
Browse files- LICENSE.md +21 -0
- README.md +24 -3
- static/.DS_Store +0 -0
- static/assets/.DS_Store +0 -0
- static/assets/css/index-style.css +6 -3
- static/assets/img/.DS_Store +0 -0
- static/assets/img/appartment/basemap.png +0 -0
- static/assets/img/appartment/bedroomdoorlocked.png +0 -0
- static/assets/img/appartment/bedroomdoorunlocked.png +0 -0
- static/assets/img/appartment/bookcasesearchable.png +0 -0
- static/assets/img/appartment/bookcaseunusuable.png +0 -0
- static/assets/img/appartment/bookcaseusable.png +0 -0
- static/assets/img/appartment/cabinetsearchable.png +0 -0
- static/assets/img/appartment/cabinetunsearchable.png +0 -0
- static/assets/img/appartment/coffeetableunusable.png +0 -0
- static/assets/img/appartment/coffeetableusable.png +0 -0
- static/assets/img/appartment/deadbodyunusable.png +0 -0
- static/assets/img/appartment/deadbodyusable.png +0 -0
- static/assets/img/appartment/desksearchable.png +0 -0
- static/assets/img/appartment/deskunsearchable.png +0 -0
- static/assets/img/appartment/dressersearchable.png +0 -0
- static/assets/img/appartment/dresserunsearchable.png +0 -0
- static/assets/img/appartment/fridgesearchable.png +0 -0
- static/assets/img/appartment/fridgeunsearchable.png +0 -0
- static/assets/img/appartment/generatoroff.png +0 -0
- static/assets/img/appartment/generatoron.png +0 -0
- static/assets/img/appartment/mainentranceopen.png +0 -0
- static/assets/img/appartment/storagelocked.png +0 -0
- static/assets/img/appartment/storageunlocked.png +0 -0
- static/assets/img/appartment/stovesearchable.png +0 -0
- static/assets/img/appartment/stoveunsearchable.png +0 -0
- static/assets/img/appartment/theexit.png +0 -0
- static/assets/img/appartment/tvunused.png +0 -0
- static/assets/img/appartment/tvused.png +0 -0
- static/assets/img/clown.png +0 -0
- static/assets/img/gf.png +0 -0
- static/assets/img/hand.png +0 -0
- static/assets/img/help.png +0 -0
- static/assets/img/how_to_play/cabinet.png +0 -0
- static/assets/img/how_to_play/deadbody.png +0 -0
- static/credits.html +132 -0
- static/game/elmnts/clown.js +1 -1
- static/game/game.js +13 -5
- static/game/gameState.js +3 -1
- static/game/index.html +1 -0
- static/game/utilities/chat.js +1 -1
- static/game/utilities/draw.js +1 -0
- static/game/utilities/sound.js +8 -1
- static/howto/how-to-play-2.html +3 -3
- static/index.html +1 -0
LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MIT License
|
2 |
+
|
3 |
+
Copyright (c) 2025 Johnny
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
README.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: 📱
|
4 |
colorFrom: gray
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
-
#
|
13 |
|
14 |
An interactive horror escape game where your messages determine the fate of others.
|
15 |
|
@@ -22,3 +22,24 @@ docker build -t p5js-game .
|
|
22 |
# Run the container
|
23 |
|
24 |
docker run -p 8000:8000 p5js-game
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
title: Text to Survive
|
3 |
emoji: 📱
|
4 |
colorFrom: gray
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
+
sdk_version: "3.50.2"
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
+
# Text to Survive - A Text-Based Horror Escape Game
|
13 |
|
14 |
An interactive horror escape game where your messages determine the fate of others.
|
15 |
|
|
|
22 |
# Run the container
|
23 |
|
24 |
docker run -p 8000:8000 p5js-game
|
25 |
+
|
26 |
+
### API Key Setup
|
27 |
+
|
28 |
+
To run this game, you'll need a Mistral AI API key. You can obtain one by:
|
29 |
+
|
30 |
+
1. Going to [Mistral AI Platform](https://console.mistral.ai/)
|
31 |
+
2. Creating an account
|
32 |
+
3. Generating an API key in your dashboard
|
33 |
+
|
34 |
+
Once you have your API key, you can set it as an environment variable:
|
35 |
+
|
36 |
+
## Authors
|
37 |
+
|
38 |
+
| Name | Links |
|
39 |
+
| ---------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
40 |
+
| Johnny Moacdieh | [LinkedIn](https://www.linkedin.com/in/johnny-moacdieh-935687b3/) • [Website](http://johnnym.dev/) |
|
41 |
+
| Carl Farra | [LinkedIn](https://www.linkedin.com/in/carlfarra/) • [Website](https://rpsdaily.com/) |
|
42 |
+
| Remi Kaito | [LinkedIn](https://www.linkedin.com/in/remikaito/) • [X/Twitter](https://x.com/mrrremi) |
|
43 |
+
| Cosimo Taiuti | [LinkedIn](https://www.linkedin.com/in/cosimotaiuti/) | [X/Twitter](https://x.com/cosimo_taiuti) | [Website](https://www.cosimotaiuti.com/) |
|
44 |
+
| Joseph "Tonic" Pollack | [LinkedIn](https://www.linkedin.com/in/josephpollack/) • [HuggingFace](https://huggingface.co/Tonic) |
|
45 |
+
| Luca Teodorescu | [LinkedIn](https://www.linkedin.com/in/luca-teodorescu/) |
|
static/.DS_Store
CHANGED
Binary files a/static/.DS_Store and b/static/.DS_Store differ
|
|
static/assets/.DS_Store
CHANGED
Binary files a/static/assets/.DS_Store and b/static/assets/.DS_Store differ
|
|
static/assets/css/index-style.css
CHANGED
@@ -98,11 +98,14 @@ main {
|
|
98 |
|
99 |
.menu {
|
100 |
display: flex;
|
101 |
-
margin-top: 250px;
|
102 |
flex-direction: column;
|
103 |
gap: 30px;
|
104 |
align-items: center;
|
105 |
-
position:
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
|
108 |
.menu::after {
|
@@ -377,7 +380,7 @@ main {
|
|
377 |
}
|
378 |
|
379 |
.character img {
|
380 |
-
width:
|
381 |
height: auto;
|
382 |
}
|
383 |
|
|
|
98 |
|
99 |
.menu {
|
100 |
display: flex;
|
|
|
101 |
flex-direction: column;
|
102 |
gap: 30px;
|
103 |
align-items: center;
|
104 |
+
position: absolute;
|
105 |
+
top: 50%;
|
106 |
+
left: 50%;
|
107 |
+
transform: translate(-50%, -50%);
|
108 |
+
z-index: 1000;
|
109 |
}
|
110 |
|
111 |
.menu::after {
|
|
|
380 |
}
|
381 |
|
382 |
.character img {
|
383 |
+
width: 400px;
|
384 |
height: auto;
|
385 |
}
|
386 |
|
static/assets/img/.DS_Store
CHANGED
Binary files a/static/assets/img/.DS_Store and b/static/assets/img/.DS_Store differ
|
|
static/assets/img/appartment/basemap.png
CHANGED
static/assets/img/appartment/bedroomdoorlocked.png
CHANGED
static/assets/img/appartment/bedroomdoorunlocked.png
CHANGED
static/assets/img/appartment/bookcasesearchable.png
CHANGED
static/assets/img/appartment/bookcaseunusuable.png
CHANGED
static/assets/img/appartment/bookcaseusable.png
CHANGED
static/assets/img/appartment/cabinetsearchable.png
CHANGED
static/assets/img/appartment/cabinetunsearchable.png
CHANGED
static/assets/img/appartment/coffeetableunusable.png
CHANGED
static/assets/img/appartment/coffeetableusable.png
CHANGED
static/assets/img/appartment/deadbodyunusable.png
CHANGED
static/assets/img/appartment/deadbodyusable.png
CHANGED
static/assets/img/appartment/desksearchable.png
CHANGED
static/assets/img/appartment/deskunsearchable.png
CHANGED
static/assets/img/appartment/dressersearchable.png
CHANGED
static/assets/img/appartment/dresserunsearchable.png
CHANGED
static/assets/img/appartment/fridgesearchable.png
CHANGED
static/assets/img/appartment/fridgeunsearchable.png
CHANGED
static/assets/img/appartment/generatoroff.png
CHANGED
static/assets/img/appartment/generatoron.png
CHANGED
static/assets/img/appartment/mainentranceopen.png
CHANGED
static/assets/img/appartment/storagelocked.png
CHANGED
static/assets/img/appartment/storageunlocked.png
CHANGED
static/assets/img/appartment/stovesearchable.png
CHANGED
static/assets/img/appartment/stoveunsearchable.png
CHANGED
static/assets/img/appartment/theexit.png
CHANGED
static/assets/img/appartment/tvunused.png
CHANGED
static/assets/img/appartment/tvused.png
CHANGED
static/assets/img/clown.png
CHANGED
static/assets/img/gf.png
CHANGED
static/assets/img/hand.png
CHANGED
static/assets/img/help.png
CHANGED
static/assets/img/how_to_play/cabinet.png
ADDED
static/assets/img/how_to_play/deadbody.png
ADDED
static/credits.html
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="fr">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
+
<title>Credits - Text to Survive</title>
|
7 |
+
<link rel="stylesheet" href="assets/css/index-style.css" />
|
8 |
+
<style>
|
9 |
+
.credits-container {
|
10 |
+
text-align: center;
|
11 |
+
color: #fff;
|
12 |
+
margin-top: 2rem;
|
13 |
+
display: flex;
|
14 |
+
flex-direction: column;
|
15 |
+
align-items: center;
|
16 |
+
justify-content: center;
|
17 |
+
min-height: 50vh;
|
18 |
+
}
|
19 |
+
.credits-list {
|
20 |
+
list-style: none;
|
21 |
+
padding: 0;
|
22 |
+
display: flex;
|
23 |
+
flex-direction: column;
|
24 |
+
gap: 2rem;
|
25 |
+
}
|
26 |
+
.credits-list li {
|
27 |
+
margin: 0;
|
28 |
+
}
|
29 |
+
.credits-list a {
|
30 |
+
font-family: "HorrorBrush", cursive;
|
31 |
+
color: #fff;
|
32 |
+
text-decoration: none;
|
33 |
+
transition: all 0.3s;
|
34 |
+
font-size: 36px;
|
35 |
+
letter-spacing: 2px;
|
36 |
+
}
|
37 |
+
.credits-list a:hover {
|
38 |
+
color: #9b0000;
|
39 |
+
transform: scale(1.1);
|
40 |
+
text-shadow: 0 0 10px rgba(155, 0, 0, 0.5);
|
41 |
+
}
|
42 |
+
.back-button {
|
43 |
+
margin-top: 4rem;
|
44 |
+
}
|
45 |
+
</style>
|
46 |
+
</head>
|
47 |
+
<body>
|
48 |
+
<div class="led-bar">
|
49 |
+
<div class="light-beam"></div>
|
50 |
+
</div>
|
51 |
+
<div class="background-elements">
|
52 |
+
<img src="assets/img/blood-2.png" alt="" class="blood blood-top-left" />
|
53 |
+
<img src="assets/img/help.png" alt="" class="blood blood-top-right" />
|
54 |
+
<img src="assets/img/splatter.png" alt="" class="blood splatter" />
|
55 |
+
<img src="assets/img/hand.png" alt="" class="blood blood-bottom-right" />
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<main>
|
59 |
+
|
60 |
+
|
61 |
+
<div class="credits-container">
|
62 |
+
<ul class="credits-list">
|
63 |
+
<li><a href="https://www.linkedin.com/in/johnny-moacdieh-935687b3/" target="_blank">Johnny Moacdieh</a></li>
|
64 |
+
<li><a href="https://www.linkedin.com/in/carlfarra/" target="_blank">Carl Farra</a></li>
|
65 |
+
<li><a href="https://www.linkedin.com/in/remikaito/" target="_blank">Remi Kaito</a></li>
|
66 |
+
<li><a href="https://www.linkedin.com/in/cosimotaiuti/" target="_blank">Cosimo Taiuti</a></li>
|
67 |
+
<li><a href="https://www.linkedin.com/in/josephpollack/" target="_blank">Joseph Pollack</a></li>
|
68 |
+
<li><a href="https://www.linkedin.com/in/luca-teodorescu/" target="_blank">Luca Teodorescu</a></li>
|
69 |
+
</ul>
|
70 |
+
<div class="back-button">
|
71 |
+
<a href="index.html" class="menu-item">BACK TO MENU</a>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
</main>
|
75 |
+
|
76 |
+
<div class="sound-button" onclick="toggleSound()">
|
77 |
+
<img src="/static/assets/img/sondon.png" alt="Sound control" id="soundIcon" />
|
78 |
+
</div>
|
79 |
+
|
80 |
+
<audio id="bgMusic" loop>
|
81 |
+
<source src="/static/assets/sounds/music.mp3" type="audio/mp3" />
|
82 |
+
</audio>
|
83 |
+
|
84 |
+
<script>
|
85 |
+
let isSoundOn = true;
|
86 |
+
const soundIcon = document.getElementById("soundIcon");
|
87 |
+
const bgMusic = document.getElementById("bgMusic");
|
88 |
+
|
89 |
+
window.addEventListener("DOMContentLoaded", () => {
|
90 |
+
if (localStorage.getItem("isSoundOn") === null) {
|
91 |
+
localStorage.setItem("isSoundOn", "true");
|
92 |
+
} else {
|
93 |
+
isSoundOn = localStorage.getItem("isSoundOn") === "true";
|
94 |
+
}
|
95 |
+
updateSoundIcon();
|
96 |
+
try {
|
97 |
+
bgMusic.currentTime = 10;
|
98 |
+
if (isSoundOn) {
|
99 |
+
bgMusic.play().catch((error) => {
|
100 |
+
console.log("Autoplay prevented:", error);
|
101 |
+
isSoundOn = false;
|
102 |
+
localStorage.setItem("isSoundOn", "false");
|
103 |
+
updateSoundIcon();
|
104 |
+
});
|
105 |
+
}
|
106 |
+
} catch (error) {
|
107 |
+
console.error("Error playing audio:", error);
|
108 |
+
}
|
109 |
+
});
|
110 |
+
|
111 |
+
function toggleSound() {
|
112 |
+
isSoundOn = !isSoundOn;
|
113 |
+
localStorage.setItem("isSoundOn", isSoundOn.toString());
|
114 |
+
if (isSoundOn) {
|
115 |
+
if (bgMusic.currentTime < 10) {
|
116 |
+
bgMusic.currentTime = 10;
|
117 |
+
}
|
118 |
+
bgMusic.play();
|
119 |
+
} else {
|
120 |
+
bgMusic.pause();
|
121 |
+
}
|
122 |
+
updateSoundIcon();
|
123 |
+
}
|
124 |
+
|
125 |
+
function updateSoundIcon() {
|
126 |
+
soundIcon.src = isSoundOn
|
127 |
+
? "/static/assets/img/sondon.png"
|
128 |
+
: "/static/assets/img/soundoff.png";
|
129 |
+
}
|
130 |
+
</script>
|
131 |
+
</body>
|
132 |
+
</html>
|
static/game/elmnts/clown.js
CHANGED
@@ -31,7 +31,7 @@ class Clown extends Character {
|
|
31 |
|
32 |
decideBehavior() {
|
33 |
if (!this.isMoving) {
|
34 |
-
const roomEntries = this.gameState.map_data.rooms;
|
35 |
|
36 |
if (this.targetGirlfriend && !this.gameState.girlfriend.isHiding) {
|
37 |
const girlfriendPos = this.targetGirlfriend.getCharacterPosition();
|
|
|
31 |
|
32 |
decideBehavior() {
|
33 |
if (!this.isMoving) {
|
34 |
+
const roomEntries = this.gameState.map_data.rooms.filter(room => room.name !== "Kitchen");
|
35 |
|
36 |
if (this.targetGirlfriend && !this.gameState.girlfriend.isHiding) {
|
37 |
const girlfriendPos = this.targetGirlfriend.getCharacterPosition();
|
static/game/game.js
CHANGED
@@ -20,13 +20,10 @@ let messageSnd;
|
|
20 |
|
21 |
let successSnd;
|
22 |
|
|
|
|
|
23 |
|
24 |
|
25 |
-
|
26 |
-
let isSoundOn =
|
27 |
-
localStorage.getItem("isSoundOn") === null
|
28 |
-
? true
|
29 |
-
: localStorage.getItem("isSoundOn") !== "false";
|
30 |
const soundIcon = document.getElementById("soundIcon");
|
31 |
const bgMusic = document.getElementById("bgMusic");
|
32 |
|
@@ -66,6 +63,17 @@ async function initializeChat() {
|
|
66 |
}
|
67 |
|
68 |
async function setup() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
setStressLevel('no');
|
70 |
|
71 |
baseMapImg = loadImage("/assets/img/appartment/basemap.png");
|
|
|
20 |
|
21 |
let successSnd;
|
22 |
|
23 |
+
let isSoundOn = true;
|
24 |
+
|
25 |
|
26 |
|
|
|
|
|
|
|
|
|
|
|
27 |
const soundIcon = document.getElementById("soundIcon");
|
28 |
const bgMusic = document.getElementById("bgMusic");
|
29 |
|
|
|
63 |
}
|
64 |
|
65 |
async function setup() {
|
66 |
+
|
67 |
+
// Vérifier si c'est la première visite
|
68 |
+
if (localStorage.getItem("isSoundOn") === null) {
|
69 |
+
// Première visite : initialiser avec le son activé
|
70 |
+
localStorage.setItem("isSoundOn", "true");
|
71 |
+
} else {
|
72 |
+
// Visites suivantes : récupérer l'état précédent
|
73 |
+
isSoundOn = localStorage.getItem("isSoundOn") == "true";
|
74 |
+
}
|
75 |
+
|
76 |
+
|
77 |
setStressLevel('no');
|
78 |
|
79 |
baseMapImg = loadImage("/assets/img/appartment/basemap.png");
|
static/game/gameState.js
CHANGED
@@ -46,7 +46,6 @@ class GameState {
|
|
46 |
);
|
47 |
}
|
48 |
|
49 |
-
|
50 |
getStressPrompt() {
|
51 |
const currentStress = this.girlfriend ? this.girlfriend.stressLevel : 50; // Default to 50 if girlfriend not initialized
|
52 |
|
@@ -187,9 +186,12 @@ ${this.girlfriend.getCurrentRoom() !== this.clown.getCurrentRoom()
|
|
187 |
}
|
188 |
Your text responses should be:
|
189 |
-- Brief and urgent
|
|
|
190 |
-- Reflect genuine fear and panic
|
191 |
-- Write like real text messages (short, quick responses)
|
192 |
-- No time for pleasantries or long explanations
|
|
|
|
|
193 |
-- May include typos or rushed writing due to stress
|
194 |
--You are very scared but you are also super brave to be honest
|
195 |
-- As long as the stress level increases, you will be more scared and more likely to hide or to not follow the instructions
|
|
|
46 |
);
|
47 |
}
|
48 |
|
|
|
49 |
getStressPrompt() {
|
50 |
const currentStress = this.girlfriend ? this.girlfriend.stressLevel : 50; // Default to 50 if girlfriend not initialized
|
51 |
|
|
|
186 |
}
|
187 |
Your text responses should be:
|
188 |
-- Brief and urgent
|
189 |
+
-- Avoid using asterisks in the textMessage content
|
190 |
-- Reflect genuine fear and panic
|
191 |
-- Write like real text messages (short, quick responses)
|
192 |
-- No time for pleasantries or long explanations
|
193 |
+
-- If asked to hide in a room that isnt a hiding place just go to the room you might find a hiding place there
|
194 |
+
--If asked to exit the house perform exit action dont just go to the hallway, just exit
|
195 |
-- May include typos or rushed writing due to stress
|
196 |
--You are very scared but you are also super brave to be honest
|
197 |
-- As long as the stress level increases, you will be more scared and more likely to hide or to not follow the instructions
|
static/game/index.html
CHANGED
@@ -53,6 +53,7 @@
|
|
53 |
<input
|
54 |
type="text"
|
55 |
id="prompt"
|
|
|
56 |
placeholder="Type your message..."
|
57 |
/>
|
58 |
<button onclick="sendMessage()">
|
|
|
53 |
<input
|
54 |
type="text"
|
55 |
id="prompt"
|
56 |
+
autocomplete="off"
|
57 |
placeholder="Type your message..."
|
58 |
/>
|
59 |
<button onclick="sendMessage()">
|
static/game/utilities/chat.js
CHANGED
@@ -38,7 +38,7 @@ async function strongIndependantWoman(){
|
|
38 |
{ role: "user", content: `
|
39 |
**your boyfriend has been away from his phone for a while and has not replied promptly to your last message,
|
40 |
you shall based on all that you know decide to take an action, also you're pissed at the boyfriend**
|
41 |
-
you are brave, strong, fabulous and will
|
42 |
you're gall is to escape the house and avoid the clown at all costs
|
43 |
|
44 |
` },
|
|
|
38 |
{ role: "user", content: `
|
39 |
**your boyfriend has been away from his phone for a while and has not replied promptly to your last message,
|
40 |
you shall based on all that you know decide to take an action, also you're pissed at the boyfriend**
|
41 |
+
you are brave, strong, fabulous and will do something about this situation
|
42 |
you're gall is to escape the house and avoid the clown at all costs
|
43 |
|
44 |
` },
|
static/game/utilities/draw.js
CHANGED
@@ -75,6 +75,7 @@ function drawLabels(rooms) {
|
|
75 |
}
|
76 |
|
77 |
function drawWallsAndDoors() {
|
|
|
78 |
for (let y = 0; y < GRID_ROWS; y++) {
|
79 |
for (let x = 0; x < GRID_COLS; x++) {
|
80 |
const cell = grid[y][x];
|
|
|
75 |
}
|
76 |
|
77 |
function drawWallsAndDoors() {
|
78 |
+
let grid = gameState.map_data.grid;
|
79 |
for (let y = 0; y < GRID_ROWS; y++) {
|
80 |
for (let x = 0; x < GRID_COLS; x++) {
|
81 |
const cell = grid[y][x];
|
static/game/utilities/sound.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
function playSound(sound) {
|
2 |
-
|
|
|
3 |
let soundToPlay;
|
4 |
|
5 |
// Determine which sound to play
|
@@ -65,6 +66,12 @@ function toggleSound() {
|
|
65 |
updateSoundIcon();
|
66 |
}
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
function updateSoundIcon() {
|
69 |
soundIcon.src = isSoundOn ? "/static/assets/img/sondon.png" : "/static/assets/img/soundoff.png";
|
70 |
}
|
|
|
1 |
function playSound(sound) {
|
2 |
+
|
3 |
+
if (typeof isSoundOn === 'undefined' ? false : isSoundOn) {
|
4 |
let soundToPlay;
|
5 |
|
6 |
// Determine which sound to play
|
|
|
66 |
updateSoundIcon();
|
67 |
}
|
68 |
|
69 |
+
// Check if sound setting exists in localStorage, if not toggle sound on
|
70 |
+
if (localStorage.getItem("isSoundOn") === null) {
|
71 |
+
toggleSound();
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
function updateSoundIcon() {
|
76 |
soundIcon.src = isSoundOn ? "/static/assets/img/sondon.png" : "/static/assets/img/soundoff.png";
|
77 |
}
|
static/howto/how-to-play-2.html
CHANGED
@@ -25,13 +25,13 @@
|
|
25 |
<div class="content">
|
26 |
<h1>How to Play</h1>
|
27 |
<p class="main-description">
|
28 |
-
|
29 |
</p>
|
30 |
<div class="objects-container">
|
31 |
<div class="object-type green">
|
32 |
<div class="image-container">
|
33 |
<img
|
34 |
-
src="../assets/img/how_to_play/
|
35 |
alt="Green object example"
|
36 |
class="tutorial-image"
|
37 |
/>
|
@@ -43,7 +43,7 @@
|
|
43 |
<div class="object-type red">
|
44 |
<div class="image-container">
|
45 |
<img
|
46 |
-
src="../assets/img/how_to_play/
|
47 |
alt="Red object example"
|
48 |
class="tutorial-image"
|
49 |
/>
|
|
|
25 |
<div class="content">
|
26 |
<h1>How to Play</h1>
|
27 |
<p class="main-description">
|
28 |
+
Help her find the key to escape
|
29 |
</p>
|
30 |
<div class="objects-container">
|
31 |
<div class="object-type green">
|
32 |
<div class="image-container">
|
33 |
<img
|
34 |
+
src="../assets/img/how_to_play/cabinet.png"
|
35 |
alt="Green object example"
|
36 |
class="tutorial-image"
|
37 |
/>
|
|
|
43 |
<div class="object-type red">
|
44 |
<div class="image-container">
|
45 |
<img
|
46 |
+
src="../assets/img/how_to_play/deadbody.png"
|
47 |
alt="Red object example"
|
48 |
class="tutorial-image"
|
49 |
/>
|
static/index.html
CHANGED
@@ -26,6 +26,7 @@
|
|
26 |
<nav class="menu">
|
27 |
<a href="game/index.html" class="menu-item new-game">NEW GAME</a>
|
28 |
<a href="howto/how-to-play.html" class="menu-item how-to-play">HOW TO PLAY</a>
|
|
|
29 |
</nav>
|
30 |
<div class="character">
|
31 |
<a href="howto/how-to-play.html">
|
|
|
26 |
<nav class="menu">
|
27 |
<a href="game/index.html" class="menu-item new-game">NEW GAME</a>
|
28 |
<a href="howto/how-to-play.html" class="menu-item how-to-play">HOW TO PLAY</a>
|
29 |
+
<a href="credits.html" class="menu-item credits">CREDITS</a>
|
30 |
</nav>
|
31 |
<div class="character">
|
32 |
<a href="howto/how-to-play.html">
|