157 lines
3.7 KiB
HTML
157 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Retro Asteroids</title>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.2/p5.min.js"></script>
|
|
<script src="ship.js"></script>
|
|
<script src="asteroid.js"></script>
|
|
<script src="bullet.js"></script>
|
|
<script src="shieldOrb.js"></script>
|
|
<script src="greenOrb.js"></script>
|
|
<script src="pizza.js"></script>
|
|
<script src="hamburger.js"></script>
|
|
<script src="sketch.js"></script>
|
|
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 10px;
|
|
background: linear-gradient(135deg, #4A2C1B 0%, #7B4F2E 50%, #A67B5B 100%);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
h1 {
|
|
font-family: 'Press Start 2P', cursive;
|
|
color: #FFFFFF;
|
|
text-shadow: 0 0 10px #FF8C00, 0 0 20px #FF8C00;
|
|
font-size: 2em;
|
|
text-align: center;
|
|
margin: 10px 0;
|
|
animation: neon-glow 1.5s ease-in-out infinite alternate;
|
|
}
|
|
|
|
.crt-container {
|
|
position: relative;
|
|
width: 860px;
|
|
max-width: 95vw;
|
|
padding: 20px;
|
|
background: #4A2C1B;
|
|
border: 8px solid #7B4F2E;
|
|
border-radius: 15px;
|
|
box-shadow: 0 0 15px rgba(255, 140, 0, 0.7), inset 0 0 8px rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
canvas {
|
|
display: block;
|
|
margin: 0 auto;
|
|
border-radius: 8px;
|
|
background: #000000;
|
|
box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
|
|
}
|
|
|
|
.crt-container::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: repeating-linear-gradient(
|
|
transparent 0%,
|
|
rgba(0, 0, 0, 0.1) 1px,
|
|
transparent 2px,
|
|
transparent 3px
|
|
);
|
|
pointer-events: none;
|
|
animation: flicker 0.05s infinite;
|
|
}
|
|
|
|
.instructions {
|
|
font-family: 'Press Start 2P', cursive;
|
|
color: #FFFFFF;
|
|
text-shadow: 0 0 5px #FF8C00;
|
|
font-size: 0.9em;
|
|
text-align: center;
|
|
margin: 10px auto;
|
|
max-width: 800px;
|
|
padding: 0 10px;
|
|
}
|
|
|
|
.instructions p {
|
|
margin: 5px 0;
|
|
}
|
|
|
|
@keyframes neon-glow {
|
|
from {
|
|
text-shadow: 0 0 10px #FF8C00, 0 0 20px #FF8C00;
|
|
}
|
|
to {
|
|
text-shadow: 0 0 15px #FF8C00, 0 0 30px #FF8C00;
|
|
}
|
|
}
|
|
|
|
@keyframes flicker {
|
|
0% { opacity: 1; }
|
|
50% { opacity: 0.95; }
|
|
100% { opacity: 1; }
|
|
}
|
|
|
|
@media (max-width: 860px) {
|
|
.crt-container {
|
|
padding: 15px;
|
|
border-width: 6px;
|
|
}
|
|
h1 {
|
|
font-size: 1.5em;
|
|
}
|
|
.instructions {
|
|
font-size: 0.8em;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.crt-container {
|
|
padding: 10px;
|
|
border-width: 5px;
|
|
}
|
|
h1 {
|
|
font-size: 1.2em;
|
|
}
|
|
.instructions {
|
|
font-size: 0.7em;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Retro Asteroids</h1>
|
|
<!-- <div class="crt-container">
|
|
<canvas id="gameCanvas"></canvas>
|
|
</div> -->
|
|
<div class="instructions">
|
|
<p>W/Up: Thrust</p>
|
|
<p>A/Left: Rotate Left</p>
|
|
<p>D/Right: Rotate Right</p>
|
|
<p>Space: Shoot</p>
|
|
<p>K: Kid Mode</p>
|
|
<p>R: Restart</p>
|
|
<p>White: 10pts | Gold: 50pts</p>
|
|
<p>Pizza: 20pts | Burger: 10pts</p>
|
|
<p>Cyan: Shield | Green: Quad-Shot</p>
|
|
</div>
|
|
<script>
|
|
// Prevent arrow key scrolling
|
|
window.addEventListener('keydown', (e) => {
|
|
if ([37, 38, 39].includes(e.keyCode)) {
|
|
e.preventDefault();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |