about summary refs log tree commit diff stats
path: root/html/rogue/js/config.js
blob: 90c1f49f3a179c25c170a1a58d75c32a6e48220b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
    }
};