diff options
Diffstat (limited to 'html/rogue/js/config.js')
-rw-r--r-- | html/rogue/js/config.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/html/rogue/js/config.js b/html/rogue/js/config.js index 5a729e0..66c4916 100644 --- a/html/rogue/js/config.js +++ b/html/rogue/js/config.js @@ -1,37 +1,37 @@ const Config = { colors: { - BACKGROUND: 'rgba(135, 206, 235, 0.3)', // Pale blue - GRID: '#333333', // Off-black for grid lines - PLAYER: 'red', // Player color - HEX_FILL: '#ffffff' // White fill for passable hexes + BACKGROUND: 'rgba(135, 206, 235, 0.3)', + GRID: '#333333', + PLAYER: 'red', + HEX_FILL: '#ffffff' }, hex: { - SIZE: 40, // Base size of hexagons - GRID_SIZE: 10, // Number of hexes in grid (width/height) - get WIDTH() { // Computed hex width + 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 + get HEIGHT() { // Computed hex height return Math.sqrt(3) * this.SIZE; } }, game: { - FPS: 60, // Target frame rate - get FRAME_TIME() { // Computed frame duration + FPS: 60, + get FRAME_TIME() { return 1000 / this.FPS; } }, player: { - MOVE_SPEED: 0.1, // Player movement speed - SIZE_RATIO: 1/3 // Player size relative to hex size + MOVE_SPEED: 0.1, + SIZE_RATIO: 1/3 // The player's size relative to the hex size }, camera: { - FOLLOW_SPEED: 0.1, // Camera smoothing factor - DEADZONE_X: 200, // Horizontal deadzone in pixels - DEADZONE_Y: 150 // Vertical deadzone in pixels + FOLLOW_SPEED: 0.1, // Camera smoothing factor + DEADZONE_X: 200, // Horizontal deadzone in pixels + DEADZONE_Y: 150 // Vertical deadzone in pixels } }; \ No newline at end of file |