-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.bas
108 lines (60 loc) · 2.13 KB
/
settings.bas
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
'variables WIP
DIM SHARED bg_sky AS LONG
'game settings
CONST GAME_WIDTH = 1200
CONST GAME_HEIGHT = 800
CONST HALF_WIDTH = INT(GAME_WIDTH / 2)
CONST HALF_HEIGHT = INT(GAME_HEIGHT / 2)
CONST FPS = 60
CONST TILE = 100
CONST FPS_POSX = GAME_WIDTH - 65
CONST FPS_POSY = 5
'PENTA_HEIGHT = 5 * HEIGHT
'DOUBLE_HEIGHT = 2 * HEIGHT
'mini map
CONST MINIMAP_SCALE = 5
CONST MAPPOS_X = 0
CONST ROWS_SCALE = 8
CONST MAP_SCALE = 1 * MINIMAP_SCALE
CONST MAP_TILE = INT(TILE / MAP_SCALE)
CONST MAPPOS_Y = INT(GAME_HEIGHT - GAME_HEIGHT / MINIMAP_SCALE)
CONST MINIMAP_RESW = (GAME_WIDTH / MINIMAP_SCALE)
CONST MINIMAP_RESH = GAME_HEIGHT / MINIMAP_SCALE
'player settings
CONST player_posX = INT(HALF_WIDTH / 4)
CONST player_posY = INT(HALF_HEIGHT - 50)
CONST player_angle = 0
CONST player_speed = 3
'raycaster settings
DIM SHARED FOV AS SINGLE: FOV = _PI / 3
DIM SHARED HALF_FOV AS SINGLE: HALF_FOV = FOV / 2
DIM SHARED NUM_RAYS AS LONG: NUM_RAYS = 300
DIM SHARED MAX_DEPTH AS LONG: MAX_DEPTH = 800
DIM SHARED DELTA_ANGLE AS SINGLE: DELTA_ANGLE = FOV / NUM_RAYS
DIM SHARED DIST AS SINGLE: DIST = NUM_RAYS / (2 * TAN(HALF_FOV))
DIM SHARED PROJ_COEFF AS SINGLE: PROJ_COEFF = 3 * DIST * TILE
DIM SHARED SCALE AS LONG: SCALE = INT(GAME_WIDTH / NUM_RAYS)
'sprite settings
DIM SHARED DOUBLE_PI: DOUBLE_PI = _PI(2)
DIM SHARED CENTER_RAY AS SINGLE: CENTER_RAY = INT(NUM_RAYS / 2) - 1
CONST FAKE_RAYS = 100
'PRINT player_angle - HALF_FOV
'texture settings
CONST TEXTURE_WIDTH = 1200
CONST TEXTURE_HEIGHT = 1200
CONST TEXTURE_SCALE = INT(TEXTURE_WIDTH / TILE)
'colors
CONST WHITE = _RGB32(255, 255, 255)
CONST BLACK = _RGB32(255, 255, 255)
CONST RED = _RGB32(220, 0, 0)
CONST GREEN = _RGB32(0, 80, 0)
CONST BLUE = _RGB32(0, 0, 255)
CONST DARKGRAY = _RGB32(40, 40, 40)
CONST PURPLE = _RGB32(120, 0, 120)
CONST SKYBLUE = _RGB32(0, 186 255)
CONST YELLOW = _RGB32(220, 220, 0)
CONST SANDY = _RGB32(244, 164, 96)
CONST DARKBROWN = _RGB32(97, 61, 25)
CONST DARKORANGE = _RGB32(255, 140, 0)
CONST DARKBROWN = _RGB32(97, 61, 25)
CONST GRAY = _RGB32(127, 127, 127)