-
+
GAME OVER
@@ -415,7 +428,7 @@
const canvas = document.getElementById('pacmanCanvas');
const ctx = canvas.getContext('2d');
- const TILE = 20;
+ const TILE = 18;
const COLS = 19;
const ROWS = 21;
@@ -445,10 +458,10 @@
function initGhosts() {
ghosts = [
- { x: 9, y: 8, pixelX: 9 * TILE, pixelY: 8 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[0], speed: 1.8, isEaten: false },
- { x: 8, y: 10, pixelX: 8 * TILE, pixelY: 10 * TILE, dirX: 1, dirY: 0, color: GHOST_COLORS[1], speed: 1.6, isEaten: false },
- { x: 9, y: 10, pixelX: 9 * TILE, pixelY: 10 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[2], speed: 1.6, isEaten: false },
- { x: 10, y: 10, pixelX: 10 * TILE, pixelY: 10 * TILE, dirX: -1, dirY: 0, color: GHOST_COLORS[3], speed: 1.5, isEaten: false }
+ { x: 9, y: 8, pixelX: 9 * TILE, pixelY: 8 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[0], speed: 2, isEaten: false },
+ { x: 8, y: 10, pixelX: 8 * TILE, pixelY: 10 * TILE, dirX: 1, dirY: 0, color: GHOST_COLORS[1], speed: 2, isEaten: false },
+ { x: 9, y: 10, pixelX: 9 * TILE, pixelY: 10 * TILE, dirX: 0, dirY: -1, color: GHOST_COLORS[2], speed: 2, isEaten: false },
+ { x: 10, y: 10, pixelX: 10 * TILE, pixelY: 10 * TILE, dirX: -1, dirY: 0, color: GHOST_COLORS[3], speed: 2, isEaten: false }
];
}
@@ -576,8 +589,8 @@
// Move Ghosts
ghosts.forEach(g => {
- const gOnGridX = (g.pixelX % TILE === 0);
- const gOnGridY = (g.pixelY % TILE === 0);
+ const gOnGridX = (Math.round(g.pixelX) % TILE === 0);
+ const gOnGridY = (Math.round(g.pixelY) % TILE === 0);
if (gOnGridX && gOnGridY) {
const gx = Math.round(g.pixelX / TILE);
diff --git a/jeux/spaceinvaders.html b/jeux/spaceinvaders.html
index 720df12..c6f1a09 100644
--- a/jeux/spaceinvaders.html
+++ b/jeux/spaceinvaders.html
@@ -123,6 +123,17 @@
font-family: 'Courier New', monospace !important;
}
+ html, body {
+ overflow: hidden !important;
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+ ::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
+ * { scrollbar-width: none !important; }
+
body {
background: var(--bg);
color: var(--text);
@@ -131,9 +142,8 @@
flex-direction: column;
align-items: center;
justify-content: center;
- min-height: 100vh;
- overflow-x: hidden;
- padding: 4px;
+ height: 100%;
+ padding: 6px;
transition: background 0.3s ease, color 0.3s ease;
}
@@ -141,13 +151,14 @@
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 14px;
- padding: 10px 12px;
+ padding: 8px 12px;
box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(92,167,255,0.12);
display: flex;
flex-direction: column;
align-items: center;
- max-width: 580px;
+ max-width: 520px;
width: 100%;
+ flex-shrink: 0;
}
.header-bar {
@@ -155,8 +166,8 @@
justify-content: space-between;
align-items: center;
width: 100%;
- margin-bottom: 10px;
- padding: 6px 14px;
+ margin-bottom: 6px;
+ padding: 4px 12px;
background: var(--panel-box);
border-radius: 8px;
border: 1px solid var(--border);
@@ -252,10 +263,12 @@
}
.controls-hint {
- margin-top: 8px;
+ margin-top: 6px;
font-size: 11px;
color: var(--muted);
text-align: center;
+ line-height: 1.35;
+ padding: 2px 4px;
}
@@ -272,7 +285,7 @@
-
+
GAME OVER
diff --git a/jeux/tetris.html b/jeux/tetris.html
index 1ef06e1..77f0885 100644
--- a/jeux/tetris.html
+++ b/jeux/tetris.html
@@ -93,6 +93,17 @@
font-family: 'Courier New', monospace !important;
}
+ html, body {
+ overflow: hidden !important;
+ height: 100%;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+ ::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
+ * { scrollbar-width: none !important; }
+
* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
body {
background: var(--bg);
@@ -102,21 +113,22 @@
flex-direction: column;
align-items: center;
justify-content: center;
- min-height: 100vh;
- overflow: hidden;
- padding: 4px;
+ height: 100%;
+ padding: 6px;
transition: background 0.3s ease, color 0.3s ease;
}
.arcade-wrap {
display: flex;
- gap: 14px;
+ flex-direction: row !important;
+ gap: 12px;
align-items: flex-start;
background: var(--card-bg);
border: 1px solid var(--border);
border-radius: 14px;
- padding: 12px;
+ padding: 10px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(92, 167, 255, 0.1);
position: relative;
+ flex-shrink: 0;
transition: all 0.3s ease;
}
.canvas-container {
@@ -133,21 +145,21 @@
.sidebar {
display: flex;
flex-direction: column;
- gap: 8px;
- width: 154px;
+ gap: 6px;
+ width: 146px;
}
.panel-box {
background: var(--panel-box);
border: 1px solid var(--border);
border-radius: 8px;
- padding: 8px;
+ padding: 5px;
text-align: center;
}
.stats-box {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 2px;
- padding: 6px 2px;
+ padding: 4px 2px;
}
.stat-col {
display: flex;
@@ -155,14 +167,14 @@
align-items: center;
}
.stat-col h3 {
- font-size: 10px;
+ font-size: 9.5px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--muted);
margin-bottom: 2px;
}
.stat-col .value {
- font-size: 15px;
+ font-size: 14px;
font-weight: 700;
color: var(--blue);
font-family: "Courier New", Courier, monospace;
@@ -177,16 +189,16 @@
.btn-row {
display: grid;
grid-template-columns: 1fr 1fr;
- gap: 6px;
+ gap: 5px;
}
.btn {
background: var(--blue);
color: var(--blue-btn-text);
border: 0;
border-radius: 6px;
- padding: 7px 8px;
+ padding: 6px 6px;
font-weight: 700;
- font-size: 12px;
+ font-size: 11.5px;
cursor: pointer;
transition: all .15s ease;
width: 100%;
@@ -200,21 +212,21 @@
}
.btn.secondary:hover { opacity: 0.85; }
.controls-help {
- font-size: 10.5px;
+ font-size: 9.5px;
color: var(--muted);
- line-height: 1.45;
+ line-height: 1.35;
background: rgba(0,0,0,0.12);
border-radius: 6px;
- padding: 6px 8px;
+ padding: 5px 6px;
border: 1px solid var(--border);
}
.controls-help kbd {
background: var(--panel-box);
color: var(--text);
border: 1px solid var(--border);
- padding: 1px 4px;
+ padding: 1px 3px;
border-radius: 3px;
- font-size: 10px;
+ font-size: 9px;
font-family: monospace;
}
.touch-controls {
@@ -239,12 +251,6 @@
touch-action: manipulation;
}
.touch-btn:active { background: var(--blue); color: var(--blue-btn-text); }
- @media (max-width: 360px) {
- .arcade-wrap { flex-direction: column; align-items: center; padding: 6px; }
- .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
- .sidebar .panel-box { flex: 1; min-width: 80px; }
- .touch-controls { display: grid; }
- }
.overlay-msg {
position: absolute;
inset: 0;
@@ -269,7 +275,7 @@
-
+
GAME OVER
Score: 0
@@ -278,9 +284,9 @@