92 lines
2.5 KiB
C
92 lines
2.5 KiB
C
// Project-wide configurable constants
|
|
|
|
#define WRITE_DIR "power_play"
|
|
|
|
// Window title
|
|
#if IsRtcEnabled
|
|
#if IsDeveloperModeEnabled
|
|
#define WINDOW_TITLE "Debug (Developer Build)"
|
|
#else
|
|
#define WINDOW_TITLE "Debug"
|
|
#endif
|
|
#else
|
|
#if IsDeveloperModeEnabled
|
|
#define WINDOW_TITLE "Power Play (Developer Build)"
|
|
#else
|
|
#define WINDOW_TITLE "Power Play"
|
|
#endif
|
|
#endif
|
|
|
|
#define DEFAULT_CAMERA_WIDTH (16)
|
|
#define DEFAULT_CAMERA_HEIGHT ((f64)DEFAULT_CAMERA_WIDTH / (16.0 / 9.0))
|
|
|
|
// Rendered texture size + extra room for off-screen light falloff
|
|
#define RENDER_WIDTH (640 + 250)
|
|
#define RENDER_HEIGHT (360 + 250)
|
|
|
|
#define PIXELS_PER_UNIT ((f64)640 / (f64)DEFAULT_CAMERA_WIDTH)
|
|
|
|
// How many ticks back in time should the user thread blend between?
|
|
// <Delay> = <USER_INTERP_RATIO> * <Tick interval>
|
|
// E.g: At 1.5, the user thread will render 75ms back in time if the sim runs at 50tps
|
|
#define USER_INTERP_RATIO 1.2
|
|
#define USER_INTERP_ENABLED 1
|
|
|
|
// 64^2 = 4096 bins
|
|
#define SPACE_CELL_BINS_SQRT (64)
|
|
#define SPACE_CELL_SIZE (1)
|
|
|
|
#define SIM_TILES_PER_UNIT_SQRT (4)
|
|
#define SIM_TILES_PER_CHUNK_SQRT (16)
|
|
|
|
#define SIM_TICKS_PER_SECOND 100
|
|
// Like USER_INTERP_RATIO, but applies to snapshots received by the local sim from the
|
|
// master sim (how far back in time should the client render the server's state)
|
|
#define SIM_CLIENT_INTERP_RATIO 2.0
|
|
|
|
#define SIM_PHYSICS_SUBSTEPS 4
|
|
#define SIM_PHYSICS_ENABLE_WARM_STARTING 1
|
|
#define SIM_PHYSICS_ENABLE_RELAXATION 1
|
|
#define SIM_PHYSICS_ENABLE_TOI 1
|
|
|
|
#define SIM_PHYSICS_ENABLE_COLLISION 1
|
|
#define SIM_SPAWN_TESTENT 0
|
|
#define SIM_PLAYER_AIM 1
|
|
|
|
#if 0
|
|
#define SIM_MAX_LINEAR_VELOCITY 500
|
|
#define SIM_MAX_ANGULAR_VELOCITY (Tau * 20)
|
|
#else
|
|
#define SIM_MAX_LINEAR_VELOCITY F32Infinity
|
|
#define SIM_MAX_ANGULAR_VELOCITY F32Infinity
|
|
#endif
|
|
|
|
#define COLLIDER_DEBUG 0
|
|
#define COLLIDER_DEBUG_DETAILED 1
|
|
#define COLLIDER_DEBUG_DETAILED_DRAW_MENKOWSKI 1
|
|
|
|
#define FLOOD_DEBUG 0
|
|
|
|
#define GPU_DEBUG 0
|
|
#define GPU_DEBUG_VALIDATION 0
|
|
|
|
#define GPU_SHADER_PRINT 1
|
|
#define GPU_SHADER_PRINT_BUFFER_SIZE Kibi(64);
|
|
#define GPU_SHADER_PRINT_LOG 1
|
|
|
|
// If enabled, bitbuffs will insert/verify magic numbers & length for each read & write
|
|
#define BITBUFF_DEBUG 0
|
|
#define BITBUFF_TEST IsRtcEnabled
|
|
|
|
// If enabled, things like network writes & memory allocations will be tracked in a global statistics struct
|
|
#define GstatIsEnabled 1
|
|
|
|
////////////////////////////////////////////////////////////
|
|
//~ Settings
|
|
|
|
// TODO: Move these to user-configurable settings
|
|
|
|
#define VSYNC 1
|
|
#define AUDIO_ENABLED 0
|
|
#define FPS_LIMIT 300
|