const Config = {
colors: {
BACKGROUND: 'rgba(135, 206, 235, 0.3)',
GRID: '#333333',
PLAYER: 'red',
HEX_FILL: '#ffffff'
},
hex: {
SIZE: 40, // Size of a single hex
GRID_SIZE: 10, // Number of hexes in the grid (width/height)
get WIDTH() { // Computed hex width
return this.SIZE * 2;
},
get HEIGHT() { // Computed hex height
return Math.sqrt(3) * this.SIZE;
}
},
game: {
FPS: 60,
get FRAME_TIME() {
return 1000 / this.FPS;
}
},
player: {
MOVE_SPEED: 0.1,
SIZE_RATIO: 1/3,
VISION_RANGE: 3
},
camera: {
FOLLOW_SPEED: 0.1, // Camera smoothing factor
DEADZONE_X: 200, // Horizontal deadzone in pixels
DEADZONE_Y: 150 // Vertical deadzone in pixels
},
ui: {
inventory: {
PADDING: 20,
WIDTH: 300,
HEIGHT: 400,
TITLE_FONT: '20px Arial',
ITEM_FONT: '16px Arial',
ITEM_SPACING: 30,
TITLE_OFFSET: 20,
ITEMS_START_OFFSET: 60,
BACKGROUND_COLOR: 'rgba(0, 0, 0, 0.7)',
WINDOW_COLOR: '#ffffff',
TEXT_COLOR: '#000000'
}
},
items: {
SPAWN_COUNT: 10,
types: {
COIN: {
name: 'Coin',
color: '#FFD700',
size: 0.2
},
GEM: {
name: 'Gem',
color: '#50C878',
size: 0.25
}
}
}
};