about summary refs log blame commit diff stats
path: root/html/rogue/js/config.js
blob: 90c1f49f3a179c25c170a1a58d75c32a6e48220b (plain) (tree)
1
2
3
4
5
6
7
8
9

                



                                               


          


                                                                    

                                 
                                             




                                            

                          




                                   
                        

                        


             


                                                         

     
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
    }
};