|
41 | 41 | "default": {}, |
42 | 42 | "pixelated": { |
43 | 43 | "MAG_FILTER": "GL_NEAREST" |
| 44 | + }, |
| 45 | + "ground_tiled": { |
| 46 | + "MIN_FILTER": "GL_LINEAR_MIPMAP_LINEAR", |
| 47 | + "MAG_FILTER": "GL_LINEAR", |
| 48 | + "WRAP_S": "GL_REPEAT", |
| 49 | + "WRAP_T": "GL_REPEAT", |
| 50 | + "MAX_ANISOTROPY": 16.0 |
44 | 51 | } |
45 | 52 | }, |
46 | 53 | "materials": { |
| 54 | + "ground": { |
| 55 | + "type": "textured", |
| 56 | + "shader": "textured", |
| 57 | + "pipelineState": { |
| 58 | + "faceCulling": { |
| 59 | + "enabled": false |
| 60 | + }, |
| 61 | + "depthTesting": { |
| 62 | + "enabled": true |
| 63 | + } |
| 64 | + }, |
| 65 | + "tint": [1.0, 1.0, 1.0, 1.0], |
| 66 | + "texture": "grass", |
| 67 | + "sampler": "ground_tiled", |
| 68 | + "uvScale": [96.0, 96.0] |
| 69 | + }, |
| 70 | + "drone": { |
| 71 | + "type": "tinted", |
| 72 | + "shader": "tinted", |
| 73 | + "pipelineState": { |
| 74 | + "faceCulling": { |
| 75 | + "enabled": false |
| 76 | + }, |
| 77 | + "depthTesting": { |
| 78 | + "enabled": true |
| 79 | + } |
| 80 | + }, |
| 81 | + "tint": [0.85, 0.9, 1.0, 1.0] |
| 82 | + }, |
| 83 | + "monster": { |
| 84 | + "type": "tinted", |
| 85 | + "shader": "tinted", |
| 86 | + "pipelineState": { |
| 87 | + "faceCulling": { |
| 88 | + "enabled": false |
| 89 | + }, |
| 90 | + "depthTesting": { |
| 91 | + "enabled": true |
| 92 | + } |
| 93 | + }, |
| 94 | + "tint": [1.0, 1.0, 1.0, 1.0] |
| 95 | + }, |
47 | 96 | "metal": { |
48 | 97 | "type": "tinted", |
49 | 98 | "shader": "tinted", |
|
55 | 104 | "enabled": true |
56 | 105 | } |
57 | 106 | }, |
58 | | - "tint": [0.45, 0.4, 0.5, 1] |
| 107 | + "tint": [0.45, 0.4, 0.5, 1.0] |
59 | 108 | }, |
60 | 109 | "glass": { |
61 | 110 | "type": "textured", |
|
75 | 124 | "depthMask": false |
76 | 125 | }, |
77 | 126 | "transparent": true, |
78 | | - "tint": [1, 1, 1, 1], |
| 127 | + "tint": [1.0, 1.0, 1.0, 1.0], |
79 | 128 | "texture": "glass", |
80 | 129 | "sampler": "pixelated" |
81 | 130 | }, |
|
90 | 139 | "enabled": true |
91 | 140 | } |
92 | 141 | }, |
93 | | - "tint": [1, 1, 1, 1], |
| 142 | + "tint": [1.0, 1.0, 1.0, 1.0], |
94 | 143 | "texture": "grass", |
95 | 144 | "sampler": "default" |
96 | 145 | }, |
|
105 | 154 | "enabled": true |
106 | 155 | } |
107 | 156 | }, |
108 | | - "tint": [1, 1, 1, 1], |
| 157 | + "tint": [1.0, 1.0, 1.0, 1.0], |
109 | 158 | "texture": "monkey", |
110 | 159 | "sampler": "default" |
111 | 160 | }, |
|
120 | 169 | "enabled": true |
121 | 170 | } |
122 | 171 | }, |
123 | | - "tint": [1, 1, 1, 1], |
| 172 | + "tint": [1.0, 1.0, 1.0, 1.0], |
124 | 173 | "texture": "moon", |
125 | 174 | "sampler": "default" |
126 | 175 | } |
127 | 176 | } |
128 | 177 | }, |
| 178 | + "game": { |
| 179 | + "enemySpawner": { |
| 180 | + "spawnPoints": [ |
| 181 | + [30.0, 0.0, 30.0], [-30.0, 0.0, 30.0], [30.0, 0.0, -30.0], [-30.0, 0.0, -30.0], |
| 182 | + [42.0, 0.0, 0.0], [-42.0, 0.0, 0.0], [0.0, 0.0, 42.0], [0.0, 0.0, -42.0] |
| 183 | + ], |
| 184 | + "spawnInterval": 2.0, |
| 185 | + "initialSpawnCount": 4, |
| 186 | + "maxAliveEnemies": 12, |
| 187 | + "enemies": [ |
| 188 | + { |
| 189 | + "name": "Monster", |
| 190 | + "mesh": "cube", |
| 191 | + "material": "monster", |
| 192 | + "rotation": [0.0, 0.0, 0.0], |
| 193 | + "scale": [0.65, 0.65, 0.65], |
| 194 | + "components": [ |
| 195 | + { |
| 196 | + "type": "Enemy", |
| 197 | + "enemyType": "Brute", |
| 198 | + "moveSpeed": 3.8, |
| 199 | + "turnSpeed": 5.5, |
| 200 | + "aggroRange": 120.0, |
| 201 | + "attackRange": 2.0, |
| 202 | + "attackDamage": 10.0, |
| 203 | + "attackCooldown": 1.2, |
| 204 | + "scoreValue": 100 |
| 205 | + }, |
| 206 | + { |
| 207 | + "type": "Health", |
| 208 | + "maxHealth": 60.0 |
| 209 | + }, |
| 210 | + { |
| 211 | + "type": "Collider", |
| 212 | + "layer": "enemy", |
| 213 | + "shape": "Capsule", |
| 214 | + "radius": 0.5, |
| 215 | + "height": 1.5 |
| 216 | + } |
| 217 | + ] |
| 218 | + }, |
| 219 | + { |
| 220 | + "name": "Drone", |
| 221 | + "mesh": "cube", |
| 222 | + "material": "drone", |
| 223 | + "rotation": [0.0, 0.0, 0.0], |
| 224 | + "scale": [1.2, 1.2, 1.2], |
| 225 | + "components": [ |
| 226 | + { |
| 227 | + "type": "Enemy", |
| 228 | + "enemyType": "Flyer", |
| 229 | + "moveSpeed": 3.4, |
| 230 | + "turnSpeed": 6.0, |
| 231 | + "aggroRange": 120.0, |
| 232 | + "attackRange": 12.0, |
| 233 | + "preferredDistance": 9.0, |
| 234 | + "attackDamage": 8.0, |
| 235 | + "attackCooldown": 2.0, |
| 236 | + "hoverFrequency": 2.3, |
| 237 | + "hoverAmplitude": 0.4, |
| 238 | + "baseHeight": 5.0, |
| 239 | + "scoreValue": 150 |
| 240 | + }, |
| 241 | + { |
| 242 | + "type": "Health", |
| 243 | + "maxHealth": 35.0 |
| 244 | + }, |
| 245 | + { |
| 246 | + "type": "Collider", |
| 247 | + "layer": "enemy", |
| 248 | + "radius": 0.8 |
| 249 | + } |
| 250 | + ] |
| 251 | + } |
| 252 | + ] |
| 253 | + } |
| 254 | + }, |
129 | 255 | "world": [ |
130 | 256 | { |
131 | | - "position": [0, 1.7, 0], |
| 257 | + "name": "Player Camera", |
| 258 | + "position": [0.0, 1.8, 14.0], |
132 | 259 | "components": [ |
133 | 260 | { |
134 | 261 | "type": "Camera", |
135 | 262 | "fovY": 60, |
136 | 263 | "near": 0.1, |
137 | | - "far": 500 |
| 264 | + "far": 500.0 |
138 | 265 | }, |
139 | 266 | { |
140 | 267 | "type": "Free Camera Controller", |
141 | | - "positionSensitivity": [5.0, 5.0, 5.0], |
142 | | - "speedupFactor": 3.0, |
| 268 | + "positionSensitivity": [8.0, 0.0, 8.0], |
| 269 | + "rotationSensitivity": 0.008, |
| 270 | + "speedupFactor": 2.5, |
143 | 271 | "groundLevel": 0.0, |
144 | | - "playerHeight": 1.7 |
| 272 | + "playerHeight": 1.8 |
145 | 273 | }, |
146 | 274 | { |
147 | 275 | "type": "Player" |
148 | | - } |
149 | | - ], |
150 | | - "children": [ |
| 276 | + }, |
151 | 277 | { |
152 | | - "position": [1, -1, -1], |
153 | | - "rotation": [45, 45, 0], |
154 | | - "scale": [0.1, 0.1, 1.0], |
155 | | - "components": [ |
156 | | - { |
157 | | - "type": "Mesh Renderer", |
158 | | - "mesh": "cube", |
159 | | - "material": "metal" |
160 | | - } |
161 | | - ] |
| 278 | + "type": "Health", |
| 279 | + "maxHealth": 100.0 |
| 280 | + }, |
| 281 | + { |
| 282 | + "type": "Collider", |
| 283 | + "layer": "player", |
| 284 | + "radius": 0.45, |
| 285 | + "height": 1.8 |
162 | 286 | } |
163 | 287 | ] |
164 | 288 | }, |
165 | | - |
166 | | - // Ground plane |
167 | 289 | { |
168 | | - "position": [0, 0, 0], |
169 | | - "rotation": [-90, 0, 0], |
170 | | - "scale": [100, 100, 1], |
| 290 | + "name": "Ground", |
| 291 | + "position": [0.0, 0.0, 0.0], |
| 292 | + "rotation": [-90.0, 0.0, 0.0], |
| 293 | + "scale": [120.0, 120.0, 1.0], |
171 | 294 | "components": [ |
172 | 295 | { |
173 | 296 | "type": "Mesh Renderer", |
174 | 297 | "mesh": "plane", |
175 | | - "material": "grass" |
| 298 | + "material": "ground" |
176 | 299 | } |
177 | 300 | ] |
178 | 301 | } |
|
0 commit comments