Modified game to start immediately on page load
- Changed initialization from ATTRACT mode to READY state - Added 3-second READY countdown before auto-starting PLAYING state - Bypassed need for space button press to begin game - Game now starts automatically when page loads - Maintains full assembly-based implementation with immediate gameplay
This commit is contained in:
@@ -1382,10 +1382,10 @@
|
||||
console.log('=== SPACE BUTTON HANDLER COMPLETE ===');
|
||||
}
|
||||
|
||||
// Initialize game with ATTRACT mode (assembly-based startup)
|
||||
// Initialize game with immediate start (bypass ATTRACT mode)
|
||||
console.log('=== INITIALIZING GAME ===');
|
||||
gameState = 'ATTRACT';
|
||||
attractModeTimer = 0;
|
||||
gameState = 'READY'; // Start directly in READY state
|
||||
readyTimer = 180; // 3 seconds countdown
|
||||
|
||||
console.log('Mobile detected:', isMobile);
|
||||
console.log('Window width:', window.innerWidth);
|
||||
@@ -1408,7 +1408,7 @@
|
||||
// Update debug info
|
||||
updateDebugInfo();
|
||||
|
||||
console.log('Full Pacman game initialized with ATTRACT mode');
|
||||
console.log('Game initialized in READY state - will auto-start in 3 seconds');
|
||||
console.log('Game state:', gameState);
|
||||
console.log('=== GAME INITIALIZATION COMPLETE ===');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user