anarch/constants.h

118 lines
2.5 KiB
C
Raw Normal View History

2019-10-03 18:04:14 -04:00
/**
@file constants.h
This file contains definitions of game constants that are not considered
part of game settings and whose change can ffect the game balance and
playability, e.g. physics constants.
by Miloslav Ciz (drummyfish), 2019
Released under CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0/)
plus a waiver of all other intellectual property. The goal of this work is
be and remain completely in the public domain forever, available for any use
whatsoever.
*/
2019-09-25 09:51:19 -04:00
#ifndef _SFG_CONSTANTS_H
#define _SFG_CONSTANTS_H
/**
How quickly player turns left/right, in degrees per second.
*/
2019-10-01 14:25:21 -04:00
#define SFG_PLAYER_TURN_SPEED 210
2019-09-25 09:51:19 -04:00
/**
How quickly player moves, in squares per second.
*/
2019-10-01 14:25:21 -04:00
#define SFG_PLAYER_MOVE_SPEED 10
/**
Gravity acceleration in squares / (second^2).
*/
#define SFG_GRAVITY_ACCELERATION 30
2019-09-25 09:51:19 -04:00
2019-10-03 14:09:00 -04:00
/**
Initial upwards speed of player's jump, in squares per second.
*/
#define SFG_PLAYER_JUMP_SPEED 80
2019-09-26 21:34:49 -04:00
/**
How quickly elevators and squeezers move, in RCL_Unit per second.
*/
#define SFG_MOVING_WALL_SPEED 1024
2019-10-04 15:09:10 -04:00
/**
How quickly doors open and close, in RCL_Unit per second.
*/
#define SFG_DOOR_OPEN_SPEED 2048
2019-10-06 10:47:47 -04:00
/**
Says the (Chebyshev) distance in game squares at which level elements
(items, monsters etc.) become active.
*/
2019-12-28 14:16:44 -05:00
#define SFG_LEVEL_ELEMENT_ACTIVE_DISTANCE 10
2019-10-06 10:47:47 -04:00
2019-10-17 17:58:19 -04:00
/**
2019-10-18 10:34:51 -04:00
Rate at which AI will be updated, which also affects how fast enemies will
appear.
2019-10-17 17:58:19 -04:00
*/
2019-10-22 10:48:27 -04:00
#define SFG_AI_FPS 4
2019-10-18 11:26:13 -04:00
/**
Says a probability (0 - 255) of the AI changing its state during one update
step.
*/
2019-10-22 10:48:27 -04:00
#define SFG_AI_RANDOM_CHANGE_PROBABILITY 40
2019-10-17 17:58:19 -04:00
2019-10-21 09:21:22 -04:00
/**
Speed of rocket projectile, in squares per second.
*/
2019-11-09 15:45:32 -05:00
#define SFG_FIREBALL_SPEED 15
2019-10-21 09:21:22 -04:00
2019-10-21 17:50:19 -04:00
/**
Distance at which level elements (sprites) collide, in RCL_Unit (1024 per
square).
*/
2019-10-21 19:34:40 -04:00
#define SFG_ELEMENT_COLLISION_DISTANCE 800
2019-10-22 08:27:56 -04:00
/**
Height, in RCL_Units, at which collisions happen with level elements
(sprites).
*/
#define SFG_ELEMENT_COLLISION_HEIGHT 1024
2019-10-21 19:34:40 -04:00
/**
Distance at which explosion does damage and throws away the player and
monsters, in RCL_Units.
*/
#define SFG_EXPLOSION_DISTANCE 2048
2019-10-21 17:50:19 -04:00
2019-10-24 17:20:35 -04:00
/**
How much damage explosion causes in its range.
*/
#define SFG_EXPLOSION_DAMAGE 18
2019-10-22 15:02:39 -04:00
/**
Time, in ms, after which shotgun can be fired again.
*/
#define SFG_WEAPON_SHOTGUN_COOLDOWN 500
2019-10-23 18:09:46 -04:00
/**
Maximum player health.
*/
#define SFG_PLAYER_MAX_HEALTH 100
2019-10-24 17:20:35 -04:00
/**
At which value health indicator shows a warning (red color).
*/
#define SFG_PLAYER_HEALTH_WARNING_LEVEL 20
2019-10-25 18:50:22 -04:00
/**
Amount of health that is increased by taking a health kit.
*/
#define SFG_HEALTH_KIT_VALUE 20
2019-09-25 09:51:19 -04:00
#endif // guard