Sprint 0: bug fixes and cleanup
- Fix Rocket/PropellerHat hitboxes (relative to sprite size, not magic offsets) - Spring now destroys itself on use with squash animation instead of staying invisible - Guard all powerups against double-trigger via consumed flag - Save genesis glow tween reference for clean destroy - Player.die() disables collisions (no more post-death platform bounces) - Replace hardcoded enemy spawn cap 0.5 with DIFFICULTY.maxEnemyRate - Enemy spawn position now anchored to platform X (-60/+60), not random - Powerup spawn clamped to screen bounds - Skip powerup spawn on breaking platforms (was unfair) - ScoreManager.addPoints() public method; remove direct score mutation - HUD elements use setScrollFactor(0) instead of per-frame repositioning - All magic numbers extracted to SCORE / PHYSICS / POWERUP_DURATION config - Remove dead code: showDeathVignette, drawDebug, createParticles, deathOverlay - Remove dead constants: PLATFORM_WIDTH/HEIGHT, PLAYER_MAX_SPEED, tileBias - Remove SUBMIT TO CHAIN fake button, replace with Coming Soon text - Safer cleanup loop: collect-then-destroy instead of mutating during iterate - gwei particles now have setScrollFactor(0.3) for parallax depth
This commit is contained in:
11
src/main.js
11
src/main.js
@@ -1,9 +1,9 @@
|
||||
import { Game, AUTO } from 'phaser';
|
||||
import { Game, AUTO, Scale } from 'phaser';
|
||||
import { BootScene } from './scenes/BootScene.js';
|
||||
import { MenuScene } from './scenes/MenuScene.js';
|
||||
import { GameScene } from './scenes/GameScene.js';
|
||||
import { GameOverScene } from './scenes/GameOverScene.js';
|
||||
import { GAME_WIDTH, GAME_HEIGHT } from './config/game.config.js';
|
||||
import { GAME_WIDTH, GAME_HEIGHT, GRAVITY } from './config/game.config.js';
|
||||
|
||||
const config = {
|
||||
type: AUTO,
|
||||
@@ -12,15 +12,14 @@ const config = {
|
||||
height: GAME_HEIGHT,
|
||||
backgroundColor: '#0d001a',
|
||||
scale: {
|
||||
mode: Phaser.Scale.FIT,
|
||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||
mode: Scale.FIT,
|
||||
autoCenter: Scale.CENTER_BOTH,
|
||||
},
|
||||
physics: {
|
||||
default: 'arcade',
|
||||
arcade: {
|
||||
gravity: { y: 1200 },
|
||||
gravity: { y: GRAVITY },
|
||||
debug: false,
|
||||
tileBias: 64,
|
||||
},
|
||||
},
|
||||
scene: [BootScene, MenuScene, GameScene, GameOverScene],
|
||||
|
||||
Reference in New Issue
Block a user