mirror of
https://github.com/n0remac/game-jam-2020.git
synced 2025-12-08 12:05:14 -06:00
34 lines
863 B
Python
34 lines
863 B
Python
"""
|
|
config.py
|
|
Holds all constants used for setting up the game.
|
|
May later hold functions for loading/saving configuration files.
|
|
"""
|
|
|
|
|
|
class Config(object):
|
|
"""
|
|
A simple class dedicated to loading, storing and organizing constants.
|
|
"""
|
|
|
|
# Constants
|
|
SCREEN_WIDTH = 1650
|
|
SCREEN_HEIGHT = 1000
|
|
SCREEN_TITLE = "Triple Dungeon"
|
|
TILE_WIDTH = 63
|
|
IDLE_UPDATES_PER_FRAME = 20
|
|
RUN_UPDATES_PER_FRAME = 10
|
|
|
|
# Constants used to scale our sprites from their original size
|
|
CHARACTER_SCALING = 1
|
|
TILE_SCALING = 2
|
|
|
|
# Movement speed of player, in pixels per frame
|
|
PLAYER_MOVEMENT_SPEED = 7
|
|
|
|
# How many pixels to keep as a minimum margin between the character
|
|
# and the edge of the screen.
|
|
LEFT_VIEWPORT_MARGIN = 250
|
|
RIGHT_VIEWPORT_MARGIN = 250
|
|
BOTTOM_VIEWPORT_MARGIN = 50
|
|
TOP_VIEWPORT_MARGIN = 100
|