diff --git a/shared/src/constants.ts b/shared/src/constants.ts index 75e7f27..45a7dd4 100644 --- a/shared/src/constants.ts +++ b/shared/src/constants.ts @@ -16,6 +16,15 @@ export const HUNGER_THRESHOLD = 30; export const ENERGY_THRESHOLD = 20; export const NEED_RECOVERY_RATE = 0.5; +// Day/night cycle +export const DAY_NIGHT_RATIO = 2; // day is 2x as long as night +export const DAY_HOURS = 12; // game hours of daytime +export const NIGHT_HOURS = DAY_HOURS / DAY_NIGHT_RATIO; // 6 hours of night +export const TOTAL_HOURS = DAY_HOURS + NIGHT_HOURS; // 18 hours total cycle +export const SUNSET_DURATION_HOURS = 1; // game hours for sunset transition +export const SUNRISE_DURATION_HOURS = 1; // game hours for sunrise transition +export const NIGHT_DARKNESS = 0.3; // max overlay opacity (0-1) + // Directions (row index in spritesheet) export const Direction = { DOWN: 0,