Initial commit: kids games
Contains game-jumpnrun and game-labyrinth projects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
99
game-labyrinth/index.html
Normal file
99
game-labyrinth/index.html
Normal file
@@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<title>LABYRINTH</title>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #0f0f23;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
font-family: 'Press Start 2P', monospace;
|
||||
overflow: hidden;
|
||||
touch-action: none;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
canvas {
|
||||
image-rendering: pixelated;
|
||||
image-rendering: crisp-edges;
|
||||
border: 4px solid #333;
|
||||
box-shadow: 0 0 30px rgba(0, 255, 100, 0.15);
|
||||
}
|
||||
|
||||
/* D-Pad für Mobile */
|
||||
#dpad {
|
||||
display: none;
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.dpad-btn {
|
||||
position: absolute;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
border: 2px solid rgba(255, 255, 255, 0.25);
|
||||
border-radius: 10px;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
font-size: 22px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dpad-btn:active {
|
||||
background: rgba(255, 204, 0, 0.35);
|
||||
border-color: rgba(255, 204, 0, 0.6);
|
||||
}
|
||||
|
||||
#dpad-up { top: 0; left: 50%; transform: translateX(-50%); }
|
||||
#dpad-down { bottom: 0; left: 50%; transform: translateX(-50%); }
|
||||
#dpad-left { top: 50%; left: 0; transform: translateY(-50%); }
|
||||
#dpad-right { top: 50%; right: 0; transform: translateY(-50%); }
|
||||
|
||||
@media (pointer: coarse) {
|
||||
#dpad { display: block; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<canvas id="game"></canvas>
|
||||
|
||||
<div id="dpad">
|
||||
<button class="dpad-btn" id="dpad-up">▲</button>
|
||||
<button class="dpad-btn" id="dpad-down">▼</button>
|
||||
<button class="dpad-btn" id="dpad-left">◀</button>
|
||||
<button class="dpad-btn" id="dpad-right">▶</button>
|
||||
</div>
|
||||
|
||||
<script src="js/levels.js"></script>
|
||||
<script src="js/utils.js"></script>
|
||||
<script src="js/renderer.js"></script>
|
||||
<script src="js/player.js"></script>
|
||||
<script src="js/monster.js"></script>
|
||||
<script src="js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user