forked from Voidious/BerryBots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bbconst.h
102 lines (91 loc) · 3.39 KB
/
bbconst.h
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
/*
Copyright (C) 2012-2015 - Voidious
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef BBCONST_H
#define BBCONST_H
#define SAMPLES_VERSION "1.3.3"
#define SHIPS_SUBDIR "bots"
#define STAGES_SUBDIR "stages"
#define CACHE_SUBDIR "cache"
#define TMP_SUBDIR ".tmp"
#define REPLAYS_SUBDIR "replays"
#define ZIP_EXTENSION ".tar.gz"
#define LUA_EXTENSION ".lua"
#define STAGE_METAFILE "stage.filename"
#define SHIP_METAFILE "bot.filename"
#define MAX_FILENAME_LENGTH 1024
#define DEFAULT_STAGE_WIDTH 800
#define DEFAULT_STAGE_HEIGHT 600
#define STAGE_MARGIN 25
#define SHIP_RADIUS 8
#define SHIP_SIZE SHIP_RADIUS * 2
#define LASER_SPEED 25 // Doesn't has to be same as SPEED_OF_LIGHT, but has some logic to it
#define LASER_HEAT 5
#define LASER_DAMAGE 4
#define TORPEDO_SPEED 12
#define TORPEDO_HEAT 40
#define TORPEDO_BLAST_RADIUS 100
#define TORPEDO_BLAST_FORCE 30
#define TORPEDO_BLAST_DAMAGE 30
#define DEFAULT_ENERGY 100
#define WALL_BOUNCE 0.5
#define MAX_THRUSTER_FORCE 1.0
#define COLLISION_FRAME 4
#define MAX_WALLS 1024
#define MAX_STARTS 1024
#define MAX_ZONES 1024
#define MAX_LASERS 8192
#define MAX_TORPEDOS 2048
#define MAX_STAGE_SHIPS 1024
#define MAX_STAGE_TEXTS 4096
#define MAX_USER_RECTANGLES 4096
#define MAX_USER_LINES 4096
#define MAX_USER_CIRCLES 4096
#define MAX_USER_TEXTS 4096
#define MAX_NAME_LENGTH 128
#define CPU_TIME_TICKS 1000
#define MAX_SCORE_STATS 1000
// @ohaas: Some new constants; for new physics mainly.
#define SHIP_SHIP_BOUNCE 0.5
#define WALL_DMG_SCALE 0.02
#define SHIPSHIP_DMG_SCALE 0.02
#define SPEED_OF_LIGHT 50. // When relativistic kinematics, this is max speed of ships
#define DEFAULT_EPS 1.e-6
#define TORPEDO_AMMO 10
#define TORPEDO_POWER_USAGE 10.
#define LASER_POWER_USAGE 20.
#define THRUSTER_POWER_USAGE 5.
#define MAX_WALLCOLLS 1024
#define POWER_REGEN 10.
#define DEFAULT_POWER 100.
#define SHIELDS_SCALE 0.1
#define SHIELDS_DECAY 0.6
#define MAX_SHIPSHIPCOLLS 1024
#if defined(_WIN32)
#define BB_DIRSEP "\\"
#define BB_DIRSEP_CHR '\\'
#else
#define BB_DIRSEP "/"
#define BB_DIRSEP_CHR '/'
#endif
#if defined(__APPLE__) || defined(_WIN32)
#define DIRECTORY "folder"
#define DIRECTORIES "folders"
#else
#define DIRECTORY "directory"
#define DIRECTORIES "directories"
#endif
#endif