2025-01-22 11:24:19 -05:00
|
|
|
"""
|
2025-02-04 14:43:54 -05:00
|
|
|
scene_config.py
|
2025-01-22 11:24:19 -05:00
|
|
|
|
|
|
|
author: Caleb Scott
|
|
|
|
|
2025-02-04 14:43:54 -05:00
|
|
|
Configuration file for modifying the visual scene of the game.
|
2025-02-04 14:45:56 -05:00
|
|
|
This is not the same as engine/game_config.py, which is used to adjust
|
2025-02-05 15:33:07 -05:00
|
|
|
game objects (apart from their visuals)
|
2025-01-22 11:24:19 -05:00
|
|
|
"""
|
|
|
|
|
|
|
|
# CONSTANTS ---------------------------------------------------------
|
|
|
|
|
|
|
|
# Sizing
|
|
|
|
TILE_SCALE = 1.0
|
|
|
|
|
|
|
|
# Screen constants
|
|
|
|
SCREEN_WIDTH = 960
|
|
|
|
SCREEN_HEIGHT = 960
|
|
|
|
SCREEN_TITLE = "Miniopolis Demo"
|
|
|
|
|
2025-02-05 15:33:07 -05:00
|
|
|
# World size in pixels
|
2025-01-22 11:24:19 -05:00
|
|
|
WORLD_WIDTH = 960
|
|
|
|
WORLD_HEIGHT = 640
|
|
|
|
|
|
|
|
# Text placement
|
|
|
|
TEXT_X = 10
|
|
|
|
TEXT_Y = SCREEN_HEIGHT - 30
|
|
|
|
TEXT_Y_WIDTH = 30
|
|
|
|
|
|
|
|
# Resources/sprites
|
|
|
|
RES = "res/"
|
|
|
|
MINING_RES = RES + "miner.png"
|
|
|
|
HOUSING_RES = RES + "housing.png"
|
|
|
|
CROPS_RES = RES + "crops.png"
|
|
|
|
LOGGER_RES = RES + "logger.png"
|
|
|
|
HYDRO_RES = RES + "hydropower.png"
|
|
|
|
FACTORY_RES = RES + "factory.png"
|
2025-01-22 14:51:13 -05:00
|
|
|
JUNCTION_RES = RES + "connector.png"
|
2025-01-22 11:24:19 -05:00
|
|
|
|
|
|
|
# Maps dir + map presets
|
|
|
|
MAPS = "maps/"
|
|
|
|
TEST_MAP = MAPS + "default-map.json"
|
|
|
|
|
2025-02-05 15:33:07 -05:00
|
|
|
# Tile property which gets its name as string
|
|
|
|
TILE_NAME = 'class'
|
|
|
|
|
2025-01-22 11:24:19 -05:00
|
|
|
# Layers for Map
|
|
|
|
LAYER_STRUCTURES = "Structures"
|
2025-02-05 15:33:07 -05:00
|
|
|
LAYER_FOUNDATIONS = "Foundations"
|
2025-01-22 11:24:19 -05:00
|
|
|
LAYER_ENVIRONMENT = "Environment"
|
2025-01-22 12:34:51 -05:00
|
|
|
|
2025-02-05 15:33:07 -05:00
|
|
|
# Layer ordering (bottom to top)
|
|
|
|
LAYERS = [
|
|
|
|
LAYER_ENVIRONMENT,
|
|
|
|
LAYER_FOUNDATIONS,
|
|
|
|
LAYER_STRUCTURES
|
|
|
|
]
|
2025-01-22 12:34:51 -05:00
|
|
|
|
2025-02-05 15:33:07 -05:00
|
|
|
# Layer Options (for spatial hashing)
|
|
|
|
LAYER_OPTIONS = {
|
|
|
|
LAYER_ENVIRONMENT: {
|
|
|
|
"use_spatial_hash": True
|
|
|
|
},
|
|
|
|
LAYER_FOUNDATIONS: {
|
|
|
|
"use_spatial_hash": True
|
|
|
|
},
|
|
|
|
LAYER_STRUCTURES: {
|
|
|
|
"use_spatial_hash": True
|
|
|
|
}
|
2025-01-22 12:34:51 -05:00
|
|
|
}
|