2 (c) 2010 Perttu Ahola <celeron55@gmail.com>
5 #ifndef CONSTANTS_HEADER
6 #define CONSTANTS_HEADER
8 #define DEBUGFILE "debug.txt"
10 // Define for simulating the quirks of sending through internet
11 // WARNING: This disables unit testing of socket and connection
12 #define INTERNET_SIMULATOR 0
14 #define CONNECTION_TIMEOUT 30
16 #define RESEND_TIMEOUT_MIN 0.333
17 #define RESEND_TIMEOUT_MAX 3.0
18 // resend_timeout = avg_rtt * this
19 #define RESEND_TIMEOUT_FACTOR 4
23 #define SERVERMAP_DELETE_UNUSED_SECTORS_TIMEOUT (60*10)
24 #define SERVER_MAP_SAVE_INTERVAL (60)
26 //#define SERVERMAP_DELETE_UNUSED_SECTORS_TIMEOUT (5)
27 //#define SERVER_MAP_SAVE_INTERVAL (5)
29 #define FOV_ANGLE (PI/2.5)
31 // The absolute working limit is (2^15 - viewing_range).
32 #define MAP_GENERATION_LIMIT (31000)
34 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 7
35 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 3
36 #define MAX_SIMULTANEOUS_BLOCK_SENDS 2
37 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 1
39 #define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
40 #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 1
42 // Viewing range stuff
44 #define FPS_DEFAULT_WANTED 30
45 #define FPS_DEFAULT_MAX 60
47 #define FORCEDFETCH_RANGE 80
49 #define HEIGHTMAP_RANGE_NODES 300
51 // The freetime ratio is dynamically kept high enough to make this
52 // dtime jitter possible
54 /*#define DTIME_JITTER_MAX_FRACTION 0.5
55 #define FREETIME_RATIO_MIN 0.05
56 #define FREETIME_RATIO_MAX 0.4*/
58 //#define FREETIME_RATIO 0.2
59 #define FREETIME_RATIO 0.15
61 #define SECTOR_HEIGHTMAP_SPLIT 2
63 #define PLAYER_INVENTORY_SIZE (8*4)
65 #define SIGN_TEXT_MAX_LENGTH 50
67 #define ACTIVE_OBJECT_D_BLOCKS 2
69 #define CATCH_UNJANDLED_EXCEPTIONS 1