Files
muuhd/frontend/ascii_dungeon_crawler.html
Kim Ravn Hansen 6787489186 Wang
2025-10-01 20:50:06 +02:00

134 lines
5.2 KiB
HTML
Executable File

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ASCII Dungeon Crawler</title>
<style>
body {
margin: 0;
padding: 20px;
background-color: #000;
color: #ccc;
font-family: "Courier New", monospace;
overflow: hidden;
}
#gameContainer {
text-align: center;
}
#viewport {
font-size: 10px;
line-height: 8px;
white-space: pre;
border: 2px solid #0f0;
display: inline-block;
padding: 2px;
border: 5px solid #666;
font-weight: bold;
}
#minimap {
font-size: 12px;
line-height: 12px;
white-space: pre;
display: inline-block;
padding: 2px;
border: 5px solid #666;
color: #666;
background-color: black;
}
#controls {
margin-top: 20px;
color: #0f0;
}
#mapInput {
margin-top: 20px;
}
textarea {
background-color: #001100;
color: #ccc;
border: 1px solid #0f0;
font-family: "Courier New", monospace;
padding: 10px;
}
button {
background-color: #001100;
color: #0f0;
border: 1px solid #0f0;
padding: 5px 10px;
font-family: "Courier New", monospace;
cursor: pointer;
}
button:hover {
background-color: #002200;
}
</style>
</head>
<body>
<div id="gameContainer">
<div id="viewport"></div>
<div id="compass">orientation</div>
<div id="minimap"></div>
<div id="threejs" style="border: 2px solid green; background-color: #222"></div>
<div id="mapInput">
←→↑↓
<br />
<textarea id="mapText" rows="10" cols="50">
############################################################
############################################################
############################################################
## ################# ########################
## # ### ################# # ## ########################
## #P# Z###############Z # ## ################ ::: P(north) Z(1) Z(1) ;; Comments
## # # # ################# # ## #### ####
## E # # ## # #### # # #### ::: E(Gnolls)
###### #################### ## #### # ####
###### #################### # ## # # #### ####
######E#################### # #### ::: E(Goblins) These are comments
###### #################### ########## #### ####
###### #################### ########## # # #### # # ####
###### #################### ########## #### # # ####
###### #################### #################### ####
###### #################### ############################
###### #################### # ############################
###### #################### # ############################
######E#################### # ############################ ::: E(Minotaur)
###### ## ##### ## ############################
###### ## Z#### ## # # ############################ ::: Z(2) // Channel 2
###### ## ####Z ## ######## ############ ::: Z(2) // Channel 2
###### ## ## # ########### ## ######## ############
######E## # #E ############ ::: E(Dwarf) ; E(Gelatinous_Cube)
###### # # # ############
######### # ## ########### # ######### # ############
######### # # ########### # ######### # # ############
######### ########### # ######### ############
###########O############### # ######### #### ############### ::: O(1)
########################### # ######### #### ###############
########################### # ######### #### ###############
########################### # ######### #### ###############
########################### # #### ###############
######################### # #### # # # ######## ###
########################o # # ######## # ### ::: o:2
######################### # ##### # # # # ######## ###
######################### # # ###
######################### ####################### # ###
##################################################### ###
############################################################
</textarea
>
<br /><br />
<button onclick="game.loadMap()">Load Map</button>
</div>
</div>
<script type="module" src="./ascii_dungeon_crawler.js"></script>
</body>
</html>