block send priority queue
[oweals/minetest.git] / src / constants.h
1 /*
2 (c) 2010 Perttu Ahola <celeron55@gmail.com>
3 */
4
5 #ifndef CONSTANTS_HEADER
6 #define CONSTANTS_HEADER
7
8 #define DEBUGFILE "debug.txt"
9
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
13
14 #define CONNECTION_TIMEOUT 30
15
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
20
21 #define PI 3.14159
22
23 #define SERVERMAP_DELETE_UNUSED_SECTORS_TIMEOUT (60*10)
24 #define SERVER_MAP_SAVE_INTERVAL (60)
25
26 #define FOV_ANGLE (PI/2.5)
27
28 // The absolute working limit is (2^15 - viewing_range).
29 #define MAP_GENERATION_LIMIT (31000)
30
31 #define MAX_SIMULTANEOUS_BLOCK_SENDS 2
32
33 #define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
34 #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 1
35
36 #define MAX_SIMULTANEOUS_BLOCK_SENDS_SERVER_TOTAL 4
37
38 // Viewing range stuff
39
40 #define FPS_DEFAULT_WANTED 30
41 #define FPS_DEFAULT_MAX 60
42
43 #define HEIGHTMAP_RANGE_NODES 300
44
45 //#define FREETIME_RATIO 0.2
46 #define FREETIME_RATIO 0.15
47
48 // Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
49 #define SECTOR_HEIGHTMAP_SPLIT 2
50
51 #define PLAYER_INVENTORY_SIZE (8*4)
52
53 #define SIGN_TEXT_MAX_LENGTH 50
54
55 // The distance of how far objects will be sent to client
56 //#define ACTIVE_OBJECT_D_BLOCKS 2
57
58 // Wether to catch all std::exceptions
59 #define CATCH_UNJANDLED_EXCEPTIONS 1
60
61 /*
62         Collecting active blocks is stopped after object data
63         size reaches this
64 */
65 #define MAX_OBJECTDATA_SIZE 450
66
67 #endif
68