Skip to content

Commit

Permalink
Add a cool hover effect for my github pfp, add README
Browse files Browse the repository at this point in the history
  • Loading branch information
hnasheralneam committed Nov 24, 2024
1 parent 3044688 commit bc1b50a
Show file tree
Hide file tree
Showing 13 changed files with 287 additions and 186 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# counterspell-game
it's a game, made for counterspell DC
# SleepWalker Quest
*Made w/ ❤️ and 🐧 in the Washington, DC Counterspell hackathon*

You've woken up, and something's wrong - no, everything's wrong! Your house is in disarray, your neighbors are furious at the property damage you've caused, and somehow you managed to misplace your wallet *and* keys. You've had another disasterous sleepwalking session! Can you clean up all the destruction you've wrought? Can you make things well again with your neighbors? And, most importantly, can you get some sleep medicine? Find out by playing at [sleepwalker.quest](https://sleepwalker.quest/).

Made by Isaac, Hamza, Micha, and Gabrielle.
I'm not sleep deprived, I promise.
(help they won't let us go, they've locked the doors, they're comi-
Thanks to Gus and Josh for hosting the hackathon! We really appreciate it!
Shameless plug - [@hnasheralneam](https://github.com/hnasheralneam)

![Screenshot](/assets/screenshot.png)


## To-do - IMPORTANT
make sure people actually do the stuff before it says room is clean
Make sure all rooms can be completed (get key)
add challenge to get item for old man, woman (give lamp to man, 3 flowers to woman - both at shop)
3 changes: 3 additions & 0 deletions acknowledgements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Not sure what everyone else did, but here are the assets I used

Candy icon: https://www.megavoxels.com/wp-content/uploads/2024/07/how-to-make-pixel-art-candy-6.webp
Binary file added assets/items/candy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/items/lamp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/items/money.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/items/potion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 61 additions & 62 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,67 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sleepwalker - A Counterspell Game</title>
<link rel="stylesheet" href="styles/style.css" />
<link rel="icon" href="/assets/img/favicon.svg" />
</head>
<body style="width: 100vw; height: 100vh; overflow: hidden">
<a style="font-size: 30px; margin-left: 10px; text-align: left; position: absolute; text-decoration: none; color: #0ff" href="javascript:howtoplay()">?</a>
<h1 style="width: 100vw; height: 10vh; text-align: center; font-size: 7vw">
Sleepwalker
</h1>

<div class="shell" id="shell">
<div class="lines"></div>
<div class="current-line">
<p><span class="terminal-text">[email protected]:~</span>$&nbsp;</p>
<input class="terminal-input" type="text" />
</div>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sleepwalker - A Counterspell Game</title>
<link rel="stylesheet" href="styles/style.css" />
<link rel="icon" href="/assets/img/favicon.svg" />
</head>

<body style="width: 100vw; height: 100vh; overflow: hidden">
<a style="font-size: 30px; margin-left: 10px; text-align: left; position: absolute; text-decoration: none; color: #0ff"
href="javascript:howtoplay()">?</a>
<h1 style="width: 100vw; height: 10vh; text-align: center; font-size: 7vw">
Sleepwalker
</h1>

<div class="shell" id="shell" onclick="document.querySelector('.terminal-input').focus()">
<div class="lines"></div>
<div class="current-line">
<p><span class="terminal-text">[email protected]:~</span>$&nbsp;</p>
<input class="terminal-input" type="text" />
</div>
</div>
<div class="bottom-bar">
<a href="https://hackclub.com/" target="_blank"><img class="hc-flag"
src="https://assets.hackclub.com/flag-orpheus-left.svg" alt="Hack Club" /></a>
<div class="dev-profile-icon">
<a href="https://github.com/isaacfonner" target="_blank"><img class="pfp" src="/assets/img/isaacfonner.png"
alt="GitHub" />
</a>

</div>
<div class="bottom-bar">
<a href="https://hackclub.com/" target="_blank"
><img
class="hc-flag"
src="https://assets.hackclub.com/flag-orpheus-left.svg"
alt="Hack Club"
/></a>
<div class="dev-profile-icon">
<a href="https://github.com/isaacfonner" target="_blank"
><img class="pfp" src="/assets/img/isaacfonner.png" alt="GitHub" />
</a>

</div>
<div class="dev-profile-icon">
<a href="https://github.com/MichaByte" target="_blank"
><img class="pfp" src="/assets/img/MichaByte.jpg" alt="GitHub" />
</a>
</div>
<div class="dev-profile-icon">
<a href="https://github.com/hnasheralneam" target="_blank"
><img class="pfp" src="/assets/img/hnasheralneam.jpg" alt="GitHub" />
</a>
</div>
<div class="dev-profile-icon">
<a href="https://github.com/gesutherland" target="_blank"
><img class="pfp" src="/assets/img/gesutherland.jpg" alt="GitHub" />
</a>
</div>
<div class="counterspell-logo">
<a href="https://counterspell.hackclub.com/" target="_blank"
><img
src="/assets/img/counterspell.png"
alt="Counterspell"
/>
</a>
</div>
<div class="dev-profile-icon">
<a href="https://github.com/MichaByte" target="_blank"><img class="pfp" src="/assets/img/MichaByte.jpg"
alt="GitHub" />
</a>
</div>
</body>
<script src="scripts/data.js"></script>
<script src="scripts/inventory.js"></script>
<script src="scripts/quests.js"></script>
<script scr="scripts/map.js"></script>
<script src="scripts/shell.js"></script>
<script src="scripts/main.js"></script>
</html>
<div class="dev-profile-icon">
<a href="https://github.com/hnasheralneam" target="_blank">
<div class="outer-circle">
<div class="inner-circle"></div>
</div>
</a>
</div>
<div class="dev-profile-icon">
<a href="https://github.com/gesutherland" target="_blank"><img class="pfp" src="/assets/img/gesutherland.jpg"
alt="GitHub" />
</a>
</div>
<div class="counterspell-logo">
<a href="https://counterspell.hackclub.com/" target="_blank"><img src="/assets/img/counterspell.png"
alt="Counterspell" />
</a>
</div>
</div>
</body>
<script src="scripts/data.js"></script>
<script src="scripts/inventory.js"></script>
<script src="scripts/quests.js"></script>
<script scr="scripts/map.js"></script>
<script src="scripts/shell.js"></script>
<script src="scripts/main.js"></script>

</html>
7 changes: 3 additions & 4 deletions scripts/inventory.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const inventoryImages = {
"key": "assets/items/key.png",
"wallet": "assets/items/wallet.png",
"lamp": "https://www.megavoxels.com/wp-content/uploads/2024/07/how-to-make-pixel-art-candy-6.webp",
"lamp": "assets/items/lamp.png",
"plate": "assets/items/plate.png",
"silverware": "https://img.freepik.com/premium-vector/apple-pixel-art-style_553915-88.jpg",
"soap": "assets/items/soap.png",
"chair:": "https://cloud-lhqcn70mv-hack-club-bot.vercel.app/0image.png",
"candy": "https://www.megavoxels.com/wp-content/uploads/2024/07/how-to-make-pixel-art-candy-6.webp"
"money": "assets/items/money.png",
"candy": "assets/items/candy.png"
}

function isInInventory(item) {
Expand Down
18 changes: 17 additions & 1 deletion scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,24 @@ function bathroom() {
}
function outside() {
newLine(
"After investigating all the rooms in your house, you decide to go outside and ask your neighbour, who often likes to sit on the porch and ask him what happened. You know he is retired and does not work, but he does not appear to be home. You knock on the door several times and eventually he comes out. After he sees you, he talks to you.<br>"
"After investigating all the rooms in your house, you decide to go outside. From here, you can go to the park or stop by and visit your neighbor.",
"",
['Press "1" to go to the park.', 'Press "2" to visit your neighbor.']
);
nextPlaces = ["park", "oldmanHouse"];
}
function park() {
newLine("It's the park at the end of your neighborhood. There's a walking trail that goes through the woods with benches scattered along either side.");
if (!park.visited) {
newLine("Oh! It's your wallet lying next to a park bench. You pick it up.");
addItemToInventory("wallet");
addItemToInventory("money", 3);
}
newLine('Press "1" to go back');
nextPlaces = ["outside"];
}
function oldmanHouse() {
newLine("You go to talk to your neighbor, who often likes to sit on the porch and ask him what happened. You know he is retired and does not work, but he does not appear to be home. You knock on the door several times and eventually he comes out. After he sees you, he talks to you.");
let needsSomething = newDialog(
"assets/img/oldmanneighbor.png",
"oldmanneighbor",
Expand Down
27 changes: 24 additions & 3 deletions scripts/map.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
function showMap() {
function showMapDialog() {
console.log("pntuhsntehsaonethusanoet")
newLine("Use goto <number> to move to a location.");
newLine("1. home");
newLine("2. old man's house");
newLine("3. women's house");
newLine("4. park"); // lost wallet
newLine("4. park");
newLine("5. store");
}

function goToPlace(number) {
//
switch (number) {
case "1":
bedroom();
break;
case "2":
outside();
break;
case "3":
activePlace = "femaleneighbor";
break;
case "4":
activePlace = "park";
break;
case "5":
activePlace = "store";
break;
default:
newLine("Invalid location");
return;
}
window[activePlace]();
}
Loading

0 comments on commit bc1b50a

Please sign in to comment.