1+ /**
2+ * Main game configuration constants
3+ */
4+ export const GAME_CONFIG = {
5+ PLAYER : {
6+ SPEED : 200 ,
7+ SCALE : 0.5 ,
8+ DEPTH : 10 ,
9+ HITBOX_SCALE : 0.8 ,
10+ ATTACK_INTERVAL : 500 , // ms between attacks
11+ MAX_HEALTH : 100 , // Maximum player health
12+ DAMAGE_INTERVAL : 500 , // ms between damage ticks when overlapping enemies
13+ DAMAGE_AMOUNT : 5 , // Amount of damage taken per tick
14+ DAMAGE_TINT : 0xff0000 , // Red tint when damaged
15+ INVULNERABLE_DURATION : 1000 , // ms of invulnerability after taking damage
16+ HEALTH_BAR_WIDTH : 200 , // Width of health bar in pixels
17+ HEALTH_BAR_HEIGHT : 20 , // Height of health bar in pixels
18+ EXPERIENCE : {
19+ PICKUP_RADIUS : 10 , // Radius in pixels for auto-pickup
20+ MAGNET_RADIUS : 150 , // Radius in pixels for experience magnet effect
21+ MAGNET_SPEED : 300 // Speed at which orbs move toward player when in magnet radius
22+ }
23+ } ,
24+ ENEMY : {
25+ SPEED : 120 ,
26+ SCALE : 0.4 ,
27+ DEPTH : 5 ,
28+ SPAWN_INTERVAL : 1000 , // ms between spawns
29+ MAX_COUNT : 50 ,
30+ SPAWN_PADDING : 20 , // Distance from edge
31+ HITBOX_SCALE : 0.8 ,
32+ TINT : 0xff0000 ,
33+ MAX_HEALTH : 3 , // Number of hits to defeat an enemy
34+ DAMAGE_TINT : 0xff8800 , // Orange tint when damaged
35+ KNOCKBACK_FORCE : 150 , // Force applied when hit
36+ KNOCKBACK_DURATION : 200 , // ms of knockback effect
37+ EXPERIENCE_DROP_CHANCE : 1.0 // Chance (0-1) of dropping an experience orb
38+ } ,
39+ EXPERIENCE_ORB : {
40+ KEY : 'experience_orb' ,
41+ SCALE : 0.3 ,
42+ DEPTH : 3 ,
43+ TINT : 0x00ffff , // Cyan color
44+ VALUE : 1 , // Each orb gives 1 XP, player needs 25 for first level up
45+ LIFESPAN : 10000 , // ms before disappearing
46+ MAX_COUNT : 100 , // Maximum number of orbs
47+ PULSE_DURATION : 1000 , // ms for pulse animation
48+ PULSE_SCALE : 1.2 // Maximum scale during pulse
49+ } ,
50+ PROJECTILE : {
51+ PLAYER : {
52+ KEY : 'player_projectile' ,
53+ SPEED : 400 ,
54+ SCALE : 0.3 ,
55+ DEPTH : 8 ,
56+ MAX_COUNT : 100 ,
57+ LIFESPAN : 2000 , // ms
58+ TINT : 0xffff00 , // Yellow color
59+ DAMAGE : 1
60+ }
61+ } ,
62+ UI : {
63+ TEXT_STYLE : {
64+ fontSize : '18px' ,
65+ color : '#ffffff' ,
66+ strokeThickness : 2 ,
67+ stroke : '#000000'
68+ }
69+ }
70+ } ;
71+
72+ /**
73+ * Default camera dimensions if not specified elsewhere
74+ */
75+ export const DEFAULT_DIMENSIONS = {
76+ WIDTH : 1024 ,
77+ HEIGHT : 768
78+ } ;
0 commit comments