forked from m-byte918/AgarOSS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSettings.cpp
More file actions
117 lines (105 loc) · 3.29 KB
/
Settings.cpp
File metadata and controls
117 lines (105 loc) · 3.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#include "Modules/Utils.hpp"
#include "Modules/Logger.hpp"
json config = {
{ "logger", {
{ "maxSeverity", 5 },
{ "maxFileSeverity", 5 },
{ "printTextColor", Logger::Color::White },
{ "backgroundColor", Logger::Color::Black },
}},
{ "server", {
{ "host", "127.0.0.1" },
{ "port", 8080 },
{ "name", "AgarOSS" },
{ "maxConnections", 500 },
{ "maxSupportedProtocol", 20 },
{ "minSupportedProtocol", 1 }
}},
{ "game", {
{ "mode", 0 },
{ "timeStep", 40 },
{ "mapWidth", 14142.135623730952 },
{ "mapHeight", 14142.135623730952 },
{ "quadTreeLeafCapacity", 64 },
{ "quadTreeMaxDepth", 32 }
}},
{ "player", {
{ "maxNameLength", 15 },
{ "maxCells", 16 },
{ "maxFreeroamScale", 0.4f },
{ "maxFreeroamSpeed", 32 },
{ "viewBoxWidth", 1920 },
{ "viewBoxHeight", 1080 },
{ "baseRemergeTime", 30 },
{ "cellRemoveTime", 0 },
{ "chanceToSpawnFromEjected", 50 },
// 16 frames @30fps = 0.60 seconds
// 0.60 / 0.040 = 15 ticks
{ "collisionIgnoreTime", 12 }
}},
// to get radius from mass, use toRadius(mass)
{ "entity", {
{ "decelerationPerTick", 9.5 },
{ "minAcceleration", 0.95 },
{ "minEatOverlap", 0.4 },
{ "minEatSizeMult", 1.15 },
}},
{ "playerCell", {
{ "baseRadius", 32 },
{ "maxMass", 22500 },
{ "minMassToSplit", 36 },
{ "minRadiusToEject", 59.16079783 },
{ "minVirusSplitMass", 19.36 }, // size 44
{ "ejectAngleVariation", 0.3 },
{ "radiusDecayRate", 0.998 },
{ "initialAcceleration", 780 },
{ "isSpiked", false },
{ "isAgitated", false },
{ "canEat", playercells | mothercells | ejected | viruses | food },
{ "avoidSpawningOn", playercells | viruses | mothercells },
{ "speedMultiplier", 1 }
}},
{ "food", {
{ "baseRadius", 10 },
{ "maxRadius", 20 },
{ "startAmount", 3000 },
{ "maxAmount", 6000 },
{ "canGrow", true },
{ "isSpiked", false },
{ "isAgitated", false },
{ "canEat", nothing },
{ "avoidSpawningOn", ejected }
}},
{ "virus", {
{ "baseRadius", 100 },
{ "maxRadius", 141.421356237 },
{ "startAmount", 52 },
{ "maxAmount", 78 },
{ "initialAcceleration", 780 },
{ "isSpiked", true },
{ "isAgitated", false },
{ "canEat", ejected },
{ "avoidSpawningOn", playercells | ejected | mothercells },
{ "color", { 0x33, 0xff, 0x33 }}
}},
{ "motherCell", {
{ "baseRadius", 149 },
{ "maxRadius", 65535 },
{ "startAmount", 25 },
{ "maxAmount", 25 },
{ "isSpiked", true },
{ "isAgitated", false },
{ "canEat", playercells | ejected | viruses },
{ "avoidSpawningOn", playercells | ejected | mothercells | viruses },
{ "color", { 0xce, 0x63, 0x63 }}
}},
{ "ejected", {
{ "baseRadius", 42.4264 },
{ "maxRadius", 42.4264 },
{ "efficiency", 80 },
{ "initialAcceleration", 780 },
{ "isSpiked", false },
{ "isAgitated", false },
{ "canEat", nothing }
}}
};