diff --git a/README.md b/README.md index 6014e1f..049c379 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ entities: {x,y,z}_offset = double // if all is 0.0, the solid will rotate according to its center of mass, this shifts that center dps = int[>0] - -> 3 (shooting, maybe moving explosive) + -> 3 (shooting (towards player), maybe moving explosive) [.. proj_speed, shoot_speed, shot_freq, shot_ttl] with {all} = double[>= 0.0] @@ -120,4 +120,9 @@ entities: [.. freq] with freq = int[0 - 15] + -> 15 (gun) + [.. vx, vy, vz, ax, ay, az, cooldown, phase, ttl, dmg, psize_x, psize_y, psize_z] with + all\{dmg} = double (cooldown > 0.0 and ttl > 0.0 and psize_{x,y,z} > 0.0) + dmg = int (>0) + ``` \ No newline at end of file diff --git a/bin/back b/bin/back index 368b31a..15ddbba 100755 Binary files a/bin/back and b/bin/back differ diff --git a/levels/level_01/room_1 b/levels/level_01/room_1 index 95dbf4d..f1750b8 100644 --- a/levels/level_01/room_1 +++ b/levels/level_01/room_1 @@ -15,10 +15,10 @@ Entities : [-2.0, 16.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 2, 0, 0] [ 1.0, 16.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 2, 0, 0] [-0.5, 8.0, -0.5, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255 128, 2, 0, 0] -[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 0.0, 0.0, 13.7, 0.0, 0.0, 12.0] -[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 0.0, 0.0, 13.7, 0.0, 0.0, 12.5] -[-13.0, 7.5, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 7.5, 0.0, 0.0, 10.0, 0.0] -[ 11.0, 7.5, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 7.5, 0.0, 0.0, 10.0, 0.0] +[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 0.0, 0.0, 13.7, 0.0, 0.0, 7.0] +[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 0.0, 0.0, 13.7, 0.0, 0.0, 7.5] +[-13.0, 7.5, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 7.5, 0.0, 0.0, 5.0, 0.0] +[ 11.0, 7.5, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 7.5, 0.0, 0.0, 5.0, 0.0] Weight : 50 diff --git a/levels/level_01/room_2 b/levels/level_01/room_2 index 407335d..23cc4b0 100644 --- a/levels/level_01/room_2 +++ b/levels/level_01/room_2 @@ -15,10 +15,10 @@ Entities : [-2.0, 16.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 2, 0, 0] [ 1.0, 16.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 2, 0, 0] [-0.5, 8.0, -0.5, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255 128, 2, 0, 0] -[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 13.7, 0.0, 0.0, 12.0, 0.0, 0.0] -[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 13.7, 0.0, 0.0, 12.5, 0.0, 0.0] -[-2.0, 7.5, -13.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 7.5, 0.0, 0.0, 10.0, 0.0] -[-2.0, 7.5, 11.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 7.5, 0.0, 0.0, 10.0, 0.0] +[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 13.7, 0.0, 0.0, 7.0, 0.0, 0.0] +[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 13.7, 0.0, 0.0, 7.5, 0.0, 0.0] +[-2.0, 7.5, -13.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 7.5, 0.0, 0.0, 5.0, 0.0] +[-2.0, 7.5, 11.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 7.5, 0.0, 0.0, 5.0, 0.0] Weight : 50 diff --git a/levels/level_01/room_3 b/levels/level_01/room_3 index c9c9f91..b0bd366 100644 --- a/levels/level_01/room_3 +++ b/levels/level_01/room_3 @@ -15,10 +15,10 @@ Entities : [-2.0, 16.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 2, 0, 0] [ 1.0, 16.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 2, 0, 0] [-0.5, 8.0, -0.5, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255 128, 2, 0, 0] -[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 0.0, 0.0, 13.7, 1, 1, 0] -[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 0.0, 0.0, 13.7, 1, 1, 180] -[-13.0, 7.5, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 0.0, 7.5, 0.0, 4, 3, 90] -[ 11.0, 7.5, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 0.0, 7.5, 0.0, 4, 3, 270] +[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 0.0, 0.0, 13.7, 4, 7, 0] +[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 0.0, 0.0, 13.7, 4, 7, 180] +[-13.0, 7.5, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 0.0, 7.5, 0.0, 2, 3, 90] +[ 11.0, 7.5, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 0.0, 7.5, 0.0, 2, 3, 270] Weight : 50 diff --git a/levels/level_01/room_4 b/levels/level_01/room_4 index ab186a6..44441af 100644 --- a/levels/level_01/room_4 +++ b/levels/level_01/room_4 @@ -15,10 +15,10 @@ Entities : [-2.0, 16.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 2, 0, 0] [ 1.0, 16.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 128, 2, 0, 0] [-0.5, 8.0, -0.5, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255 128, 2, 0, 0] -[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 13.7, 0.0, 0.0, 1, 1, 0] -[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 13.7, 0.0, 0.0, 1, 1, 180] -[-2.0, 7.5, -13.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 0.0, 7.5, 0.0, 4, 3, 90] -[-2.0, 7.5, 11.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 0.0, 7.5, 0.0, 4, 3, 270] +[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 13.7, 0.0, 0.0, 4, 7, 0] +[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 13.7, 0.0, 0.0, 4, 7, 180] +[-2.0, 7.5, -13.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 0.0, 7.5, 0.0, 2, 3, 90] +[-2.0, 7.5, 11.0, 4.0, 1.0, 4.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 0.0, 7.5, 0.0, 2, 3, 270] Weight : 50 diff --git a/levels/level_01/room_5 b/levels/level_01/room_5 index 902bf44..438dd9f 100644 --- a/levels/level_01/room_5 +++ b/levels/level_01/room_5 @@ -9,10 +9,10 @@ Blocks : [-1.0, 15.0, 15.0, 2.0, 1.0, 1.0, 0.0, 0.0, 192, 192, 192] Entities : -[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 0.0, 0.0, 13.7, 0.0, 0.0, 6.0] -[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 0.0, 0.0, 13.7, 0.0, 0.0, 8.0] -[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 13.7, 0.0, 0.0, 6.0, 0.0, 0.0] -[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 13.7, 0.0, 0.0, 8.0, 0.0, 0.0] +[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 0.0, 0.0, 13.7, 0.0, 0.0, 3.5] +[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 0.0, 0.0, 13.7, 0.0, 0.0, 4.0] +[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 13.7, 0.0, 0.0, 3.5, 0.0, 0.0] +[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 5, 13.7, 0.0, 0.0, 4.0, 0.0, 0.0] Weight : 75 diff --git a/levels/level_01/room_6 b/levels/level_01/room_6 index 5d09b11..554902f 100644 --- a/levels/level_01/room_6 +++ b/levels/level_01/room_6 @@ -9,14 +9,14 @@ Blocks : [-1.0, 15.0, 15.0, 2.0, 1.0, 1.0, 0.0, 0.0, 192, 192, 192] Entities : -[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 0.0, 0.0, 13.7, 1, 1, 0] -[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 0.0, 0.0, 13.7, 1, 1, 180] -[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 13.7, 0.0, 0.0, 1, 1, 0] -[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 13.7, 0.0, 0.0, 1, 1, 180] -[-3.0, 7.5, -3.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 0, 4, 0.0, 7.5, 0.0, 1, 2, 0] -[-3.0, 7.5, 2.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 0, 4, 0.0, 7.5, 0.0, 1, 2, 90] -[ 2.0, 7.5, -3.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 0, 4, 0.0, 7.5, 0.0, 1, 2, 180] -[ 2.0, 7.5, 2.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 0, 4, 0.0, 7.5, 0.0, 1, 2, 270] +[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 0.0, 0.0, 13.7, 4, 7, 0] +[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 0.0, 0.0, 13.7, 4, 7, 180] +[-2.0, 1.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 13.7, 0.0, 0.0, 4, 7, 0] +[-2.0, 15.0, -2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 128, 128, 128, 1, 0, 4, 13.7, 0.0, 0.0, 4, 7, 180] +[-3.0, 7.5, -3.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 0, 4, 0.0, 7.5, 0.0, 3, 5, 0] +[-3.0, 7.5, 2.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 0, 4, 0.0, 7.5, 0.0, 3, 5, 90] +[ 2.0, 7.5, -3.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 0, 4, 0.0, 7.5, 0.0, 3, 5, 180] +[ 2.0, 7.5, 2.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 0, 4, 0.0, 7.5, 0.0, 3, 5, 270] Weight : 75 diff --git a/levels/level_02/room_0 b/levels/level_02/room_0 index 70515b8..54f1d21 100644 --- a/levels/level_02/room_0 +++ b/levels/level_02/room_0 @@ -30,8 +30,13 @@ Blocks : [7.0, 44.0, 2.0, 4.0, 1.0, 4.0, 0.0, 0.0, 32, 192, 32] // cp4 Entities: -[-15.0, 4.0, -10.0, 4.0, 1.0, 5.0, 0.0, 0.0, 255, 255, 255, 1, 0, 2, 0.0, 42.0, 0.0, 0.0, 2.0, 1] -[-10.0, 4.0, -20.0, 5.0, 1.0, 5.0, 0.0, 0.0, 255, 255, 255, 1, 0, 2, 3.0, 0.0, 0.0, 0.0, 0.0, 0] +[-3.5, 17.5, 0.1, 1.0, 1.0, 1.0, 0.0, 0.2, 255, 255, 255, 1, 0, 15, 0.0, -0.6, -3.0, 0.0, -4.0, -20.0, 0.5, 0.0, 1.75, 25, 0.3, 0.3, 0.6] // 1 - canons +[-3.5, 15.5, 0.5, 1.0, 1.0, 1.0, 0.0, 0.2, 255, 255, 255, 1, 0, 15, 0.0, -0.6, -3.0, 0.0, -4.0, -20.0, 0.5, 0.25, 1.75, 25, 0.3, 0.3, 0.6] + +[-29.0, 31.0, 18.5, 1.0, 1.0, 1.0, 0.71, 0.0,255,255,255, 1, 0, 15, 0.0, 0.0, 0.0, 0.0, -25.0, 0.0, 1.2, 0.0, 1.0, 50, 0.2, 0.8, 0.2] +[-27.5, 31.0, 18.5, 1.0, 1.0, 1.0, 0.71, 0.0,255,255,255, 1, 0, 15, 0.0, 0.0, 0.0, 0.0, -25.0, 0.0, 1.2, 0.1, 1.0, 50, 0.2, 0.8, 0.2] +[-26.0, 31.0, 18.5, 1.0, 1.0, 1.0, 0.71, 0.0,255,255,255, 1, 0, 15, 0.0, 0.0, 0.0, 0.0, -25.0, 0.0, 1.2, 0.2, 1.0, 50, 0.2, 0.8, 0.2] +[-24.5, 31.0, 18.5, 1.0, 1.0, 1.0, 0.71, 0.0,255,255,255, 1, 0, 15, 0.0, 0.0, 0.0, 0.0, -25.0, 0.0, 1.2, 0.3, 1.0, 50, 0.2, 0.8, 0.2] // 2 - canons [-5.0, 3.0, 5.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 10, 0.98, 1.0] [-5.0, 6.0, 5.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 10, 0.98, 1.0] @@ -74,45 +79,45 @@ Entities: [-4.0, 10.0, -2.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 0.4, 0.8, 1] -[ -4.0, 11.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 0.0, 5.0, 0.0, 0.0, 6.0] // section 2 (lines) -[ 1.0, 11.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 5.0, 0.0, 0.0, -8.0, 0.0, 0.0] -[ 8.0, 16.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 5.0, 0.0, 0.0, 10.0, 0.0] -[ -1.0, 21.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 7.0, 0.0, 0.0, 9.0, 0.0, 0.0] -[ -4.0, 21.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 0.0, 5.0, 0.0, 0.0, -7.0] +[ -4.0, 11.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 0.0, 5.0, 0.0, 0.0, 3.0] // section 2 (lines platforms) +[ 1.0, 11.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 5.0, 0.0, 0.0, -4.0, 0.0, 0.0] +[ 8.0, 16.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 5.0, 0.0, 0.0, 5.0, 0.0] +[ -1.0, 21.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 7.0, 0.0, 0.0, 5.0, 0.0, 0.0] +[ -4.0, 21.0, 7.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 5, 0.0, 0.0, 5.0, 0.0, 0.0, -4.0] -[-14.0, 21.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 5.0, 0.0, 4.0, 3, 4, 0] // button part -[-18.0, 22.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 5.0, 0.0, -4.0, 3, 4, 90] +[-14.0, 21.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 5.0, 0.0, 4.0, 3, 7, 0] // button part +[-18.0, 22.0, 14.0, 2.0, 1.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 5.0, 0.0, -4.0, 3, 7, 90] [ -4.0, 20.0,-14.0, 2.0, 2.0, 14.0, 0.0, 0.0, 192, 192, 192, 1, 0, 12, 1, 0] [-33.0, 24.0, 18.0, 2.0, 2.0, 2.0, 0.71, 0.0, 92, 92, 92, 1, 0, 11, 1, 10.0] -[-5.0, 20.0, -18.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 0, {1, 1}] // 3 - platforms -[-5.0, 20.0, -20.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 30, {1, 1}] -[-5.0, 20.0, -22.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 60, {1, 1}] -[-5.0, 20.0, -24.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 90, {1, 1}] -[-5.0, 20.0, -26.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 120, {1, 1}] -[-5.0, 20.0, -28.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 150, {1, 1}] -[-5.0, 20.0, -30.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 180, {1, 1}] -[-5.0, 20.0, -32.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 210, {1, 1}] -[-5.0, 20.0, -34.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 240, {1, 1}] -[-5.0, 20.0, -36.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 270, {1, 1}] -[-5.0, 20.0, -38.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 300, {1, 1}] -[-5.0, 20.0, -40.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 330, {1, 1}] -[-5.0, 20.0, -42.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 0, {1, 1}] +[-5.0, 20.0, -18.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 0, {1, 1}] // 3 - platforms +[-5.0, 20.0, -20.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 30, {1, 1}] +[-5.0, 20.0, -22.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 60, {1, 1}] +[-5.0, 20.0, -24.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 90, {1, 1}] +[-5.0, 20.0, -26.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 120, {1, 1}] +[-5.0, 20.0, -28.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 150, {1, 1}] +[-5.0, 20.0, -30.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 180, {1, 1}] +[-5.0, 20.0, -32.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 210, {1, 1}] +[-5.0, 20.0, -34.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 240, {1, 1}] +[-5.0, 20.0, -36.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 270, {1, 1}] +[-5.0, 20.0, -38.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 300, {1, 1}] +[-5.0, 20.0, -40.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 330, {1, 1}] +[-5.0, 20.0, -42.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 0, {1, 1}] -[-5.0, 20.0, -18.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 180, {1, 1}] -[-5.0, 20.0, -20.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 210, {1, 1}] -[-5.0, 20.0, -22.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 240, {1, 1}] -[-5.0, 20.0, -24.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 270, {1, 1}] -[-5.0, 20.0, -26.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 300, {1, 1}] -[-5.0, 20.0, -28.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 330, {1, 1}] -[-5.0, 20.0, -30.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 0, {1, 1}] -[-5.0, 20.0, -32.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 30, {1, 1}] -[-5.0, 20.0, -34.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 60, {1, 1}] -[-5.0, 20.0, -36.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 90, {1, 1}] -[-5.0, 20.0, -38.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 120, {1, 1}] -[-5.0, 20.0, -40.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 150, {1, 1}] -[-5.0, 20.0, -42.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 2, 180, {1, 1}] +[-5.0, 20.0, -18.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 180, {1, 1}] +[-5.0, 20.0, -20.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 210, {1, 1}] +[-5.0, 20.0, -22.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 240, {1, 1}] +[-5.0, 20.0, -24.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 270, {1, 1}] +[-5.0, 20.0, -26.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 300, {1, 1}] +[-5.0, 20.0, -28.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 330, {1, 1}] +[-5.0, 20.0, -30.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 0, {1, 1}] +[-5.0, 20.0, -32.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 30, {1, 1}] +[-5.0, 20.0, -34.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 60, {1, 1}] +[-5.0, 20.0, -36.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 90, {1, 1}] +[-5.0, 20.0, -38.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 120, {1, 1}] +[-5.0, 20.0, -40.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 150, {1, 1}] +[-5.0, 20.0, -42.0, 4.0, 2.0, 2.0, 0.0, 0.0, 192, 192, 192, 1, 0, 4, 10.0, 0.0, 0.0, 3, 4, 180, {1, 1}] [ -5.0, 23.0, -45.0, 4.0, 4.0, 4.0, 0.0, 0.0, 115, 24, 24, 1, 0, 11, 1, 10.0] // platform halt button diff --git a/obj/entities.o b/obj/entities.o index bb29b09..b500cc3 100644 Binary files a/obj/entities.o and b/obj/entities.o differ diff --git a/obj/generation.o b/obj/generation.o index 004f61f..190e2c3 100644 Binary files a/obj/generation.o and b/obj/generation.o differ diff --git a/obj/main.o b/obj/main.o index 08b32c0..fa655d6 100644 Binary files a/obj/main.o and b/obj/main.o differ diff --git a/obj/move.o b/obj/move.o index 3b7b2b0..e8aed8a 100644 Binary files a/obj/move.o and b/obj/move.o differ diff --git a/src/entities.c b/src/entities.c index e914526..6f4a0dc 100644 --- a/src/entities.c +++ b/src/entities.c @@ -95,8 +95,8 @@ void speen(double x, double y, double z, double w, double h, double d, double hz // metad1 = main proj speed // metad2 = shot proj speed -// metad2 = shot proj freq -// metad2 = shot proj time to live +// metad3 = shot proj freq +// metad4 = shot proj time to live void speen2(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { ret->hz_angle += ((double)dtime)*ent->metad3; if((int)(5.0*ret->hz_angle) != (int)(5.0*(ret->hz_angle - ((double)dtime)*22.5))) { @@ -130,15 +130,41 @@ void speen2(double x, double y, double z, double w, double h, double d, double h } } + +// metad{1,2,3} = velocities +// metad{4,5,6} = accelerations +// metad7 = cooldown +// metad8 = ttl +// metad9 = remaining +// metai{1,2,3} = 1000*proj_size_{x,y,z} +// metai4 = dmg +void gunning(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { + ent->metad9 -= (double)dtime; + if(ent->metad9 <= 0.0) { + ent->metad9 = ent->metad7; + double psizex = (double)(ent->metai1)/1000.0; + double psizey = (double)(ent->metai2)/1000.0; + double psizez = (double)(ent->metai3)/1000.0; + appendProj( + x+w/2.0-psizex/2.0, y+h/2.0-psizey/2.0, z+d/2.0-psizez/2.0, + psizex, psizey, psizez, + ent->metad1, ent->metad2, ent->metad3, + ent->metad4, ent->metad5, ent->metad6, + 255, 128, 128, + ent->metai4, ent->metad8 + ); + } +} + void speen3(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { ret->vt_angle += ((double)dtime)*2.5; } // metad{1,2,3} = og pos // metad{4,5,6} = amplitudes -// metai{1} = frequency multiplier -// metai{2} = frequency divider -// metai{3} = phase +// metai1 = frequency multiplier +// metai2 = frequency divider +// metai3 = phase void moving_xyz(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { bool canMove = (ent->metai5 == -1) || xor(buttonSwitch[ent->metai5], (bool)ent->metai4); if(canMove) { @@ -152,9 +178,9 @@ void moving_xyz(double x, double y, double z, double w, double h, double d, doub // metad{1,2,3} = og pos // metad{4,5,6} = speed // metad{7,8,9} = max_delta -// metai{1} = x_side (+/- 1) -// metai{2} = y_side (+/- 1) -// metai{3} = z_side (+/- 1) +// metai1 = x_side (+/- 1) +// metai2 = y_side (+/- 1) +// metai3 = z_side (+/- 1) void moving_xyz_line(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { bool canMove = (ent->metai5 == -1) || xor(buttonSwitch[ent->metai5], (bool)ent->metai4); if(canMove) { diff --git a/src/entities.h b/src/entities.h index b397bcd..f8b7855 100644 --- a/src/entities.h +++ b/src/entities.h @@ -12,6 +12,7 @@ void update_entities(float dtime, room* rtd); void update_nearby_entities(float dtime, int render_distance); void speen(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); +void gunning(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); void speen2(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); void speen3(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); void moving_xyz(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret); diff --git a/src/generation.c b/src/generation.c index 3116fca..9b81a7c 100644 --- a/src/generation.c +++ b/src/generation.c @@ -161,6 +161,14 @@ void init_ent_generator(int n) { hashtbl_entities[14].updatePos = &movCrateButton_postStep; hashtbl_entities[14].onHit = NULL; hashtbl_entities[14].onDeath = NULL; + + hashtbl_entities[15].id = 15; + hashtbl_entities[15].tex = 14; + hashtbl_entities[15].tex2 = 14; + hashtbl_entities[15].name = "gun"; + hashtbl_entities[15].updatePos = &gunning; + hashtbl_entities[15].onHit = NULL; + hashtbl_entities[15].onDeath = NULL; } fct_entry* get_entry(int k0) { @@ -717,6 +725,35 @@ void parse_one_room(int id, char* filename) { int freq = read_int(ptr); pool[id].area->ents[k]->metai1 = freq; + } else if(entry->id == 15) { + // gun + double vx = read_float(ptr); + double vy = read_float(ptr); + double vz = read_float(ptr); + double ax = read_float(ptr); + double ay = read_float(ptr); + double az = read_float(ptr); + double cooldown = read_float(ptr); + double offset = read_float(ptr); + double timeToLive = read_float(ptr); + int dmg = read_int(ptr); + double psizex = read_float(ptr); + double psizey = read_float(ptr); + double psizez = read_float(ptr); + + pool[id].area->ents[k]->metad1 = vx; + pool[id].area->ents[k]->metad2 = vy; + pool[id].area->ents[k]->metad3 = vz; + pool[id].area->ents[k]->metad4 = ax; + pool[id].area->ents[k]->metad5 = ay; + pool[id].area->ents[k]->metad6 = az; + pool[id].area->ents[k]->metad7 = cooldown; + pool[id].area->ents[k]->metad8 = timeToLive; + pool[id].area->ents[k]->metad9 = offset; + pool[id].area->ents[k]->metai1 = (int)(psizex*1000.0); + pool[id].area->ents[k]->metai2 = (int)(psizey*1000.0); + pool[id].area->ents[k]->metai3 = (int)(psizez*1000.0); + pool[id].area->ents[k]->metai4 = dmg; } else { pool[id].area->ents[k]->metai3 = 0; } diff --git a/src/main.c b/src/main.c index 4db1a47..d1feffa 100644 --- a/src/main.c +++ b/src/main.c @@ -34,6 +34,8 @@ int gamemode; int creativeWarpTarget; +static double time_dilation = 1.0; + char* newRoomName; int newRoomCount; bool switchRoom; @@ -662,13 +664,12 @@ int main_alt() { // ---------------------------------------------------------------------------------------------------------------------------------------------- // fffff = shaderProgram; - int fps = 90; + int fps = 60; int interval = 1000000/fps; float interval_s = 1.0f/fps; double slp_time = 1.0/fps; float delta = 0.0f; - double deltad = 0.0; float real_T = 0.01f; @@ -728,19 +729,19 @@ int main_alt() { processInput(window, delta); if(!paused) { if(gamemode == 0) { - movePlayerG(delta); + movePlayerG(delta*time_dilation); } teleport_on_edge(); - update_nearby_entities(delta, 1); - updateProj(delta); - update_buttons(delta); + update_nearby_entities(delta*time_dilation, 1); + updateProj(delta*time_dilation); + update_buttons(delta*time_dilation); } else { gl_drawRectAlpha(shaderProgramR, -1.0f, -1.0f, 2.0f, 2.0f, 0, 0, 0, 128); gl_drawString(shaderProgramR, "game Paused", 0.0f, 0.1f, 0.08f, 128, 128, 255, 0.005f, 0); gl_drawString(shaderProgramR, "press u to resume", 0.0f, -0.1f, 0.08f, 128, 128, 255, 0.005f, 0); } } - + if(!isinmenu && mathSignal) { mathSigCD -= 1; if(mathSigCD == 0) { @@ -749,23 +750,23 @@ int main_alt() { glfwSwapBuffers(window); glfwPollEvents(); the_actual_main_math_function(window); + gettimeofday(&ogn, NULL); } } gettimeofday(&fnn, NULL); calc_T = (float)((fnn.tv_sec-ogn.tv_sec + (fnn.tv_usec-ogn.tv_usec)/1000000.0f)); usleep(max(0, interval-(int)(1000000*calc_T))); - sim_time += interval_s + maxd(0.0, (double)(interval_s-(calc_T))); + sim_time += interval_s + maxd(0.0, (double)(-interval_s+(calc_T))); - dmgCD = maxf(dmgCD - delta, 0.0f); + dmgCD = maxf(dmgCD - delta*time_dilation, 0.0f); if(lastDmg != player_hp) { if(lastDmg > player_hp) { dmgCD = 0.5f; } lastDmg = player_hp; } - delta = (float)(interval_s + maxf(0.0f, interval_s-(calc_T))); - deltad = (double)delta; + delta = (float)(interval_s + maxf(0.0f, -interval_s+(calc_T))); if(count%(fps/10)==0) { real_T = (float)((fnn.tv_sec-ogn.tv_sec + (fnn.tv_usec-ogn.tv_usec)/1000000.0f)); } diff --git a/src/move.c b/src/move.c index e5ac3cb..70a82d1 100644 --- a/src/move.c +++ b/src/move.c @@ -23,8 +23,8 @@ double sensitivity = 0.06; double fov = 90.0; double creative_speed = 0.5; -double speed = 6.0; -double vtmult = 2.25; +double speed = 5.0; +double vtmult = 2.7; double min_dist = 0.4; double friction = 0.3; double gravity_factor = 26.0; diff --git a/templates/room_0 b/templates/room_0 index c249570..ebb1062 100644 --- a/templates/room_0 +++ b/templates/room_0 @@ -13,7 +13,7 @@ Teleporters : [9.0, 1.0, 4.0, 1.0, 4.0, 2.0, 0.0, 0.0, 0, 0, 255; 0, 1] Entities : -[0.0, 11.5, 0.0, 5.0, 1.0, 1.0, 1.57, 0.0, 255, 255, 255, 1, 0, 2, 0.0, 3.0, 0.0, 3.0, 0.0, 100] +[10.0, 11.5, 0.0, 5.0, 1.0, 1.0, 1.57, 0.0, 255, 255, 255, 1, 0, 2, 0.0, 3.0, 0.0, 3.0, 0.0, 100] [1.0, -6.0, 3.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 32, 1] [1.0, -3.0, 3.0, 1.0, 1.0, 1.0, 0.0, 0.0, 255, 255, 255, 1, 32, 3, 0.0, 4.0, 1.0, 1.0] [-1.0, 13.0, -1.0, 2.0, 2.0, 2.0, 0.0, 0.0, 255, 255, 255, 1, 0, 9, 1.5, 1.5, 0]