Meta Description" name="description" />
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>ALTAMASH - OFFLINE COURT</title>
<style>
body { margin:0; overflow:hidden; background:black; font-family: Arial, sans-serif; }
canvas { display:block; }
#title {
position: absolute;
top: 15%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 40px;
font-weight: bold;
letter-spacing: 10px;
pointer-events: none;
text-shadow: 0 0 20px #00ffff;
z-index: 10;
}
#ui {
position: absolute;
top: 10px;
left: 10px;
color: #00ffff;
font-size: 18px;
z-index: 10;
}
#controls {
position: absolute;
bottom: 20px;
width: 100%;
display: flex;
justify-content: space-between;
padding: 0 20px;
box-sizing: border-box;
z-index: 10;
}
.btn {
width: 80px;
height: 80px;
background: rgba(0,255,255,0.2);
border: 2px solid #00ffff;
border-radius: 50%;
color: white;
font-size: 30px;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
}
.btn:active { background: rgba(0,255,255,0.6); }
#startScreen {
position: absolute;
inset: 0;
background: rgba(0,0,0,0.85);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 20;
color: white;
}
#startScreen button {
margin-top: 20px;
padding: 12px 35px;
font-size: 20px;
background: #00ffff;
border: none;
border-radius: 30px;
font-weight: bold;
box-shadow: 0 0 20px #00ffff;
}
</style>
</head>
<body>
<div id="title">ALTAMASH</div>
<div id="ui">SCORE: <span id="score">0</span><br>HIGH: <span id="high">0</span></div>
<div id="startScreen">
<h1 style="letter-spacing:8px; text-shadow:0 0 20px #00ffff;">ALTAMASH</h1>
<p>OFFLINE COURT RACING</p>
<button onclick="startGame()">PLAY OFFLINE</button>
</div>
<div id="controls">
<div class="btn" id="leftBtn">◀</div>
<div class="btn" id="rightBtn">▶</div>
</div>
<canvas id="c"></canvas>
<script>
let canvas = document.getElementById('c');
let ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
let particles = [];
for(let i=0; i<80; i++){
particles.push({
x: Math.random()*canvas.width,
y: Math.random()*canvas.height,
vx: (Math.random()-0.5)*1.5,
vy: (Math.random()-0.5)*1.5,
r: Math.random()*2+1
});
}
let gameRunning = false;
let score =1
1
3KB
3KB
60.0ms
116.0ms
60.0ms