diff --git a/Default_env.tres b/Default_env.tres index c8c04ac1..8e628905 100644 --- a/Default_env.tres +++ b/Default_env.tres @@ -18,3 +18,4 @@ background_color = Color( 0.0156863, 0.0156863, 0.0745098, 1 ) fog_color = Color( 0, 0, 0, 1 ) fog_sun_color = Color( 0, 0, 0, 1 ) tonemap_mode = 3 +glow_bicubic_upscale = true diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn index a2c43e69..8b447988 100644 --- a/Scenes/Main.tscn +++ b/Scenes/Main.tscn @@ -28,9 +28,9 @@ __meta__ = { [node name="View" type="Viewport" parent="."] size = Vector2( 1024, 600 ) handle_input_locally = false +msaa = 1 render_target_update_mode = 3 script = ExtResource( 13 ) -scale_factor = 1.0 [node name="Main" type="Spatial" parent="View"] script = ExtResource( 1 ) @@ -72,5 +72,3 @@ accel_ticks_max = 100 [node name="Camera_rig" parent="View/Main/Player_ship" instance=ExtResource( 2 )] script = ExtResource( 7 ) - -[connection signal="size_changed" from="View" to="View" method="_on_View_size_changed"] diff --git a/Scenes/Systems/System_1.tscn b/Scenes/Systems/System_1.tscn index 3fc3cf93..8fb1c582 100644 --- a/Scenes/Systems/System_1.tscn +++ b/Scenes/Systems/System_1.tscn @@ -52,10 +52,7 @@ shader_param/roughness = 0.5 shader_param/rim = 0.0 shader_param/rim_tint = 0.0 -[sub_resource type="ConvexPolygonShape" id=4] -points = PoolVector3Array( -0.70505, 0, 0.70505, -0.579587, 0.579587, 0.579587, -0.847785, 0.357834, 0.357834, -0.999999, 0, 0, -0.70505, 0.70505, 0, -0.847785, 0.357834, -0.357833, -0.70505, -0.70505, 0, -0.847785, -0.357834, -0.357834, -0.579587, -0.579587, -0.579587, -0.70505, 0, -0.70505, -0.357834, -0.357834, -0.847785, -0.579587, 0.579587, -0.579587, -0.357833, 0.357833, -0.847785, 0, 0, -0.999999, 0, 0.70505, -0.70505, 0.357834, 0.357833, -0.847785, 0, -0.70505, -0.70505, 0.357834, -0.357834, -0.847785, 0.579587, -0.579587, -0.579587, 0.70505, 0, -0.70505, 0.847785, -0.357833, -0.357834, 0.579587, 0.579587, -0.579587, 0.847785, 0.357834, -0.357833, 0.999999, 0, 0, 0.70505, 0.70505, 0, 0.847785, 0.357834, 0.357834, 0.70505, -0.70505, 0, 0.847785, -0.357834, 0.357834, 0.579587, -0.579587, 0.579587, 0.70505, 0, 0.70505, 0.357834, -0.357834, 0.847785, 0.579587, 0.579587, 0.579587, 0.357834, 0.357834, 0.847785, 0, 0, 0.999999, 0, 0.70505, 0.70505, -0.357833, 0.357834, 0.847785, 0, -0.70505, 0.70505, -0.357834, -0.357834, 0.847785, -0.579587, -0.579587, -0.579587, 0, -0.70505, -0.70505, -0.357833, -0.847785, -0.357834, 0.579587, -0.579587, -0.579587, 0.357833, -0.847785, -0.357834, 0, -1, 0, 0.70505, -0.70505, 0, 0.357834, -0.847785, 0.357834, -0.70505, -0.70505, 0, -0.357834, -0.847785, 0.357834, 0, 0.70505, -0.70505, 0.357834, 0.847785, -0.357833, -0.579587, 0.579587, -0.579587, -0.357834, 0.847785, -0.357833, 0, 0.999999, 0, -0.70505, 0.70505, 0, -0.357834, 0.847785, 0.357834, 0.70505, 0.70505, 0, 0.357834, 0.847785, 0.357833, -0.579587, -0.579587, 0.579587, -0.847785, -0.357834, 0.357834, -0.579587, 0.579587, -0.579587, -0.70505, 0, -0.70505, -0.579587, -0.579587, -0.579587, 0.579587, 0.579587, -0.579587, 0.579587, -0.579587, -0.579587, 0.579587, 0.579587, 0.579587, 0.70505, 0, 0.70505, 0.579587, -0.579587, 0.579587, -0.579587, 0.579587, 0.579587, -0.70505, 0, 0.70505, -0.579587, -0.579587, 0.579587, 0, -0.70505, 0.70505, -0.579587, -0.579587, 0.579587, -0.579587, 0.579587, 0.579587, 0, 0.70505, 0.70505, 0.579587, 0.579587, 0.579587 ) - -[sub_resource type="ArrayMesh" id=5] +[sub_resource type="ArrayMesh" id=4] resource_name = "Cube.002" surfaces/0 = { "aabb": AABB( -0.999999, -0.999999, -0.999999, 2, 2, 2 ), @@ -69,9 +66,11 @@ surfaces/0 = { "vertex_count": 525 } -[sub_resource type="ConvexPolygonShape" id=6] +[sub_resource type="ConvexPolygonShape" id=5] points = PoolVector3Array( -0.841625, -0.389415, 0.389415, -0.896446, -0.204605, 0.402903, -0.956521, -0.210716, 0.210716, -0.896446, -0.402903, 0.204605, -0.91609, 0, 0.408583, -0.97794, 0, 0.213425, -0.999999, 0, 0, -0.97794, -0.213425, 0, -0.91609, -0.408583, 0, -0.896446, 0.204605, 0.402903, -0.956521, 0.210716, 0.210716, -0.841625, 0.389415, 0.389415, -0.896446, 0.402903, 0.204605, -0.91609, 0.408583, 0, -0.97794, 0.213426, 0, -0.956521, -0.210716, -0.210716, -0.896446, -0.402903, -0.204605, -0.97794, 0, -0.213425, -0.91609, 0, -0.408583, -0.896446, -0.204605, -0.402903, -0.841625, -0.389415, -0.389415, -0.956521, 0.210716, -0.210715, -0.896446, 0.402903, -0.204605, -0.841625, 0.389415, -0.389415, -0.896446, 0.204605, -0.402903, -0.583355, -0.583355, 0.583355, -0.619708, -0.503154, 0.619708, -0.697986, -0.515449, 0.515449, -0.619708, -0.619707, 0.503154, -0.663402, -0.369762, 0.663402, -0.762237, -0.37557, 0.541409, -0.762237, -0.541409, 0.37557, -0.663402, -0.663401, 0.369762, -0.698011, -0.19632, 0.698011, -0.80825, -0.198754, 0.564557, -0.711121, 0, 0.711121, -0.825059, 0, 0.573756, -0.91609, 0, 0.408583, -0.896446, -0.204605, 0.402903, -0.698011, 0.19632, 0.698011, -0.80825, 0.198754, 0.564557, -0.663402, 0.369762, 0.663402, -0.762237, 0.37557, 0.541409, -0.841625, 0.389415, 0.389415, -0.619708, 0.503154, 0.619708, -0.697986, 0.515449, 0.515449, -0.583355, 0.583355, 0.583355, -0.619708, 0.619708, 0.503154, -0.663402, 0.663402, 0.369762, -0.762237, 0.541409, 0.37557, -0.80825, 0.564557, 0.198753, -0.698011, 0.698012, 0.19632, -0.711121, 0.711121, 0, -0.825059, 0.573756, 0, -0.91609, 0.408583, 0, -0.80825, 0.564557, -0.198754, -0.698011, 0.698011, -0.19632, -0.663402, 0.663402, -0.369762, -0.762237, 0.541409, -0.37557, -0.697986, 0.515449, -0.515449, -0.762237, 0.375571, -0.541409, -0.619708, 0.619708, -0.503154, -0.583355, 0.583355, -0.583355, -0.619708, 0.503154, -0.619708, -0.663402, 0.369762, -0.663402, -0.896446, 0.204605, -0.402903, -0.80825, 0.198754, -0.564556, -0.825059, 0, -0.573755, -0.698011, 0.19632, -0.698011, -0.711121, 0, -0.711121, -0.896446, -0.204605, -0.402903, -0.80825, -0.198754, -0.564556, -0.762237, -0.375571, -0.541409, -0.698011, -0.19632, -0.698011, -0.663401, -0.369762, -0.663401, -0.663401, -0.663401, -0.369762, -0.762237, -0.541409, -0.37557, -0.697985, -0.515449, -0.515449, -0.619708, -0.619708, -0.503154, -0.619707, -0.503154, -0.619708, -0.583355, -0.583355, -0.583355, -0.711121, -0.711121, 0, -0.825059, -0.573756, 0, -0.80825, -0.564557, -0.198754, -0.698011, -0.698011, -0.19632, -0.91609, -0.408583, 0, -0.80825, -0.564557, 0.198754, -0.698011, -0.698011, 0.19632, -0.389415, -0.389415, -0.841625, -0.402903, -0.204605, -0.896446, -0.210715, -0.210716, -0.956521, -0.204605, -0.402903, -0.896446, -0.408583, 0, -0.91609, -0.213425, 0, -0.97794, 0, 0, -0.999999, 0, -0.213425, -0.97794, 0, -0.408583, -0.91609, -0.402903, 0.204605, -0.896446, -0.210715, 0.210716, -0.956521, -0.389415, 0.389415, -0.841625, -0.204605, 0.402903, -0.896446, 0, 0.408583, -0.91609, 0, 0.213426, -0.97794, 0.210716, -0.210716, -0.956521, 0.204605, -0.402903, -0.896446, 0.213425, 0, -0.97794, 0.408583, 0, -0.91609, 0.402903, -0.204605, -0.896446, 0.389415, -0.389415, -0.841625, 0.210716, 0.210716, -0.956521, 0.204605, 0.402903, -0.896446, 0.389415, 0.389415, -0.841625, 0.402903, 0.204605, -0.896446, -0.583355, -0.583355, -0.583355, -0.619707, -0.503154, -0.619708, -0.515449, -0.515449, -0.697985, -0.503154, -0.619708, -0.619708, -0.663401, -0.369762, -0.663401, -0.541409, -0.375571, -0.762237, -0.37557, -0.541409, -0.762237, -0.369762, -0.663402, -0.663402, -0.698011, -0.19632, -0.698011, -0.564556, -0.198754, -0.80825, -0.711121, 0, -0.711121, -0.573755, 0, -0.825059, -0.408583, 0, -0.91609, -0.402903, -0.204605, -0.896446, -0.698011, 0.19632, -0.698011, -0.564556, 0.198754, -0.80825, -0.663402, 0.369762, -0.663402, -0.541409, 0.375571, -0.762237, -0.619708, 0.503154, -0.619708, -0.515449, 0.515449, -0.697986, -0.583355, 0.583355, -0.583355, -0.503154, 0.619708, -0.619708, -0.369762, 0.663402, -0.663402, -0.37557, 0.541409, -0.762237, -0.198754, 0.564557, -0.80825, -0.19632, 0.698011, -0.698011, 0, 0.711121, -0.711121, 0, 0.573756, -0.825059, 0, 0.408583, -0.91609, 0.198754, 0.564557, -0.80825, 0.19632, 0.698011, -0.698011, 0.369762, 0.663402, -0.663402, 0.37557, 0.541409, -0.762237, 0.515449, 0.515449, -0.697986, 0.541409, 0.37557, -0.762237, 0.503154, 0.619708, -0.619708, 0.583355, 0.583355, -0.583355, 0.619707, 0.503154, -0.619708, 0.663401, 0.369762, -0.663401, 0.408583, 0, -0.91609, 0.564556, 0.198754, -0.80825, 0.573755, 0, -0.825059, 0.698011, 0.19632, -0.698011, 0.711121, 0, -0.711121, 0.402903, -0.204605, -0.896446, 0.564556, -0.198754, -0.80825, 0.541409, -0.375571, -0.762237, 0.698011, -0.19632, -0.698011, 0.663401, -0.369762, -0.663402, 0.369762, -0.663402, -0.663402, 0.37557, -0.541409, -0.762237, 0.515449, -0.515449, -0.697986, 0.503154, -0.619708, -0.619708, 0.619707, -0.503154, -0.619707, 0.583355, -0.583355, -0.583355, 0, -0.711121, -0.711121, 0, -0.573756, -0.825059, 0.198754, -0.564557, -0.80825, 0.19632, -0.698011, -0.698011, 0, -0.408583, -0.91609, -0.198754, -0.564557, -0.80825, -0.19632, -0.698011, -0.698011, 0.841625, -0.389415, -0.389415, 0.896446, -0.204605, -0.402903, 0.956521, -0.210716, -0.210716, 0.896446, -0.402903, -0.204605, 0.91609, 0, -0.408583, 0.97794, 0, -0.213425, 0.999999, 0, 0, 0.97794, -0.213426, 0, 0.91609, -0.408583, 0, 0.896446, 0.204605, -0.402903, 0.956521, 0.210716, -0.210716, 0.841625, 0.389415, -0.389415, 0.896446, 0.402903, -0.204605, 0.91609, 0.408583, 0, 0.97794, 0.213425, 0, 0.95652, -0.210716, 0.210716, 0.896446, -0.402903, 0.204605, 0.97794, 0, 0.213425, 0.91609, 0, 0.408583, 0.896446, -0.204605, 0.402903, 0.841625, -0.389415, 0.389415, 0.956521, 0.210716, 0.210716, 0.896446, 0.402903, 0.204605, 0.841625, 0.389415, 0.389415, 0.896446, 0.204605, 0.402903, 0.583355, -0.583355, -0.583355, 0.619707, -0.503154, -0.619707, 0.697985, -0.515449, -0.515449, 0.619707, -0.619708, -0.503154, 0.663401, -0.369762, -0.663402, 0.762237, -0.375571, -0.541409, 0.841625, -0.389415, -0.389415, 0.762237, -0.541409, -0.37557, 0.663401, -0.663402, -0.369762, 0.698011, -0.19632, -0.698011, 0.80825, -0.198754, -0.564557, 0.825059, 0, -0.573756, 0.91609, 0, -0.408583, 0.698011, 0.19632, -0.698011, 0.80825, 0.198754, -0.564557, 0.663401, 0.369762, -0.663401, 0.762237, 0.37557, -0.541409, 0.841625, 0.389415, -0.389415, 0.619707, 0.503154, -0.619708, 0.697985, 0.515449, -0.515449, 0.583355, 0.583355, -0.583355, 0.619707, 0.619708, -0.503154, 0.663401, 0.663402, -0.369762, 0.762237, 0.541409, -0.37557, 0.80825, 0.564557, -0.198754, 0.698011, 0.698011, -0.19632, 0.711121, 0.711121, 0, 0.825059, 0.573756, 0, 0.91609, 0.408583, 0, 0.80825, 0.564556, 0.198754, 0.698011, 0.698011, 0.19632, 0.663402, 0.663402, 0.369762, 0.762237, 0.541409, 0.375571, 0.841625, 0.389415, 0.389415, 0.697986, 0.515449, 0.515449, 0.762237, 0.375571, 0.541409, 0.619708, 0.619708, 0.503154, 0.583355, 0.583355, 0.583355, 0.619708, 0.503154, 0.619708, 0.663402, 0.369762, 0.663402, 0.91609, 0, 0.408583, 0.896446, 0.204605, 0.402903, 0.80825, 0.198754, 0.564557, 0.825059, 0, 0.573756, 0.698011, 0.19632, 0.698011, 0.711121, 0, 0.711121, 0.841625, -0.389415, 0.389415, 0.80825, -0.198754, 0.564557, 0.762237, -0.37557, 0.541409, 0.698011, -0.19632, 0.698011, 0.663402, -0.369762, 0.663402, 0.663402, -0.663402, 0.369762, 0.762237, -0.541409, 0.37557, 0.697985, -0.515449, 0.515449, 0.619708, -0.619708, 0.503154, 0.619708, -0.503154, 0.619708, 0.583355, -0.583355, 0.583355, 0.711121, -0.711121, 0, 0.825059, -0.573756, 0, 0.80825, -0.564556, 0.198754, 0.698011, -0.698011, 0.19632, 0.91609, -0.408583, 0, 0.80825, -0.564557, -0.198754, 0.698011, -0.698011, -0.19632, 0.389415, -0.389415, 0.841625, 0.402903, -0.204605, 0.896446, 0.210716, -0.210716, 0.956521, 0.204605, -0.402903, 0.896446, 0.408583, 0, 0.91609, 0.213425, 0, 0.97794, 0, 0, 0.999999, 0, -0.213425, 0.97794, 0, -0.408583, 0.916091, 0.402903, 0.204605, 0.896446, 0.210715, 0.210715, 0.956521, 0.389415, 0.389415, 0.841625, 0.204605, 0.402903, 0.896446, 0, 0.408583, 0.91609, 0, 0.213425, 0.97794, -0.210716, -0.210716, 0.956521, -0.204605, -0.402903, 0.896446, -0.213425, 0, 0.97794, -0.408583, 0, 0.91609, -0.402903, -0.204605, 0.896446, -0.389415, -0.389415, 0.841625, -0.210716, 0.210716, 0.956521, -0.204605, 0.402903, 0.896446, -0.389415, 0.389415, 0.841625, -0.402903, 0.204605, 0.896446, 0.583355, -0.583355, 0.583355, 0.619708, -0.503154, 0.619708, 0.515449, -0.515449, 0.697986, 0.503154, -0.619708, 0.619708, 0.663402, -0.369762, 0.663402, 0.541409, -0.37557, 0.762237, 0.37557, -0.541409, 0.762237, 0.369762, -0.663402, 0.663402, 0.698011, -0.19632, 0.698011, 0.564557, -0.198754, 0.80825, 0.711121, 0, 0.711121, 0.573755, 0, 0.825059, 0.408583, 0, 0.91609, 0.402903, -0.204605, 0.896446, 0.698011, 0.19632, 0.698011, 0.564557, 0.198754, 0.80825, 0.663402, 0.369762, 0.663402, 0.541409, 0.37557, 0.762237, 0.619708, 0.503154, 0.619708, 0.515449, 0.515449, 0.697985, 0.583355, 0.583355, 0.583355, 0.503154, 0.619708, 0.619708, 0.369762, 0.663402, 0.663402, 0.37557, 0.541409, 0.762237, 0.198754, 0.564556, 0.80825, 0.19632, 0.698011, 0.698011, 0, 0.711121, 0.711121, 0, 0.573756, 0.825059, 0, 0.408583, 0.91609, -0.198754, 0.564556, 0.80825, -0.19632, 0.698011, 0.698011, -0.369762, 0.663402, 0.663402, -0.375571, 0.541409, 0.762237, -0.515449, 0.515449, 0.697985, -0.541409, 0.37557, 0.762237, -0.503154, 0.619708, 0.619707, -0.583355, 0.583355, 0.583355, -0.619708, 0.503154, 0.619708, -0.663402, 0.369762, 0.663402, -0.408583, 0, 0.91609, -0.564557, 0.198754, 0.80825, -0.573755, 0, 0.825059, -0.698011, 0.19632, 0.698011, -0.711121, 0, 0.711121, -0.402903, -0.204605, 0.896446, -0.564557, -0.198754, 0.80825, -0.541409, -0.37557, 0.762237, -0.698011, -0.19632, 0.698011, -0.663402, -0.369762, 0.663402, -0.369762, -0.663402, 0.663402, -0.37557, -0.541409, 0.762237, -0.515449, -0.515449, 0.697985, -0.503154, -0.619708, 0.619708, -0.619708, -0.503154, 0.619708, -0.583355, -0.583355, 0.583355, 0, -0.711121, 0.711121, 0, -0.573756, 0.825059, -0.198754, -0.564556, 0.80825, -0.19632, -0.698011, 0.698011, 0, -0.408583, 0.916091, 0.198754, -0.564557, 0.80825, 0.19632, -0.698011, 0.698011, -0.389415, -0.841625, -0.389415, -0.204605, -0.896446, -0.402903, -0.210716, -0.956521, -0.210716, -0.402903, -0.896446, -0.204605, 0, -0.91609, -0.408583, 0, -0.97794, -0.213425, 0, -0.999999, 0, -0.213425, -0.97794, 0, -0.408583, -0.91609, 0, 0.204605, -0.896446, -0.402903, 0.210716, -0.956521, -0.210716, 0.389415, -0.841625, -0.389415, 0.402903, -0.896446, -0.204605, 0.408583, -0.91609, 0, 0.213425, -0.97794, 0, -0.210716, -0.956521, 0.210716, -0.402903, -0.896446, 0.204605, 0, -0.97794, 0.213425, 0, -0.91609, 0.408583, -0.204605, -0.896446, 0.402903, -0.389415, -0.841625, 0.389415, 0.210716, -0.956521, 0.210716, 0.402903, -0.896446, 0.204605, 0.389415, -0.841625, 0.389415, 0.204605, -0.896446, 0.402903, -0.583355, -0.583355, -0.583355, -0.503154, -0.619708, -0.619708, -0.515449, -0.697986, -0.515449, -0.619708, -0.619708, -0.503154, -0.369762, -0.663402, -0.663402, -0.37557, -0.762237, -0.541409, -0.389415, -0.841625, -0.389415, -0.541409, -0.762237, -0.37557, -0.663401, -0.663401, -0.369762, -0.19632, -0.698011, -0.698011, -0.198754, -0.80825, -0.564557, 0, -0.711121, -0.711121, 0, -0.825059, -0.573756, 0, -0.91609, -0.408583, 0.19632, -0.698011, -0.698011, 0.198754, -0.80825, -0.564557, 0.369762, -0.663402, -0.663402, 0.37557, -0.762237, -0.541409, 0.204605, -0.896446, -0.402903, 0.503154, -0.619708, -0.619708, 0.515449, -0.697986, -0.515449, 0.583355, -0.583355, -0.583355, 0.619707, -0.619708, -0.503154, 0.663401, -0.663402, -0.369762, 0.541409, -0.762237, -0.375571, 0.564556, -0.80825, -0.198754, 0.698011, -0.698011, -0.19632, 0.711121, -0.711121, 0, 0.573756, -0.825059, 0, 0.564556, -0.80825, 0.198754, 0.698011, -0.698011, 0.19632, 0.663402, -0.663402, 0.369762, 0.541409, -0.762237, 0.375571, 0.515449, -0.697985, 0.515449, 0.37557, -0.762237, 0.541409, 0.619708, -0.619708, 0.503154, 0.503154, -0.619708, 0.619708, 0.369762, -0.663402, 0.663402, 0, -0.91609, 0.408583, 0.204605, -0.896446, 0.402903, 0.198754, -0.80825, 0.564556, 0, -0.825059, 0.573756, 0.19632, -0.698011, 0.698011, 0, -0.711121, 0.711121, -0.389415, -0.841625, 0.389415, -0.198754, -0.80825, 0.564556, -0.37557, -0.762237, 0.541409, -0.19632, -0.698011, 0.698011, -0.369762, -0.663402, 0.663402, -0.663402, -0.663401, 0.369762, -0.541409, -0.762237, 0.37557, -0.515449, -0.697985, 0.515449, -0.619708, -0.619707, 0.503154, -0.503154, -0.619708, 0.619708, -0.583355, -0.583355, 0.583355, -0.711121, -0.711121, 0, -0.573756, -0.825059, 0, -0.564557, -0.80825, 0.198754, -0.698011, -0.698011, 0.19632, -0.408583, -0.91609, 0, -0.564557, -0.80825, -0.198754, -0.698011, -0.698011, -0.19632, 0.389415, 0.841625, -0.389415, 0.204605, 0.896446, -0.402903, 0.210716, 0.956521, -0.210715, 0.402903, 0.896446, -0.204605, 0, 0.91609, -0.408583, 0, 0.97794, -0.213425, 0, 0.999999, 0, 0.213425, 0.97794, 0, 0.408583, 0.91609, 0, -0.204605, 0.896446, -0.402903, -0.210716, 0.956521, -0.210716, -0.389415, 0.841626, -0.389415, -0.402903, 0.896447, -0.204605, -0.408583, 0.916091, 0, -0.213426, 0.97794, 0, 0.210715, 0.956521, 0.210716, 0.402903, 0.896446, 0.204605, 0, 0.97794, 0.213426, 0, 0.916091, 0.408583, 0.204605, 0.896446, 0.402903, 0.389415, 0.841625, 0.389415, -0.210716, 0.956521, 0.210716, -0.402903, 0.896447, 0.204605, -0.389415, 0.841626, 0.389415, -0.204605, 0.896447, 0.402903, 0.503154, 0.619708, -0.619708, 0.515449, 0.697986, -0.515449, 0.619707, 0.619708, -0.503154, 0.369762, 0.663402, -0.663402, 0.37557, 0.762237, -0.541409, 0.389415, 0.841625, -0.389415, 0.541409, 0.762237, -0.37557, 0.663401, 0.663402, -0.369762, 0.19632, 0.698011, -0.698011, 0.198754, 0.80825, -0.564556, 0, 0.711121, -0.711121, 0, 0.825059, -0.573756, 0, 0.91609, -0.408583, -0.19632, 0.698011, -0.698011, -0.198754, 0.80825, -0.564556, -0.369762, 0.663402, -0.663402, -0.375571, 0.762237, -0.541409, -0.204605, 0.896446, -0.402903, -0.503154, 0.619708, -0.619708, -0.515449, 0.697986, -0.515449, -0.583355, 0.583355, -0.583355, -0.619708, 0.619708, -0.503154, -0.663402, 0.663402, -0.369762, -0.541409, 0.762237, -0.37557, -0.564557, 0.80825, -0.198753, -0.698011, 0.698011, -0.19632, -0.711121, 0.711121, 0, -0.573756, 0.825059, 0, -0.564557, 0.80825, 0.198754, -0.698011, 0.698012, 0.19632, -0.663402, 0.663402, 0.369762, -0.541409, 0.762237, 0.375571, -0.389415, 0.841626, 0.389415, -0.515449, 0.697986, 0.515449, -0.375571, 0.762237, 0.541409, -0.619708, 0.619708, 0.503154, -0.583355, 0.583355, 0.583355, -0.503154, 0.619708, 0.619707, -0.369762, 0.663402, 0.663402, 0, 0.916091, 0.408583, -0.204605, 0.896447, 0.402903, -0.198754, 0.80825, 0.564556, 0, 0.82506, 0.573756, -0.19632, 0.698011, 0.698011, 0, 0.711121, 0.711121, 0.198753, 0.80825, 0.564556, 0.37557, 0.762237, 0.541409, 0.19632, 0.698011, 0.698011, 0.369762, 0.663402, 0.663402, 0.663402, 0.663402, 0.369762, 0.541409, 0.762237, 0.37557, 0.515449, 0.697986, 0.515449, 0.619708, 0.619708, 0.503154, 0.503154, 0.619708, 0.619708, 0.583355, 0.583355, 0.583355, 0.711121, 0.711121, 0, 0.573756, 0.825059, 0, 0.564556, 0.80825, 0.198754, 0.698011, 0.698011, 0.19632, 0.408583, 0.91609, 0, 0.564556, 0.80825, -0.198754, 0.698011, 0.698011, -0.19632 ) +[sub_resource type="CapsuleShape" id=6] + [sub_resource type="CubeMesh" id=7] [sub_resource type="Shader" id=8] @@ -122,16 +121,17 @@ __meta__ = { mesh = SubResource( 1 ) material/0 = SubResource( 3 ) -[node name="CollisionShape" type="CollisionShape" parent="Monolith"] -shape = SubResource( 4 ) - [node name="Sphere_768_1UV" type="MeshInstance" parent="Monolith"] transform = Transform( 1, -2.98023e-08, -7.45058e-09, 0, 1, 0, 0, 1.19209e-07, 1, -1.9783, -0.31098, 9.15405 ) -mesh = SubResource( 5 ) +mesh = SubResource( 4 ) material/0 = SubResource( 3 ) [node name="CollisionShape2" type="CollisionShape" parent="Monolith"] transform = Transform( 1, -2.98023e-08, -7.45058e-09, 0, 1, 0, 0, 1.19209e-07, 1, -1.9783, -0.31098, 9.15405 ) +shape = SubResource( 5 ) + +[node name="CollisionShape" type="CollisionShape" parent="Monolith"] +transform = Transform( 1, -2.98023e-08, -7.45058e-09, 0, 1, 0, 0, 1.19209e-07, 1, 0, 0, 0 ) shape = SubResource( 6 ) [node name="Monolith2" type="StaticBody" parent="."] diff --git a/Scenes/UI/UI.tscn b/Scenes/UI/UI.tscn index efdc2787..0a59806e 100644 --- a/Scenes/UI/UI.tscn +++ b/Scenes/UI/UI.tscn @@ -35,6 +35,7 @@ __meta__ = { } [node name="_ColorRect" type="ColorRect" parent="Main3D/Debug"] +visible = false material = SubResource( 2 ) anchor_right = 1.0 anchor_bottom = 1.0 @@ -121,6 +122,7 @@ __meta__ = { } [node name="_ColorRect" type="ColorRect" parent="Main3D/Text_panel"] +visible = false anchor_right = 1.0 anchor_bottom = 1.0 color = Color( 0.529412, 0.258824, 0.360784, 1 ) @@ -223,6 +225,37 @@ __meta__ = { "_edit_use_anchors_": false } +[node name="Button_screen_filter" type="Button" parent="Controls"] +anchor_left = 1.0 +anchor_right = 1.0 +margin_left = -168.0 +margin_top = 40.0 +margin_right = -87.0 +margin_bottom = 60.0 +toggle_mode = true +keep_pressed_outside = true +text = "Scren filter" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Slider_screen_res" type="HSlider" parent="Controls"] +anchor_left = 1.0 +anchor_right = 1.0 +margin_left = -168.0 +margin_top = 8.0 +margin_right = -88.0 +margin_bottom = 28.0 +min_value = 0.1 +max_value = 1.0 +step = 0.1 +value = 0.7 +tick_count = 10 +ticks_on_borders = true +__meta__ = { +"_edit_use_anchors_": false +} + [connection signal="mouse_entered" from="Main3D" to="." method="_on_Viewport_main_mouse_entered"] [connection signal="mouse_exited" from="Main3D" to="." method="_on_Viewport_main_mouse_exited"] [connection signal="resized" from="Main3D" to="." method="_on_Viewport_main_resized"] @@ -230,3 +263,5 @@ __meta__ = { [connection signal="toggled" from="Controls/Button_debug" to="." method="_on_Button_debug_toggled"] [connection signal="toggled" from="Controls/Button_text_panel" to="." method="_on_Button_text_panel_toggled"] [connection signal="pressed" from="Controls/Button_quit" to="." method="_on_Button_quit_pressed"] +[connection signal="toggled" from="Controls/Button_screen_filter" to="." method="_on_Button_screen_filter_toggled"] +[connection signal="value_changed" from="Controls/Slider_screen_res" to="." method="_on_Slider_screen_res_value_changed"] diff --git a/Scripts/Camera_rig.gd b/Scripts/Camera_rig.gd index 7eb7e66b..1eb56ff2 100644 --- a/Scripts/Camera_rig.gd +++ b/Scripts/Camera_rig.gd @@ -170,6 +170,7 @@ func zoom_camera(mouse_event): zoom_ticks -= 1 $Camera.translation.z = current_zoom +# ============================ Signal processing ============================== func is_turret_mode_on(flag): if flag: # Reset camera first. diff --git a/Scripts/Input.gd b/Scripts/Input.gd index afbf0a88..cdda03ae 100644 --- a/Scripts/Input.gd +++ b/Scripts/Input.gd @@ -21,6 +21,7 @@ var player_ship_state = Node var signals = Node var ui = Node var ui_button_turret = Node +var ui_controls_bar = Node func _ready(): # ============================ Initialize nodes =========================== @@ -28,6 +29,7 @@ func _ready(): player_ship_state = get_node("/root/Cont/View/Main/State/Player_ship") signals = get_node("/root/Cont/View/Main/Input/Signals") ui = get_node("/root/Cont/UI") + ui_controls_bar = get_node("/root/Cont/UI/Controls") ui_button_turret = get_node("/root/Cont/UI/Controls/Button_turret") # ============================ Connect signals ============================ signals.connect("sig_mouse_on_viewport", self, "is_mouse_on_viewport") @@ -72,9 +74,10 @@ func _input(event): if event is InputEventMouseButton and player_ship_state.turret_mode: camera_rig.zoom_camera(event) - # ======================= For keyboard buttons ======================== + # ======================= For keyboard buttons ========================= if event is InputEventKey: + # ============================ UI Controls ========================= # Mouse flight. if event.pressed and event.scancode == KEY_SPACE: if player_ship_state.mouse_flight: @@ -84,11 +87,22 @@ func _input(event): player_ship_state.mouse_flight = true signals.emit_signal("sig_mouse_flight_on", true) + # TODO: Should also be accessible from other areas and windows. + # Show toolbar. + if event.pressed and event.scancode == KEY_BACKSPACE: + if ui_controls_bar.visible: + ui_controls_bar.visible = false + else: + ui_controls_bar.visible = true + + # Turret mode. UI shortcut. Signal is emitted by UI. if event.pressed and event.scancode == KEY_H: - if not player_ship_state.turret_mode: ui_button_turret.pressed = true + if not player_ship_state.turret_mode: + ui_button_turret.pressed = true else: ui_button_turret.pressed = false + # ============================= Ship controls ====================== # Accelerate forward. # TODO: unique signals for simultaneous action. if event.pressed and event.scancode == KEY_UP: @@ -145,6 +159,7 @@ func _input(event): # ============================ Signal processing ============================== # Check if viewport resized and get new values. Required for mouse coordinates. func is_viewport_update(): + # For mouse coords. viewport_size = OS.window_size # Check if we are hovering mouse over the control bar. diff --git a/Scripts/Signals.gd b/Scripts/Signals.gd index ad57222e..61506d81 100644 --- a/Scripts/Signals.gd +++ b/Scripts/Signals.gd @@ -8,6 +8,8 @@ extends Node # warning-ignore-all:unused_signal # ============================== Generic ===================================== signal sig_mouse_on_viewport(flag) +signal sig_screen_filter_on(flag) +signal sig_screen_res_value_changed(value) signal sig_viewport_update signal sig_quit_game diff --git a/Scripts/UI.gd b/Scripts/UI.gd index 2fe995f0..30c56554 100644 --- a/Scripts/UI.gd +++ b/Scripts/UI.gd @@ -98,3 +98,10 @@ func _on_Button_debug_toggled(button_pressed): func _on_Button_text_panel_toggled(button_pressed): if button_pressed: text_panel.show() else: text_panel.hide() + +func _on_Button_screen_filter_toggled(button_pressed): + if button_pressed: signals.emit_signal("sig_screen_filter_on", true) + else: signals.emit_signal("sig_screen_filter_on", false) + +func _on_Slider_screen_res_value_changed(value): + signals.emit_signal("sig_screen_res_value_changed", value) diff --git a/Scripts/View.gd b/Scripts/View.gd index 130135e6..9cfb22e8 100644 --- a/Scripts/View.gd +++ b/Scripts/View.gd @@ -1,12 +1,35 @@ extends Viewport -export var scale_factor = 0.65 +# Values. +# TODO: Throw it into options and sync with slider +var screen_res_factor = 0.7 +# Objects. +# Parameters. +# Nodes. +var signals = Node func _ready(): - self.get_texture().flags = Texture.FLAG_FILTER - self.size = Vector2(1024, 600)*scale_factor + # ======================Z====== Initialize nodes =========================== + signals = get_node("/root/Cont/View/Main/Input/Signals") + # ============================ Connect signals ============================ + signals.connect("sig_screen_filter_on", self, "is_screen_filter_on") + signals.connect("sig_viewport_update", self, "is_viewport_update") + signals.connect("sig_screen_res_value_changed", self, "is_screen_res_value_changed") + # ========================================================================= + + +# ============================ Signal processing ============================== +func is_screen_filter_on(flag): + if flag: + self.get_texture().flags = Texture.FLAG_FILTER + print("ON") + else: + self.get_texture().flags = !Texture.FLAG_FILTER + print("OFF") + +func is_viewport_update(): + self.size = OS.window_size*screen_res_factor -# TODO: implement ratio setting, factor, size - -func _on_View_size_changed(): - self.size = Vector2(1024, 600)*scale_factor +func is_screen_res_value_changed(value): + screen_res_factor = value + self.size = OS.window_size*screen_res_factor