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 FOV_ANGLE (PI/2.5)
28 // The absolute working limit is (2^15 - viewing_range).
29 #define MAP_GENERATION_LIMIT (31000)
31 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 7
32 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 3
33 #define MAX_SIMULTANEOUS_BLOCK_SENDS 2
34 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 1
36 #define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
37 #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 1
39 // Viewing range stuff
41 #define FPS_DEFAULT_WANTED 30
42 #define FPS_DEFAULT_MAX 60
44 #define HEIGHTMAP_RANGE_NODES 300
46 //#define FREETIME_RATIO 0.2
47 #define FREETIME_RATIO 0.15
49 // Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
50 #define SECTOR_HEIGHTMAP_SPLIT 2
52 #define PLAYER_INVENTORY_SIZE (8*4)
54 #define SIGN_TEXT_MAX_LENGTH 50
56 // The distance of how far objects will be sent to client
57 //#define ACTIVE_OBJECT_D_BLOCKS 2
59 // Wether to catch all std::exceptions
60 #define CATCH_UNJANDLED_EXCEPTIONS 1
63 Collecting active blocks is stopped after object data
66 #define MAX_OBJECTDATA_SIZE 450