diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fbb9119 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +_build +*.import diff --git a/Assets/Background.jpg b/Assets/Background.jpg new file mode 100644 index 0000000..e7954b1 Binary files /dev/null and b/Assets/Background.jpg differ diff --git a/Assets/Cleared.png b/Assets/Cleared.png new file mode 100644 index 0000000..3713066 Binary files /dev/null and b/Assets/Cleared.png differ diff --git a/Assets/Sounds/ButtonPress.mp3 b/Assets/Sounds/ButtonPress.mp3 new file mode 100644 index 0000000..7b8c6f5 Binary files /dev/null and b/Assets/Sounds/ButtonPress.mp3 differ diff --git a/Assets/Sounds/button.wav b/Assets/Sounds/button.wav new file mode 100644 index 0000000..56c5c21 Binary files /dev/null and b/Assets/Sounds/button.wav differ diff --git a/Assets/Sounds/explode.wav b/Assets/Sounds/explode.wav new file mode 100644 index 0000000..8d58401 Binary files /dev/null and b/Assets/Sounds/explode.wav differ diff --git a/Assets/Sounds/move.wav b/Assets/Sounds/move.wav new file mode 100644 index 0000000..0a9ade0 Binary files /dev/null and b/Assets/Sounds/move.wav differ diff --git a/Assets/Sounds/new_best.wav b/Assets/Sounds/new_best.wav new file mode 100644 index 0000000..ca0e817 Binary files /dev/null and b/Assets/Sounds/new_best.wav differ diff --git a/Assets/Sounds/point.wav b/Assets/Sounds/point.wav new file mode 100644 index 0000000..0111766 Binary files /dev/null and b/Assets/Sounds/point.wav differ diff --git a/Assets/Sounds/rebound.wav b/Assets/Sounds/rebound.wav new file mode 100644 index 0000000..f390fbb Binary files /dev/null and b/Assets/Sounds/rebound.wav differ diff --git a/Assets/Star.png b/Assets/Star.png new file mode 100644 index 0000000..c6a57c8 Binary files /dev/null and b/Assets/Star.png differ diff --git a/Assets/circle.png b/Assets/circle.png new file mode 100644 index 0000000..dc1c4df Binary files /dev/null and b/Assets/circle.png differ diff --git a/Assets/highscore.png b/Assets/highscore.png new file mode 100644 index 0000000..eca0839 Binary files /dev/null and b/Assets/highscore.png differ diff --git a/Assets/light.png b/Assets/light.png new file mode 100644 index 0000000..c87d3be Binary files /dev/null and b/Assets/light.png differ diff --git a/Assets/line.png b/Assets/line.png new file mode 100644 index 0000000..4718ed6 Binary files /dev/null and b/Assets/line.png differ diff --git a/Assets/play_button.png b/Assets/play_button.png new file mode 100644 index 0000000..8d681ee Binary files /dev/null and b/Assets/play_button.png differ diff --git a/Assets/play_button_hovered.png b/Assets/play_button_hovered.png new file mode 100644 index 0000000..28a2be6 Binary files /dev/null and b/Assets/play_button_hovered.png differ diff --git a/Assets/play_button_pressed.png b/Assets/play_button_pressed.png new file mode 100644 index 0000000..54b9d7a Binary files /dev/null and b/Assets/play_button_pressed.png differ diff --git a/Assets/replay_button.png b/Assets/replay_button.png new file mode 100644 index 0000000..fdf616d Binary files /dev/null and b/Assets/replay_button.png differ diff --git a/Assets/replay_button_hovered.png b/Assets/replay_button_hovered.png new file mode 100644 index 0000000..cf6d2e2 Binary files /dev/null and b/Assets/replay_button_hovered.png differ diff --git a/Assets/replay_button_pressed.png b/Assets/replay_button_pressed.png new file mode 100644 index 0000000..9e7709b Binary files /dev/null and b/Assets/replay_button_pressed.png differ diff --git a/Assets/square.png b/Assets/square.png new file mode 100644 index 0000000..63c0e6e Binary files /dev/null and b/Assets/square.png differ diff --git a/Fonts/Schluber.ttf b/Fonts/Schluber.ttf new file mode 100644 index 0000000..71b86c7 Binary files /dev/null and b/Fonts/Schluber.ttf differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..c9571e5 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# CirclEvade + +Endless Game, Play as a Circle and Evade the Boxes. Under Development + +
+Submission for SG Game Jam 2022. diff --git a/Scenes/Characters/Bonus.tscn b/Scenes/Characters/Bonus.tscn new file mode 100644 index 0000000..1d82d7f --- /dev/null +++ b/Scenes/Characters/Bonus.tscn @@ -0,0 +1,102 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://Assets/light.png" type="Texture" id=1] +[ext_resource path="res://Assets/play_button.png" type="Texture" id=2] +[ext_resource path="res://Scripts/Bonus.gd" type="Script" id=3] + +[sub_resource type="CanvasItemMaterial" id=3] + +[sub_resource type="Animation" id=1] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Star:rotation_degrees") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Star:scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ) ] +} + +[sub_resource type="Animation" id=2] +resource_name = "Spin" +length = 0.6 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("Star:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), +"update": 0, +"values": [ Vector2( 1, 1 ), Vector2( 0.8, 1 ), Vector2( 0.6, 1 ), Vector2( 0.5, 0.5 ), Vector2( 0.6, 1 ), Vector2( 0.8, 1 ) ] +} + +[node name="Bonus" type="Area2D"] +material = SubResource( 3 ) +script = ExtResource( 3 ) + +[node name="Star" type="Node2D" parent="."] +scale = Vector2( 1, 1 ) + +[node name="Right" type="Sprite" parent="Star"] +position = Vector2( 37, -11 ) +scale = Vector2( 1.1875, 0.6875 ) +texture = ExtResource( 2 ) +offset = Vector2( 9.26316, 16 ) + +[node name="Left" type="Sprite" parent="Star"] +position = Vector2( -48, 0 ) +rotation = 3.14159 +scale = Vector2( 1.188, -0.688 ) +texture = ExtResource( 2 ) + +[node name="Bottom" type="Sprite" parent="Star"] +position = Vector2( 50, 52 ) +rotation = 1.5708 +scale = Vector2( 1.42602, 0.6875 ) +texture = ExtResource( 2 ) +offset = Vector2( 0.263161, 72.2729 ) + +[node name="Top" type="Sprite" parent="Star"] +position = Vector2( -11, -35.6991 ) +rotation = -1.5708 +scale = Vector2( 1.46812, 0.6875 ) +texture = ExtResource( 2 ) +offset = Vector2( 9.26316, 16 ) + +[node name="Light2D" type="Light2D" parent="."] +texture = ExtResource( 1 ) +color = Color( 0.788235, 0.658824, 0.0627451, 1 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] +polygon = PoolVector2Array( -20, -25, 0, -105, 20, -25, 95, 0, 20, 30, 0, 110, -20, 25, -95, 0 ) + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/RESET = SubResource( 1 ) +anims/Spin = SubResource( 2 ) + +[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."] +position = Vector2( -4, -1.25 ) +scale = Vector2( 8.9, 10.825 ) + +[connection signal="area_entered" from="." to="." method="_on_Bonus_area_entered"] +[connection signal="viewport_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_viewport_exited"] diff --git a/Scenes/Characters/Enemy.tscn b/Scenes/Characters/Enemy.tscn new file mode 100644 index 0000000..b660396 --- /dev/null +++ b/Scenes/Characters/Enemy.tscn @@ -0,0 +1,43 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://Assets/square.png" type="Texture" id=1] +[ext_resource path="res://Scripts/Enemy.gd" type="Script" id=2] +[ext_resource path="res://Assets/light.png" type="Texture" id=3] + +[sub_resource type="PhysicsMaterial" id=3] +friction = 0.0 + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 24, 24 ) + +[sub_resource type="OccluderPolygon2D" id=2] +polygon = PoolVector2Array( -24, -24, -24, 24, 24, 24, 24, -24 ) + +[node name="Enemy" type="RigidBody2D"] +physics_material_override = SubResource( 3 ) +gravity_scale = 0.0 +linear_damp = 0.0 +angular_damp = 0.0 +script = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] +modulate = Color( 0, 0, 0, 1 ) +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) + +[node name="LightOccluder2D" type="LightOccluder2D" parent="."] +occluder = SubResource( 2 ) + +[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."] +scale = Vector2( 2.4, 2.4 ) + +[node name="Light2D" type="Light2D" parent="."] +texture = ExtResource( 3 ) +texture_scale = 0.5 +color = Color( 0, 0, 0, 1 ) +energy = 0.5 +mode = 2 + +[connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"] diff --git a/Scenes/Characters/Player.tscn b/Scenes/Characters/Player.tscn new file mode 100644 index 0000000..f04c7e6 --- /dev/null +++ b/Scenes/Characters/Player.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://Assets/circle.png" type="Texture" id=1] +[ext_resource path="res://Scripts/Player.gd" type="Script" id=2] +[ext_resource path="res://Assets/light.png" type="Texture" id=3] +[ext_resource path="res://Scenes/Effects/Trail.tscn" type="PackedScene" id=4] +[ext_resource path="res://Assets/Sounds/rebound.wav" type="AudioStream" id=5] +[ext_resource path="res://Assets/Sounds/point.wav" type="AudioStream" id=6] +[ext_resource path="res://Assets/Sounds/explode.wav" type="AudioStream" id=7] + +[sub_resource type="CircleShape2D" id=1] +radius = 27.0 + +[node name="Player" type="Area2D"] +position = Vector2( 288, 512 ) +collision_mask = 15 +script = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( 0, 3 ) +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0, 3 ) +shape = SubResource( 1 ) + +[node name="Light2D" type="Light2D" parent="."] +position = Vector2( 0, 3 ) +texture = ExtResource( 3 ) +shadow_enabled = true +shadow_gradient_length = 1.0 +shadow_filter = 2 +shadow_filter_smooth = 20.0 + +[node name="Trail" parent="." instance=ExtResource( 4 )] + +[node name="TurnSound" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 5 ) + +[node name="PointSound" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 6 ) +volume_db = 5.0 + +[node name="DeathSound" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 7 ) +volume_db = -10.0 + +[connection signal="area_entered" from="." to="." method="_on_Player_area_entered"] +[connection signal="body_entered" from="." to="." method="_on_Player_body_entered"] diff --git a/Scenes/CircleSpin.tscn b/Scenes/CircleSpin.tscn new file mode 100644 index 0000000..30fb0b8 --- /dev/null +++ b/Scenes/CircleSpin.tscn @@ -0,0 +1,58 @@ +[gd_scene load_steps=14 format=2] + +[ext_resource path="res://Scripts/Background.gd" type="Script" id=1] +[ext_resource path="res://Scripts/CirclePlayer.gd" type="Script" id=2] +[ext_resource path="res://Scenes/HUD.tscn" type="PackedScene" id=3] +[ext_resource path="res://Scripts/CircleSpin.gd" type="Script" id=4] +[ext_resource path="res://Scenes/Characters/Player.tscn" type="PackedScene" id=5] +[ext_resource path="res://Scenes/Effects/BonusEffect.tscn" type="PackedScene" id=6] +[ext_resource path="res://Scenes/Timers.tscn" type="PackedScene" id=7] +[ext_resource path="res://Assets/Sounds/new_best.wav" type="AudioStream" id=8] +[ext_resource path="res://Assets/Background.jpg" type="Texture" id=10] +[ext_resource path="res://Scenes/Characters/Enemy.tscn" type="PackedScene" id=11] +[ext_resource path="res://Scenes/Effects/DarkExplosion.tscn" type="PackedScene" id=13] +[ext_resource path="res://Scenes/Characters/Bonus.tscn" type="PackedScene" id=14] + +[sub_resource type="Curve2D" id=1] +_data = { +"points": PoolVector2Array( 0, 0, 0, 0, 61, 1079, 0, 0, 0, 0, 603, 1086, 0, 0, 0, 0, 695, 1073, 0, 0, 0, 0, 61, 1079 ) +} + +[node name="CircleSpin" type="Node2D"] +script = ExtResource( 4 ) +enemy_scene = ExtResource( 11 ) +bonus_scene = ExtResource( 14 ) +enemy_explosion = ExtResource( 13 ) +bonus_explosion = ExtResource( 6 ) + +[node name="Background" type="Node2D" parent="."] +script = ExtResource( 1 ) + +[node name="CanvasModulate" type="CanvasModulate" parent="Background"] +color = Color( 0.278431, 0.211765, 0.211765, 1 ) + +[node name="Background" type="Sprite" parent="Background"] +modulate = Color( 0.32549, 0.341176, 0.823529, 1 ) +position = Vector2( 288, 512 ) +scale = Vector2( 0.411429, 0.411576 ) +texture = ExtResource( 10 ) + +[node name="HUD" parent="." instance=ExtResource( 3 )] + +[node name="Timers" parent="." instance=ExtResource( 7 )] + +[node name="Circle Player" type="Node" parent="."] +script = ExtResource( 2 ) + +[node name="Player" parent="Circle Player" instance=ExtResource( 5 )] + +[node name="EnemSpawnPath" type="Path2D" parent="."] +position = Vector2( -27, 2 ) +curve = SubResource( 1 ) + +[node name="EnemSpawnLocation" type="PathFollow2D" parent="EnemSpawnPath"] +position = Vector2( 61, 1079 ) +rotation = 0.0129147 + +[node name="NewBest" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 8 ) diff --git a/Scenes/Effects/BonusEffect.tscn b/Scenes/Effects/BonusEffect.tscn new file mode 100644 index 0000000..a7b21a5 --- /dev/null +++ b/Scenes/Effects/BonusEffect.tscn @@ -0,0 +1,50 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://Assets/Star.png" type="Texture" id=1] +[ext_resource path="res://Scripts/BonusEffect.gd" type="Script" id=2] + +[sub_resource type="CanvasItemMaterial" id=1] +blend_mode = 1 +particles_animation = true +particles_anim_h_frames = 1 +particles_anim_v_frames = 1 +particles_anim_loop = false + +[sub_resource type="Gradient" id=2] +colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 ) + +[sub_resource type="GradientTexture" id=3] +gradient = SubResource( 2 ) +width = 50 + +[sub_resource type="ParticlesMaterial" id=4] +lifetime_randomness = 1.0 +flag_disable_z = true +direction = Vector3( 0, -1, 0 ) +spread = 90.0 +gravity = Vector3( 0, 0, 0 ) +initial_velocity = 1000.0 +initial_velocity_random = 1.0 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +color = Color( 1, 0.882353, 0.0784314, 1 ) +color_ramp = SubResource( 3 ) +hue_variation = -0.01 +hue_variation_random = 1.0 + +[node name="Explosion" type="Particles2D"] +modulate = Color( 0.87451, 0.854902, 0.278431, 1 ) +material = SubResource( 1 ) +scale = Vector2( 0.2, 0.2 ) +lifetime = 1.5 +explosiveness = 1.0 +process_material = SubResource( 4 ) +texture = ExtResource( 1 ) +script = ExtResource( 2 ) + +[node name="Timer" type="Timer" parent="."] +wait_time = 1.5 +one_shot = true +autostart = true + +[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/Scenes/Effects/DarkExplosion.tscn b/Scenes/Effects/DarkExplosion.tscn new file mode 100644 index 0000000..d327d51 --- /dev/null +++ b/Scenes/Effects/DarkExplosion.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Assets/square.png" type="Texture" id=1] +[ext_resource path="res://Scripts/DarkExplosion.gd" type="Script" id=2] + +[sub_resource type="CanvasItemMaterial" id=5] + +[sub_resource type="ParticlesMaterial" id=4] +lifetime_randomness = 1.0 +flag_disable_z = true +direction = Vector3( 0, 0, 0 ) +spread = 180.0 +flatness = 1.0 +gravity = Vector3( 0, 0, 0 ) +initial_velocity = 1000.0 +initial_velocity_random = 0.76 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +color = Color( 0, 0, 0, 1 ) + +[node name="Boxplode" type="Particles2D"] +material = SubResource( 5 ) +scale = Vector2( 0.3, 0.3 ) +amount = 30 +lifetime = 1.5 +explosiveness = 1.0 +randomness = 1.0 +process_material = SubResource( 4 ) +texture = ExtResource( 1 ) +script = ExtResource( 2 ) + +[node name="Timer" type="Timer" parent="."] +wait_time = 1.5 +one_shot = true +autostart = true + +[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/Scenes/Effects/DeathExplosion.tscn b/Scenes/Effects/DeathExplosion.tscn new file mode 100644 index 0000000..a9151b7 --- /dev/null +++ b/Scenes/Effects/DeathExplosion.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://Assets/circle.png" type="Texture" id=1] +[ext_resource path="res://Scripts/DeathExplosion.gd" type="Script" id=2] + +[sub_resource type="CanvasItemMaterial" id=1] +blend_mode = 1 +particles_animation = true +particles_anim_h_frames = 1 +particles_anim_v_frames = 1 +particles_anim_loop = false + +[sub_resource type="Gradient" id=2] +colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 ) + +[sub_resource type="GradientTexture" id=3] +gradient = SubResource( 2 ) +width = 50 + +[sub_resource type="ParticlesMaterial" id=4] +lifetime_randomness = 1.0 +flag_disable_z = true +direction = Vector3( 0, -1, 0 ) +spread = 180.0 +gravity = Vector3( 0, 0, 0 ) +initial_velocity = 2000.0 +initial_velocity_random = 1.0 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +color_ramp = SubResource( 3 ) +hue_variation = -0.01 +hue_variation_random = 1.0 + +[node name="Explosion" type="Particles2D"] +material = SubResource( 1 ) +scale = Vector2( 0.2, 0.2 ) +amount = 50 +lifetime = 1.5 +explosiveness = 1.0 +process_material = SubResource( 4 ) +texture = ExtResource( 1 ) +script = ExtResource( 2 ) + +[node name="Timer" type="Timer" parent="."] +wait_time = 1.5 +one_shot = true +autostart = true + +[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/Scenes/Effects/Trail.tscn b/Scenes/Effects/Trail.tscn new file mode 100644 index 0000000..e3f3f81 --- /dev/null +++ b/Scenes/Effects/Trail.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Scripts/Trail.gd" type="Script" id=1] + +[sub_resource type="Curve" id=1] +_data = [ Vector2( 0, 0 ), 0.0, 0.0, 0, 0, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ] + +[sub_resource type="Gradient" id=2] +colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0 ) + +[node name="Trail" type="Line2D"] +visible = false +show_behind_parent = true +points = PoolVector2Array( 368, 144 ) +width = 40.0 +width_curve = SubResource( 1 ) +gradient = SubResource( 2 ) +script = ExtResource( 1 ) +length = 20 diff --git a/Scenes/HUD.tscn b/Scenes/HUD.tscn new file mode 100644 index 0000000..709ebc4 --- /dev/null +++ b/Scenes/HUD.tscn @@ -0,0 +1,186 @@ +[gd_scene load_steps=17 format=2] + +[ext_resource path="res://Fonts/Schluber.ttf" type="DynamicFontData" id=1] +[ext_resource path="res://Scripts/HUD.gd" type="Script" id=2] +[ext_resource path="res://Assets/square.png" type="Texture" id=3] +[ext_resource path="res://Assets/play_button.png" type="Texture" id=4] +[ext_resource path="res://Assets/replay_button.png" type="Texture" id=5] +[ext_resource path="res://Assets/Sounds/button.wav" type="AudioStream" id=6] +[ext_resource path="res://Assets/replay_button_pressed.png" type="Texture" id=7] +[ext_resource path="res://Assets/play_button_pressed.png" type="Texture" id=8] +[ext_resource path="res://Assets/play_button_hovered.png" type="Texture" id=9] +[ext_resource path="res://Assets/replay_button_hovered.png" type="Texture" id=10] +[ext_resource path="res://Assets/highscore.png" type="Texture" id=11] + +[sub_resource type="DynamicFont" id=1] +size = 90 +font_data = ExtResource( 1 ) + +[sub_resource type="StyleBoxTexture" id=2] +texture = ExtResource( 3 ) +region_rect = Rect2( 0, 0, 48, 48 ) + +[sub_resource type="StyleBoxTexture" id=3] +texture = ExtResource( 3 ) +region_rect = Rect2( 0, 0, 48, 48 ) +modulate_color = Color( 0, 0, 0, 1 ) + +[sub_resource type="Animation" id=4] +resource_name = "Animation" +length = 0.9 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("Highscore:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1 ), +"update": 0, +"values": [ Vector2( 0.5, 0.5 ), Vector2( 0.4, 0.4 ), Vector2( 0.3, 0.3 ), Vector2( 0.2, 0.2 ), Vector2( 0.1, 0.1 ), Vector2( 0.2, 0.2 ), Vector2( 0.3, 0.3 ), Vector2( 0.4, 0.4 ), Vector2( 0.5, 0.5 ) ] +} + +[sub_resource type="Animation" id=5] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Highscore:scale") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Vector2( 0.5, 0.5 ) ] +} + +[node name="HUD" type="CanvasLayer"] +script = ExtResource( 2 ) + +[node name="BackButton2" type="TextureButton" parent="."] +visible = false +margin_left = 40.0 +margin_top = 35.0 +margin_right = 120.0 +margin_bottom = 137.0 +texture_normal = ExtResource( 4 ) +texture_pressed = ExtResource( 8 ) +texture_hover = ExtResource( 9 ) +flip_h = true + +[node name="InstructionLabel" type="Label" parent="."] +visible = false +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -455.5 +margin_top = -1286.5 +margin_right = 455.5 +margin_bottom = 1286.5 +custom_fonts/font = SubResource( 1 ) +text = "hi" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": true +} + +[node name="EvadeLabel" type="Label" parent="."] +visible = false +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -288.0 +margin_top = -44.5 +margin_right = 288.0 +margin_bottom = 44.5 +custom_fonts/font = SubResource( 1 ) +text = "EVADE" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": true +} + +[node name="ScoreProgress" type="ProgressBar" parent="."] +visible = false +anchor_left = 0.5 +anchor_right = 0.5 +margin_left = -208.0 +margin_top = 56.0 +margin_right = 208.0 +margin_bottom = 86.0 +custom_colors/font_color = Color( 1, 1, 1, 0 ) +custom_styles/fg = SubResource( 2 ) +custom_styles/bg = SubResource( 3 ) +max_value = 8.0 +step = 1.0 + +[node name="Score" type="Label" parent="."] +visible = false +anchor_left = 0.5 +anchor_right = 0.5 +margin_left = -20.0 +margin_top = 35.0 +margin_right = 20.0 +margin_bottom = 124.0 +custom_fonts/font = SubResource( 1 ) +text = "0" + +[node name="EvadeTimer" type="Timer" parent="."] +wait_time = 2.0 +one_shot = true + +[node name="Buttons" type="HBoxContainer" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -106.0 +margin_top = -51.0 +margin_right = 106.0 +margin_bottom = 51.0 +custom_constants/separation = 30 +alignment = 1 + +[node name="RestartButton" type="TextureButton" parent="Buttons"] +margin_right = 102.0 +margin_bottom = 102.0 +texture_normal = ExtResource( 5 ) +texture_pressed = ExtResource( 7 ) +texture_hover = ExtResource( 10 ) + +[node name="BackButton" type="TextureButton" parent="Buttons"] +margin_left = 132.0 +margin_right = 212.0 +margin_bottom = 102.0 +texture_normal = ExtResource( 4 ) +texture_pressed = ExtResource( 8 ) +texture_hover = ExtResource( 9 ) +flip_h = true + +[node name="ButtonPress" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 6 ) +volume_db = -5.0 +pitch_scale = 3.0 + +[node name="Highscore" type="Sprite" parent="."] +visible = false +position = Vector2( 327, 35 ) +rotation = 0.324631 +scale = Vector2( 0.5, 0.5 ) +texture = ExtResource( 11 ) + +[node name="HighScoreAnmation" type="AnimationPlayer" parent="."] +anims/Animation = SubResource( 4 ) +anims/RESET = SubResource( 5 ) + +[connection signal="pressed" from="BackButton2" to="." method="_on_BackButton_pressed"] +[connection signal="timeout" from="EvadeTimer" to="." method="_on_MainMessageLabelTimer_timeout"] +[connection signal="pressed" from="Buttons/RestartButton" to="." method="_on_Button_pressed"] +[connection signal="pressed" from="Buttons/BackButton" to="." method="_on_BackButton_pressed"] diff --git a/Scenes/LeftnRight.tscn b/Scenes/LeftnRight.tscn new file mode 100644 index 0000000..24ba0dd --- /dev/null +++ b/Scenes/LeftnRight.tscn @@ -0,0 +1,86 @@ +[gd_scene load_steps=14 format=2] + +[ext_resource path="res://Scripts/Background.gd" type="Script" id=1] +[ext_resource path="res://Assets/Background.jpg" type="Texture" id=2] +[ext_resource path="res://Scenes/Characters/Player.tscn" type="PackedScene" id=3] +[ext_resource path="res://Assets/line.png" type="Texture" id=4] +[ext_resource path="res://Scripts/LeftRightPlayer.gd" type="Script" id=5] +[ext_resource path="res://Scripts/LeftnRight.gd" type="Script" id=6] +[ext_resource path="res://Assets/Sounds/new_best.wav" type="AudioStream" id=7] +[ext_resource path="res://Scenes/Timers.tscn" type="PackedScene" id=12] +[ext_resource path="res://Scenes/HUD.tscn" type="PackedScene" id=13] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 1, 1 ) + +[sub_resource type="OccluderPolygon2D" id=2] +polygon = PoolVector2Array( 50, 590, 45, 589, 40, 585, 39, 574, 40, 441, 42, 437, 46, 435, 50, 434, 54, 435, 58, 437, 60, 440, 60, 441, 61, 441, 60, 439, 56, 435, 49, 434, 44, 435, 40, 439, 39, 446, 39, 479, 39, 498, 39, 547, 39, 580, 41, 587, 46, 590, 53, 590, 58, 587, 60, 584 ) + +[sub_resource type="OccluderPolygon2D" id=3] +polygon = PoolVector2Array( 50, 590, 45, 589, 40, 585, 39, 574, 40, 441, 42, 437, 46, 435, 50, 434, 54, 435, 58, 437, 60, 440, 60, 441, 61, 441, 60, 439, 56, 435, 49, 434, 44, 435, 40, 439, 39, 446, 39, 479, 39, 498, 39, 547, 39, 580, 41, 587, 46, 590, 53, 590, 58, 587, 60, 584 ) + +[sub_resource type="Curve2D" id=4] +_data = { +"points": PoolVector2Array( 0, 0, 0, 0, -32, -84, 0, 0, 0, 0, 608, -92, 0, 0, 0, 0, 604, -86, 0, 0, 0, 0, -32, -84 ) +} + +[node name="LeftnRight" type="Node2D"] +script = ExtResource( 6 ) + +[node name="Background" type="Node2D" parent="."] +script = ExtResource( 1 ) + +[node name="CanvasModulate" type="CanvasModulate" parent="Background"] +color = Color( 0.278431, 0.211765, 0.211765, 1 ) + +[node name="Background" type="Sprite" parent="Background"] +modulate = Color( 0.32549, 0.341176, 0.823529, 1 ) +position = Vector2( 288, 512 ) +scale = Vector2( 0.411429, 0.411576 ) +texture = ExtResource( 2 ) + +[node name="Timers" parent="." instance=ExtResource( 12 )] + +[node name="HUD" parent="." instance=ExtResource( 13 )] + +[node name="Left Right Player" type="Node" parent="."] +script = ExtResource( 5 ) + +[node name="Player" parent="Left Right Player" instance=ExtResource( 3 )] +position = Vector2( 88, 512 ) + +[node name="StaticBody2D" type="StaticBody2D" parent="."] + +[node name="WallLeft" type="Sprite" parent="StaticBody2D"] +position = Vector2( 50, 512 ) +rotation = 1.5708 +scale = Vector2( 0.35, 0.4 ) +texture = ExtResource( 4 ) + +[node name="WallRight" type="Sprite" parent="StaticBody2D"] +position = Vector2( 525.665, 512 ) +rotation = 1.5708 +scale = Vector2( 0.35, 0.4 ) +texture = ExtResource( 4 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2( -48, 39 ) +shape = SubResource( 1 ) + +[node name="LightOccluder2D" type="LightOccluder2D" parent="StaticBody2D"] +occluder = SubResource( 2 ) + +[node name="LightOccluder2D2" type="LightOccluder2D" parent="StaticBody2D"] +position = Vector2( 575, 1024 ) +rotation = 3.14159 +occluder = SubResource( 3 ) + +[node name="EnemSpawnPath" type="Path2D" parent="."] +curve = SubResource( 4 ) + +[node name="EnemSpawnLocation" type="PathFollow2D" parent="EnemSpawnPath"] +position = Vector2( -32, -84 ) +rotation = -0.0125012 + +[node name="NewBest" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 7 ) diff --git a/Scenes/Levels.tscn b/Scenes/Levels.tscn new file mode 100644 index 0000000..3be7d8f --- /dev/null +++ b/Scenes/Levels.tscn @@ -0,0 +1,289 @@ +[gd_scene load_steps=21 format=2] + +[ext_resource path="res://Scripts/Background.gd" type="Script" id=1] +[ext_resource path="res://Assets/Background.jpg" type="Texture" id=2] +[ext_resource path="res://Fonts/Schluber.ttf" type="DynamicFontData" id=3] +[ext_resource path="res://Assets/circle.png" type="Texture" id=4] +[ext_resource path="res://Themes/PressedBtn.tres" type="StyleBox" id=5] +[ext_resource path="res://Themes/NormalBtn.tres" type="StyleBox" id=6] +[ext_resource path="res://Scripts/Levels.gd" type="Script" id=7] +[ext_resource path="res://Assets/light.png" type="Texture" id=8] +[ext_resource path="res://Scripts/MainPlayer.gd" type="Script" id=9] +[ext_resource path="res://Assets/play_button.png" type="Texture" id=10] +[ext_resource path="res://Assets/play_button_pressed.png" type="Texture" id=11] +[ext_resource path="res://Assets/play_button_hovered.png" type="Texture" id=12] +[ext_resource path="res://Assets/Cleared.png" type="Texture" id=13] + +[sub_resource type="DynamicFont" id=1] +size = 90 +font_data = ExtResource( 3 ) + +[sub_resource type="CanvasItemMaterial" id=2] +blend_mode = 1 + +[sub_resource type="DynamicFont" id=3] +size = 60 +font_data = ExtResource( 3 ) + +[sub_resource type="CanvasItemMaterial" id=4] +blend_mode = 1 + +[sub_resource type="DynamicFont" id=5] +size = 60 +font_data = ExtResource( 3 ) + +[sub_resource type="PhysicsMaterial" id=6] +friction = 0.0 +bounce = 1.0 + +[sub_resource type="CircleShape2D" id=7] +radius = 27.0 + +[node name="Levels" type="Node2D"] +script = ExtResource( 7 ) + +[node name="Background" type="Node2D" parent="."] +script = ExtResource( 1 ) + +[node name="CanvasModulate" type="CanvasModulate" parent="Background"] +color = Color( 0.278431, 0.211765, 0.211765, 1 ) + +[node name="Background" type="Sprite" parent="Background"] +modulate = Color( 0.32549, 0.341176, 0.823529, 1 ) +position = Vector2( 288, 512 ) +scale = Vector2( 0.411429, 0.411576 ) +texture = ExtResource( 2 ) + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -288.0 +margin_top = -512.0 +margin_right = 288.0 +margin_bottom = 512.0 + +[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer/MarginContainer"] +margin_right = 576.0 +margin_bottom = 1024.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/MarginContainer/CenterContainer"] +margin_left = 63.0 +margin_top = 160.0 +margin_right = 513.0 +margin_bottom = 864.0 +custom_constants/separation = 10 + +[node name="TitleContainer" type="MarginContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer"] +margin_right = 450.0 +margin_bottom = 114.0 +custom_constants/margin_bottom = 25 + +[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/TitleContainer"] +margin_right = 450.0 +margin_bottom = 89.0 + +[node name="Label" type="Label" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/TitleContainer/CenterContainer"] +margin_left = 125.0 +margin_right = 325.0 +margin_bottom = 89.0 +custom_fonts/font = SubResource( 1 ) +text = "LEVELS" + +[node name="LevelsContainer" type="MarginContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer"] +margin_top = 124.0 +margin_right = 450.0 +margin_bottom = 208.0 +custom_constants/margin_top = 25 + +[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer"] +margin_top = 25.0 +margin_right = 450.0 +margin_bottom = 84.0 + +[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer"] +margin_right = 450.0 +margin_bottom = 59.0 +custom_constants/separation = 50 + +[node name="Level1" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer"] +material = SubResource( 2 ) +margin_right = 200.0 +margin_bottom = 59.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.0196078, 0.52549, 0.835294, 1 ) +custom_fonts/font = SubResource( 3 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 5 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +toggle_mode = true +text = "01 slide" + +[node name="ClearedLvl1" type="Sprite" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer/Level1"] +visible = false +position = Vector2( 17, 0 ) +rotation = -0.349066 +scale = Vector2( 0.4, 0.4 ) +texture = ExtResource( 13 ) + +[node name="Level2" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer"] +material = SubResource( 2 ) +margin_left = 250.0 +margin_right = 450.0 +margin_bottom = 59.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.0196078, 0.52549, 0.835294, 1 ) +custom_fonts/font = SubResource( 3 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 5 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +toggle_mode = true +text = "02 spin" + +[node name="ClearedLvl2" type="Sprite" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer/Level2"] +visible = false +position = Vector2( 17, 0 ) +rotation = -0.349066 +scale = Vector2( 0.4, 0.4 ) +texture = ExtResource( 13 ) + +[node name="Difficulty Container" type="MarginContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer"] +margin_top = 218.0 +margin_right = 450.0 +margin_bottom = 704.0 +custom_constants/margin_top = 100 + +[node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container"] +margin_top = 100.0 +margin_right = 450.0 +margin_bottom = 486.0 +rect_min_size = Vector2( 0, 386 ) +custom_constants/separation = 50 + +[node name="Easy" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer"] +modulate = Color( 0.372549, 0.858824, 0.419608, 1 ) +material = SubResource( 4 ) +margin_right = 450.0 +margin_bottom = 59.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.984314, 0.984314, 0.984314, 0.188235 ) +custom_fonts/font = SubResource( 5 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 5 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +text = "Easy" + +[node name="Medium" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer"] +modulate = Color( 0.870588, 0.847059, 0.458824, 1 ) +material = SubResource( 4 ) +margin_top = 109.0 +margin_right = 450.0 +margin_bottom = 168.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.984314, 0.984314, 0.984314, 0.188235 ) +custom_fonts/font = SubResource( 5 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 5 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +text = "Medium" + +[node name="Hard" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer"] +modulate = Color( 0.94902, 0.0980392, 0.0980392, 1 ) +material = SubResource( 4 ) +margin_top = 218.0 +margin_right = 450.0 +margin_bottom = 277.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.984314, 0.984314, 0.984314, 0.188235 ) +custom_fonts/font = SubResource( 5 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 5 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +text = "Hard" + +[node name="Endless" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer"] +visible = false +modulate = Color( 1, 0, 0, 1 ) +material = SubResource( 4 ) +margin_top = 327.0 +margin_right = 450.0 +margin_bottom = 386.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.984314, 0.984314, 0.984314, 0.188235 ) +custom_fonts/font = SubResource( 5 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 5 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +text = "Endless" + +[node name="BackButton" type="TextureButton" parent="CanvasLayer"] +margin_left = 50.0 +margin_top = 50.0 +margin_right = 80.0 +margin_bottom = 102.0 +rect_scale = Vector2( 0.5, 0.5 ) +texture_normal = ExtResource( 10 ) +texture_pressed = ExtResource( 11 ) +texture_hover = ExtResource( 12 ) +flip_h = true + +[node name="SampleMainPlayer" type="Node" parent="."] + +[node name="Player" type="RigidBody2D" parent="SampleMainPlayer"] +position = Vector2( 288, 480 ) +mass = 0.00102041 +physics_material_override = SubResource( 6 ) +gravity_scale = 0.0 +linear_damp = 0.0 +angular_damp = 0.0 +script = ExtResource( 9 ) + +[node name="Sprite" type="Sprite" parent="SampleMainPlayer/Player"] +position = Vector2( 0, 3 ) +texture = ExtResource( 4 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="SampleMainPlayer/Player"] +position = Vector2( 0, 3 ) +shape = SubResource( 7 ) + +[node name="Light2D" type="Light2D" parent="SampleMainPlayer/Player"] +position = Vector2( 0, 3 ) +texture = ExtResource( 8 ) +shadow_enabled = true +shadow_gradient_length = 1.0 +shadow_filter = 2 +shadow_filter_smooth = 20.0 + +[node name="Walls" type="StaticBody2D" parent="SampleMainPlayer"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="SampleMainPlayer/Walls"] +polygon = PoolVector2Array( 0, 0, 576, 0, 576, 1024, 0, 1024, 0, 32, -16, 48, -16, 1040, 592, 1040, 592, -16, -16, -16, -16, 32, 0, 32 ) + +[connection signal="toggled" from="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer/Level1" to="." method="_on_Level1_toggled"] +[connection signal="toggled" from="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer/Level2" to="." method="_on_Level2_toggled"] +[connection signal="pressed" from="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer/Easy" to="." method="_on_Easy_pressed"] +[connection signal="pressed" from="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer/Medium" to="." method="_on_Medium_pressed"] +[connection signal="pressed" from="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer/Hard" to="." method="_on_Hard_pressed"] +[connection signal="pressed" from="CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer/Endless" to="." method="_on_Endless_pressed"] +[connection signal="pressed" from="CanvasLayer/BackButton" to="." method="_on_BackButton_pressed"] diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn new file mode 100644 index 0000000..c33b7bd --- /dev/null +++ b/Scenes/Main.tscn @@ -0,0 +1,214 @@ +[gd_scene load_steps=16 format=2] + +[ext_resource path="res://Scripts/MainPlayer.gd" type="Script" id=1] +[ext_resource path="res://Fonts/Schluber.ttf" type="DynamicFontData" id=2] +[ext_resource path="res://Themes/PressedBtn.tres" type="StyleBox" id=3] +[ext_resource path="res://Assets/circle.png" type="Texture" id=4] +[ext_resource path="res://Assets/light.png" type="Texture" id=5] +[ext_resource path="res://Themes/NormalBtn.tres" type="StyleBox" id=6] +[ext_resource path="res://Assets/Background.jpg" type="Texture" id=7] +[ext_resource path="res://Scripts/Main.gd" type="Script" id=8] +[ext_resource path="res://Scripts/Background.gd" type="Script" id=9] +[ext_resource path="res://Assets/Sounds/button.wav" type="AudioStream" id=10] + +[sub_resource type="PhysicsMaterial" id=6] +friction = 0.0 +bounce = 1.0 + +[sub_resource type="CircleShape2D" id=5] +radius = 27.0 + +[sub_resource type="DynamicFont" id=4] +size = 90 +font_data = ExtResource( 2 ) + +[sub_resource type="CanvasItemMaterial" id=1] +blend_mode = 1 + +[sub_resource type="DynamicFont" id=2] +size = 60 +font_data = ExtResource( 2 ) + +[node name="Menu" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 8 ) + +[node name="Background" type="Node2D" parent="."] +script = ExtResource( 9 ) + +[node name="CanvasModulate" type="CanvasModulate" parent="Background"] +color = Color( 0.278431, 0.211765, 0.211765, 1 ) + +[node name="Background" type="Sprite" parent="Background"] +modulate = Color( 0.32549, 0.341176, 0.823529, 1 ) +position = Vector2( 288, 512 ) +scale = Vector2( 0.411429, 0.411576 ) +texture = ExtResource( 7 ) + +[node name="Player" type="RigidBody2D" parent="."] +position = Vector2( 288, 480 ) +mass = 0.00102041 +physics_material_override = SubResource( 6 ) +gravity_scale = 0.0 +linear_damp = 0.0 +angular_damp = 0.0 +script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="Player"] +position = Vector2( 0, 3 ) +texture = ExtResource( 4 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"] +position = Vector2( 0, 3 ) +shape = SubResource( 5 ) + +[node name="Light2D" type="Light2D" parent="Player"] +position = Vector2( 0, 3 ) +texture = ExtResource( 5 ) +shadow_enabled = true +shadow_gradient_length = 1.0 +shadow_filter = 2 +shadow_filter_smooth = 20.0 + +[node name="Walls" type="StaticBody2D" parent="."] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Walls"] +polygon = PoolVector2Array( 0, 0, 576, 0, 576, 1024, 0, 1024, 0, 32, -16, 48, -16, 1040, 592, 1040, 592, -16, -16, -16, -16, 32, 0, 32 ) + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +custom_constants/margin_right = 50 +custom_constants/margin_top = 150 +custom_constants/margin_left = 50 + +[node name="CenterContainer" type="PanelContainer" parent="CanvasLayer/MarginContainer"] +self_modulate = Color( 1, 1, 1, 0 ) +margin_left = 50.0 +margin_top = 150.0 +margin_right = 526.0 +margin_bottom = 1024.0 + +[node name="VSplitContainer" type="VSplitContainer" parent="CanvasLayer/MarginContainer/CenterContainer"] +margin_left = 7.0 +margin_top = 7.0 +margin_right = 469.0 +margin_bottom = 867.0 + +[node name="TitleVBox" type="VBoxContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer"] +margin_right = 462.0 +margin_bottom = 89.0 + +[node name="TitleContainer" type="CenterContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/TitleVBox"] +margin_right = 462.0 +margin_bottom = 89.0 + +[node name="Game Title" type="Label" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/TitleVBox/TitleContainer"] +margin_left = 62.0 +margin_right = 399.0 +margin_bottom = 89.0 +custom_colors/font_color_shadow = Color( 0.027451, 0.027451, 0.027451, 1 ) +custom_constants/shadow_offset_x = 3 +custom_constants/line_spacing = 6 +custom_constants/shadow_offset_y = 3 +custom_fonts/font = SubResource( 4 ) +text = "CirclEvade" + +[node name="MarginContainer" type="MarginContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer"] +margin_top = 101.0 +margin_right = 462.0 +margin_bottom = 860.0 +custom_constants/margin_top = 100 + +[node name="ButtonVBox" type="VBoxContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer"] +margin_top = 100.0 +margin_right = 462.0 +margin_bottom = 759.0 + +[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox"] +margin_right = 462.0 +margin_bottom = 356.0 + +[node name="ButtonContainer" type="VBoxContainer" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer"] +margin_left = 131.0 +margin_right = 331.0 +margin_bottom = 356.0 +rect_min_size = Vector2( 200, 0 ) +custom_constants/separation = 40 +alignment = 1 + +[node name="EndlessBtn" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer/ButtonContainer"] +material = SubResource( 1 ) +margin_right = 200.0 +margin_bottom = 59.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.984314, 0.984314, 0.984314, 0.188235 ) +custom_fonts/font = SubResource( 2 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 3 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +text = "endless" + +[node name="LevelsBtn" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer/ButtonContainer"] +material = SubResource( 1 ) +margin_top = 99.0 +margin_right = 200.0 +margin_bottom = 158.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.984314, 0.984314, 0.984314, 0.188235 ) +custom_fonts/font = SubResource( 2 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 3 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +text = "levels" + +[node name="OptionsButton" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer/ButtonContainer"] +material = SubResource( 1 ) +margin_top = 198.0 +margin_right = 200.0 +margin_bottom = 257.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.984314, 0.984314, 0.984314, 0.188235 ) +custom_fonts/font = SubResource( 2 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 3 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +text = "Options" + +[node name="QuitButton" type="Button" parent="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer/ButtonContainer"] +material = SubResource( 1 ) +margin_top = 297.0 +margin_right = 200.0 +margin_bottom = 356.0 +rect_min_size = Vector2( 200, 0 ) +custom_colors/font_color_hover = Color( 1, 1, 1, 0.666667 ) +custom_colors/font_color_pressed = Color( 0.984314, 0.984314, 0.984314, 0.188235 ) +custom_fonts/font = SubResource( 2 ) +custom_styles/hover = ExtResource( 6 ) +custom_styles/pressed = ExtResource( 3 ) +custom_styles/focus = ExtResource( 6 ) +custom_styles/disabled = ExtResource( 6 ) +custom_styles/normal = ExtResource( 6 ) +text = "Quit" + +[node name="ButtonPress" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 10 ) +volume_db = -10.0 +pitch_scale = 3.0 + +[connection signal="pressed" from="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer/ButtonContainer/EndlessBtn" to="." method="_on_EndlessBtn_pressed"] +[connection signal="pressed" from="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer/ButtonContainer/LevelsBtn" to="." method="_on_StartButton_pressed"] +[connection signal="pressed" from="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer/ButtonContainer/OptionsButton" to="." method="_on_OptionsButton_pressed"] +[connection signal="pressed" from="CanvasLayer/MarginContainer/CenterContainer/VSplitContainer/MarginContainer/ButtonVBox/CenterContainer/ButtonContainer/QuitButton" to="." method="_on_QuitButton_pressed"] diff --git a/Scenes/Options.tscn b/Scenes/Options.tscn new file mode 100644 index 0000000..04547a9 --- /dev/null +++ b/Scenes/Options.tscn @@ -0,0 +1,91 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://Assets/square.png" type="Texture" id=1] +[ext_resource path="res://Fonts/Schluber.ttf" type="DynamicFontData" id=2] +[ext_resource path="res://Scripts/Options.gd" type="Script" id=3] + +[sub_resource type="DynamicFont" id=2] +size = 90 +font_data = ExtResource( 2 ) + +[sub_resource type="DynamicFont" id=3] +size = 45 +font_data = ExtResource( 2 ) + +[node name="Options" type="Node2D"] +script = ExtResource( 3 ) +__meta__ = { +"_edit_horizontal_guides_": [ 0.0 ] +} + +[node name="Overlay" type="Sprite" parent="."] +modulate = Color( 0, 0, 0, 0.490196 ) +position = Vector2( 286, 510 ) +scale = Vector2( 12.0833, 21.4167 ) +texture = ExtResource( 1 ) + +[node name="OptionsOverlay" type="Sprite" parent="."] +modulate = Color( 0, 0, 0, 0.835294 ) +position = Vector2( 302, 494 ) +scale = Vector2( 8.08333, 16.0833 ) +texture = ExtResource( 1 ) + +[node name="OptionLayer" type="CanvasLayer" parent="."] + +[node name="Title" type="Label" parent="OptionLayer"] +margin_left = 172.0 +margin_top = 208.0 +margin_right = 416.0 +margin_bottom = 297.0 +custom_fonts/font = SubResource( 2 ) +text = "options" + +[node name="OptionsController" type="Control" parent="OptionLayer"] +margin_right = 40.0 +margin_bottom = 40.0 + +[node name="Volume" type="Label" parent="OptionLayer/OptionsController"] +margin_left = 144.0 +margin_top = 352.0 +margin_right = 302.0 +margin_bottom = 411.0 +custom_fonts/font = SubResource( 3 ) +text = "Volume" + +[node name="VolumeSlider" type="HSlider" parent="OptionLayer/OptionsController"] +margin_left = 288.0 +margin_top = 336.0 +margin_right = 432.0 +margin_bottom = 400.0 +rect_pivot_offset = Vector2( 80, 32 ) +min_value = 1.0 +value = 1.0 + +[node name="Difficulty" type="Label" parent="OptionLayer/OptionsController"] +margin_left = 144.0 +margin_top = 464.0 +margin_right = 302.0 +margin_bottom = 523.0 +custom_fonts/font = SubResource( 3 ) +text = "Difficulty" + +[node name="DifficultySlider" type="HSlider" parent="OptionLayer/OptionsController"] +margin_left = 320.0 +margin_top = 448.0 +margin_right = 432.0 +margin_bottom = 512.0 +rect_pivot_offset = Vector2( 80, 32 ) +min_value = 1.0 +max_value = 3.0 +value = 1.0 + +[node name="Button" type="Button" parent="OptionLayer"] +margin_left = 256.0 +margin_top = 768.0 +margin_right = 356.0 +margin_bottom = 819.0 +custom_fonts/font = SubResource( 3 ) +text = "close" + +[connection signal="value_changed" from="OptionLayer/OptionsController/DifficultySlider" to="." method="_on_DifficultySlider_value_changed"] +[connection signal="pressed" from="OptionLayer/Button" to="." method="_on_Button_pressed"] diff --git a/Scenes/Timers.tscn b/Scenes/Timers.tscn new file mode 100644 index 0000000..afc646b --- /dev/null +++ b/Scenes/Timers.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Scripts/Timers.gd" type="Script" id=1] + +[node name="Timers" type="Node"] +script = ExtResource( 1 ) + +[node name="EnemTimer" type="Timer" parent="."] +autostart = true + +[node name="BonuTimer" type="Timer" parent="."] +wait_time = 2.0 +autostart = true + +[connection signal="timeout" from="EnemTimer" to="." method="_on_EnemTimer_timeout"] +[connection signal="timeout" from="BonuTimer" to="." method="_on_BonuTimer_timeout"] diff --git a/Scripts/Background.gd b/Scripts/Background.gd new file mode 100644 index 0000000..6eac273 --- /dev/null +++ b/Scripts/Background.gd @@ -0,0 +1,11 @@ +extends Node2D + + +func _process(delta): + $Background.modulate.h += delta * 0.1 + + global.h = $Background.modulate.h + + +func _on_circlspin_pressed(): + pass # Replace with function body. diff --git a/Scripts/Bonus.gd b/Scripts/Bonus.gd new file mode 100644 index 0000000..d4b15ca --- /dev/null +++ b/Scripts/Bonus.gd @@ -0,0 +1,41 @@ +extends Area2D + + +export var gravity_vertical := -100.0 +export var gravity_horizontal := 0 + +const UP := Vector2.UP +var velocity := Vector2.ZERO +var initial_pos := Vector2.ZERO + +var rng := RandomNumberGenerator.new() + +onready var animation_player := $AnimationPlayer + +func _ready() -> void: + rng.randomize() + position.x = rng.randf_range(100.0, 500.0) + position.y = rng.randf_range(1040.0, 1150.0) + initial_pos = Vector2(position.x, position.y) + + gravity_horizontal = -10 + + animation_player.play("Spin") + + +func _process(delta: float) -> void: + + velocity.y += gravity_vertical * delta + velocity.x += gravity_horizontal * delta + + + position = Vector2(velocity.x, velocity.y) + initial_pos + + +func _on_VisibilityNotifier2D_viewport_exited(viewport): + queue_free() + + +func _on_Bonus_area_entered(area): + + queue_free() diff --git a/Scripts/BonusEFfect.gd b/Scripts/BonusEFfect.gd new file mode 100644 index 0000000..5909ad2 --- /dev/null +++ b/Scripts/BonusEFfect.gd @@ -0,0 +1,16 @@ +extends Particles2D + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/Scripts/BonusEffect.gd b/Scripts/BonusEffect.gd new file mode 100644 index 0000000..bdaa61f --- /dev/null +++ b/Scripts/BonusEffect.gd @@ -0,0 +1,8 @@ +extends Particles2D + +func _ready(): + one_shot = true + + +func _on_Timer_timeout(): + queue_free() diff --git a/Scripts/CirclePlayer.gd b/Scripts/CirclePlayer.gd new file mode 100644 index 0000000..61b27b3 --- /dev/null +++ b/Scripts/CirclePlayer.gd @@ -0,0 +1,38 @@ +extends Node + + +var d := 0.0 +export var radius = 200.0 +export var speed = 2 +var s = 1 + +func _ready(): + global.started = false + + +func _unhandled_input(event): + if event is InputEventScreenTouch: + s *= -1 + +func _process(delta: float) -> void: + d += s * delta + + #if Input.is_action_just_pressed("switch"): + # s *= -1 + if global.difficulty <= 3: + $Player.position = Vector2( + sin(d * speed * (0.75 + 0.25*(global.difficulty-1)*(global.difficulty-1))) * radius, + cos(d * speed * (0.75 + 0.25*(global.difficulty-1)*(global.difficulty-1))) * radius + ) + Vector2(288, 512) + + else: + if global.started: + speed += 0.000025 + $Player.position = Vector2( + sin(d * speed) * radius, + cos(d * speed) * radius + ) + Vector2(288, 512) + +func _reset_speed(): + speed = 2 + diff --git a/Scripts/CircleSpin.gd b/Scripts/CircleSpin.gd new file mode 100644 index 0000000..162711d --- /dev/null +++ b/Scripts/CircleSpin.gd @@ -0,0 +1,23 @@ +extends "res://Scripts/Game.gd" + +func _ready(): + $HUD/InstructionLabel.text = "Hold to Turn" + $HUD/InstructionLabel.show() + global.gravity = -1 + + if global.difficulty <= 3: + $Timers/EnemTimer.wait_time -= 0.02 + + +func _on_HUD_restart(): + $Timers._start_bonu_timer() + + $HUD.update_score(0) + + $HUD/EvadeLabel.show() + yield(get_tree().create_timer(1.5), "timeout") + $HUD/EvadeLabel.hide() + + $Timers._start_enem_timer() + $"Circle Player"._reset_speed() + $"Circle Player/Player".start() diff --git a/Scripts/DarkExplosion.gd b/Scripts/DarkExplosion.gd new file mode 100644 index 0000000..bdaa61f --- /dev/null +++ b/Scripts/DarkExplosion.gd @@ -0,0 +1,8 @@ +extends Particles2D + +func _ready(): + one_shot = true + + +func _on_Timer_timeout(): + queue_free() diff --git a/Scripts/DeathExplosion.gd b/Scripts/DeathExplosion.gd new file mode 100644 index 0000000..bdaa61f --- /dev/null +++ b/Scripts/DeathExplosion.gd @@ -0,0 +1,8 @@ +extends Particles2D + +func _ready(): + one_shot = true + + +func _on_Timer_timeout(): + queue_free() diff --git a/Scripts/Enemy.gd b/Scripts/Enemy.gd new file mode 100644 index 0000000..13b6706 --- /dev/null +++ b/Scripts/Enemy.gd @@ -0,0 +1,39 @@ +#extends KinematicBody2D +extends RigidBody2D + +var gravity_vertical = 200.0 * global.gravity +var gravity_horizontal := rand_range(-80.0, 10.0) +export var rotation_speed := 100.0 + +const UP := Vector2.UP +var velocity := Vector2.ZERO +var initial_pos := Vector2.ZERO + +var rng := RandomNumberGenerator.new() + +func _ready() -> void: +# rng.randomize() +# position.x = rng.randf_range(130.0, 730.0) +# position.y = rng.randf_range(1080.0, 1250.0) +# initial_pos = Vector2(position.x, position.y) + pass + +func _process(delta: float) -> void: + rng.randomize() + if global.difficulty < 4 or global.previous_velocity == 0: + velocity.y = rng.randf_range(gravity_vertical, gravity_vertical+(50*global.gravity)) * delta * global.difficulty + if global.difficulty == 4: + velocity.y = gravity_vertical * delta + else: + velocity.y = global.previous_velocity + (0.05 * global.gravity) + + velocity.x = gravity_horizontal * delta + + + position += Vector2(velocity.x, velocity.y) + + +func _on_VisibilityNotifier2D_screen_exited(): + global.previous_velocity = velocity.y + $"../Timers"._update_timers() + queue_free() diff --git a/Scripts/Game.gd b/Scripts/Game.gd new file mode 100644 index 0000000..a528a28 --- /dev/null +++ b/Scripts/Game.gd @@ -0,0 +1,117 @@ +extends Node2D + +export (PackedScene) var enemy_scene = load("res://Scenes/Characters/Enemy.tscn") +export (PackedScene) var bonus_scene = load("res://Scenes/Characters/Bonus.tscn") +export (PackedScene) var enemy_explosion = load("res://Scenes/Effects/DarkExplosion.tscn") +export (PackedScene) var bonus_explosion = load("res://Scenes/Effects/BonusEffect.tscn") + +var first_run = true + +func _ready(): + randomize() + $Background/Background.modulate.h = global.h + + $Timers._stop_enem_timer() + $Timers._stop_bonu_timer() + +func _unhandled_input(event): + if event is InputEventScreenTouch and first_run: + first_run = false + $Timers._start_enem_timer() + $Timers._start_bonu_timer() + yield(get_tree().create_timer(1), "timeout") + $HUD/InstructionLabel.hide() + global.started = true + $HUD/EvadeLabel.show() + yield(get_tree().create_timer(2), "timeout") + $HUD/EvadeLabel.hide() + + + +func new_game(): + $Player.points = 0 + $Player.start() + $Timers._start_enem_timer() + $Timers._start_bonu_timer() + + +func game_over(): + $Timers._stop_enem_timer() + $Timers._stop_bonu_timer() + + +func _on_EnemyTimer_timeout(): + var enemy = enemy_scene.instance() + add_child(enemy) + var spawn_location = $EnemSpawnPath/EnemSpawnLocation + spawn_location.unit_offset = rand_range(0, 1.1) + enemy.position = spawn_location.position + + + + +func _on_BonusTimer_timeout(): + + var bonus = bonus_scene.instance() + add_child(bonus) + bonus.scale = Vector2(0.2, 0.2) + + +func _on_Player_hit(): + game_over() + if global.difficulty == 4: + var score_file = "user://score.save" + var f = File.new() + var highscore: int = 0 + + if f.file_exists(score_file): + f.open(score_file, File.READ) + highscore = f.get_var() + print(highscore) + f.close() + + if int($HUD/Score.text) > highscore: + f.open(score_file, File.WRITE) + highscore = int($HUD/Score.text) + f.store_var(highscore) + f.close() + + $HUD._show_highscore() + $NewBest.play() + + else: + f.open(score_file, File.WRITE) + print(f) + highscore = int($HUD/Score.text) + f.store_var(highscore) + f.close() + + $HUD.show_restart() + + +func _on_Player_win(): + var deletions = [] + $Timers._stop_enem_timer() + $Timers._stop_bonu_timer() + for i in get_children(): + if "Enemy" in i.name: + var explosion = enemy_explosion.instance() + add_child(explosion) + explosion.rotation_degrees = i.velocity.x + i.velocity.y + explosion.position = i.position + deletions.append(i) + + elif "Bonus" in i.name: + var explosion = bonus_explosion.instance() + add_child(explosion) + explosion.position = i.position + deletions.append(i) + + for i in deletions: + i.queue_free() + + $HUD.show_win() + $NewBest.play() + + + diff --git a/Scripts/HUD.gd b/Scripts/HUD.gd new file mode 100644 index 0000000..6c285fe --- /dev/null +++ b/Scripts/HUD.gd @@ -0,0 +1,99 @@ +extends CanvasLayer + +signal restart +export (PackedScene) var Explosion + +onready var evade_label = $EvadeLabel +onready var progress_bar = $ScoreProgress +#onready var restart_btn = $RestartButton +#onready var back_btn = $BackButton +onready var buttons = $Buttons +onready var score = $Score + +func _ready(): + connect("restart", get_parent(), '_on_HUD_restart') + progress_bar.value = 0 + progress_bar.show() + score.text = "0" + score.hide() + + if global.difficulty == 1: + progress_bar.max_value = 9 + + elif global.difficulty == 2: + progress_bar.max_value = 15 + + elif global.difficulty == 3: + progress_bar.max_value = 18 + + elif global.difficulty == 4: + progress_bar.hide() + score.show() + + +# restart_btn.hide() +# back_btn.hide() + buttons.hide() + $InstructionLabel.hide() + $Highscore.hide() + + +func _show_highscore(): + $Highscore.show() + $HighScoreAnmation.play("Animation") + +func update_score(points): + progress_bar.value += 1 + score.text = str(points) + + +func show_win(): + evade_label.show() + evade_label.text = "You Win" + evade_label.modulate = "000000" + $BackButton2.show() + + + if global.difficulty < 4: + progress_bar.hide() + else: + score.hide() + + +func show_restart(): + evade_label.hide() + $InstructionLabel.hide() +# restart_btn.show() +# back_btn.show() + buttons.show() + + +func _on_EvadeLabelTimer_timeout(): + evade_label.hide() + + +func _on_Button_pressed(): +# restart_btn.hide() +# back_btn.hide() + buttons.hide() + if !$ButtonPress.playing: + $ButtonPress.play() + + if global.difficulty < 4: + progress_bar.show() + + else: + score.show() + + emit_signal("restart") + $Highscore.hide() + global.previous_velocity = 0 + + progress_bar.value = 0 + + +func _on_BackButton_pressed(): + if !$ButtonPress.playing: + $ButtonPress.play() + + get_tree().change_scene("res://Scenes/Levels.tscn") diff --git a/Scripts/LeftRightPlayer.gd b/Scripts/LeftRightPlayer.gd new file mode 100644 index 0000000..b566e0c --- /dev/null +++ b/Scripts/LeftRightPlayer.gd @@ -0,0 +1,28 @@ +extends Node + +export var speed = 5 +export var direction = 1 + +export var limits = 200 + +func _ready(): + $Player.position = Vector2(288, 512) + + +func _physics_process(delta): + $Player.position = Vector2($Player.position.x + (speed*(0.25+global.difficulty) * direction), $Player.position.y) + if $Player.position.x > 288+limits or $Player.position.x < 288-limits: + change_direction() + if $Player.position.x > 288+limits: + $Player.position.x = 286+limits + if $Player.position.x < 288-limits: + $Player.position.x = 290-limits + +# if Input.is_action_pressed("switch"): +# print(get_viewport().get_mouse_position()) +func _unhandled_input(event): + if event is InputEventScreenTouch && event.is_pressed(): + change_direction() + +func change_direction(): + direction *= -1 diff --git a/Scripts/LeftnRight.gd b/Scripts/LeftnRight.gd new file mode 100644 index 0000000..c11d5d9 --- /dev/null +++ b/Scripts/LeftnRight.gd @@ -0,0 +1,21 @@ +extends "res://Scripts/Game.gd" + +func _ready(): + + $HUD/InstructionLabel.text = "Tap to Turn" + $HUD/InstructionLabel.show() + + $Timers/EnemTimer.wait_time += 0.3 + global.gravity = 1 + +func _on_HUD_restart(): + $Timers._start_bonu_timer() + $HUD.update_score(0) + + $HUD/EvadeLabel.show() + yield(get_tree().create_timer(1.5), "timeout") + $HUD/EvadeLabel.hide() + + $Timers._start_enem_timer() + $"Left Right Player/Player".start() + diff --git a/Scripts/Levels.gd b/Scripts/Levels.gd new file mode 100644 index 0000000..3d93b02 --- /dev/null +++ b/Scripts/Levels.gd @@ -0,0 +1,89 @@ +extends Node2D + +onready var endless_btn = $"CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/Difficulty Container/VBoxContainer/Endless" +var selected_level : int = 0 + +onready var spinlvl_btn = $"CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer/Level2" +onready var slidelvl_btn = $"CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer/Level1" + +onready var clearedlvl1 = $CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer/Level1/ClearedLvl1 +onready var clearedlvl2 = $CanvasLayer/MarginContainer/CenterContainer/VBoxContainer/LevelsContainer/CenterContainer/HBoxContainer/Level2/ClearedLvl2 + + +func _ready(): + + clearedlvl1.hide() + clearedlvl2.hide() + + if global.difficulty != 4: + var score_file = "user://levels.save" + var f = File.new() + var level1: bool = false + var level2: bool = false + + if f.file_exists(score_file): + f.open(score_file, File.READ) + level1 = f.get_var() + level2 = f.get_var() + if level1: + clearedlvl1.show() + if level2: + clearedlvl2.show() + f.close() + +func _process(delta): + endless_btn.modulate.h += delta + + +func _on_Level1_toggled(button_pressed): + + if button_pressed: + selected_level = 1 + spinlvl_btn.pressed = false + + + +func _on_Level2_toggled(button_pressed): + if !button_pressed: + endless_btn.hide() + + if button_pressed: + slidelvl_btn.pressed = false + selected_level = 2 + endless_btn.show() + + + +func _on_Easy_pressed(): + global.difficulty = 1 + if selected_level == 1: + get_tree().change_scene("res://Scenes/LeftnRight.tscn") + elif selected_level == 2: + get_tree().change_scene("res://Scenes/CircleSpin.tscn") + + +func _on_Medium_pressed(): + global.difficulty = 2 + if selected_level == 1: + get_tree().change_scene("res://Scenes/LeftnRight.tscn") + elif selected_level == 2: + get_tree().change_scene("res://Scenes/CircleSpin.tscn") + + +func _on_Hard_pressed(): + global.difficulty = 3 + + if selected_level == 1: + get_tree().change_scene("res://Scenes/LeftnRight.tscn") + elif selected_level == 2: + get_tree().change_scene("res://Scenes/CircleSpin.tscn") + + +func _on_Endless_pressed(): + global.difficulty = 4 + + get_tree().change_scene("res://Scenes/CircleSpin.tscn") + + +func _on_BackButton_pressed(): + get_tree().change_scene("res://Scenes/Main.tscn") diff --git a/Scripts/Main.gd b/Scripts/Main.gd new file mode 100644 index 0000000..8ada406 --- /dev/null +++ b/Scripts/Main.gd @@ -0,0 +1,39 @@ +extends Control + +func _ready(): + pass + +func _on_StartButton_pressed(): + if !$ButtonPress.playing: + $ButtonPress.play() + get_tree().change_scene("res://Scenes/Levels.tscn") + + +func _on_OptionsButton_pressed(): + if !$ButtonPress.playing: + $ButtonPress.play() + + var options_scene = load("res://Scenes/Options.tscn") + for i in $CanvasLayer.get_children(): + i.hide() + var options = options_scene.instance() + add_child(options) + + +func _on_QuitButton_pressed(): + if !$ButtonPress.playing: + $ButtonPress.play() + + get_tree().quit() + +func _on_options_closed(): + if !$ButtonPress.playing: + $ButtonPress.play() + + for i in $CanvasLayer.get_children(): + i.show() + + +func _on_EndlessBtn_pressed(): + global.difficulty = 4 + get_tree().change_scene("res://Scenes/CircleSpin.tscn") diff --git a/Scripts/MainPlayer.gd b/Scripts/MainPlayer.gd new file mode 100644 index 0000000..e134018 --- /dev/null +++ b/Scripts/MainPlayer.gd @@ -0,0 +1,10 @@ +extends RigidBody2D + +var direction = Vector2(rand_range(-250, 250), rand_range(-250, 250)).normalized() + +export var max_speed = 500 +func _ready(): + pass + $Light2D.energy = 0.8 + $Light2D.texture_scale = 1.5 + linear_velocity = direction * 500 diff --git a/Scripts/Options.gd b/Scripts/Options.gd new file mode 100644 index 0000000..4e5a09b --- /dev/null +++ b/Scripts/Options.gd @@ -0,0 +1,19 @@ +extends Node2D +signal options_closed + + +func _ready(): + $OptionLayer/OptionsController/DifficultySlider.value = global.difficulty + connect("options_closed", get_parent(), "_on_options_closed") + connect("options_closed", get_parent().get_parent(), "_on_options_closed") + + + + +func _on_DifficultySlider_value_changed(value): + global.difficulty = value + + +func _on_Button_pressed(): + queue_free() + emit_signal("options_closed") diff --git a/Scripts/Player.gd b/Scripts/Player.gd new file mode 100644 index 0000000..86b8e83 --- /dev/null +++ b/Scripts/Player.gd @@ -0,0 +1,150 @@ +extends Area2D + +signal hit +signal point +signal win + + +export var explosion_effect : PackedScene = load("res://Scenes/Effects/DeathExplosion.tscn") +export var bonus_effect : PackedScene = load("res://Scenes/Effects/BonusEffect.tscn") + +onready var light2d = $Light2D +export var points = 0 + +export var winning_energy = 1.4 +var current_energy : float +var current_texture_scale : float + +var updated_energy: float +var updated_texture_scale: float + + +func _unhandled_input(event): + if event is InputEventScreenTouch and !$TurnSound.playing: + $TurnSound.play() + + +func _ready() -> void: + $PointSound.pitch_scale = 1 + connect("hit", get_parent().get_parent(), "_on_Player_hit") + connect("point", get_parent().get_parent(), "_on_Player_point") + connect("win", get_parent().get_parent(), "_on_Player_win") + connect("point", get_parent(), "_on_player_point") + + light2d.energy = 0.8 + light2d.texture_scale = 0.8 + + current_energy = light2d.energy + current_texture_scale = light2d.texture_scale + + updated_energy = current_energy + updated_texture_scale = current_texture_scale + + +func start(): + points = 0 + $PointSound.pitch_scale = 1 + light2d.energy = 0.8 + light2d.texture_scale = 0.8 + + current_energy = light2d.energy + current_texture_scale = light2d.texture_scale + + updated_energy = current_energy + updated_texture_scale = current_texture_scale + + show() + $CollisionShape2D.disabled = false + + for i in get_parent().get_parent().get_children(): + if "Enemy" in i.name or "Bonus" in i.name: + i.queue_free() + + +func _physics_process(delta): + current_energy = light2d.energy + current_texture_scale = light2d.texture_scale + + + if current_energy < updated_energy: + + light2d.energy += 3 * delta + + if current_texture_scale < updated_texture_scale: + light2d.texture_scale += 3 * delta + + +func _on_Player_body_entered(body): + + var effect = explosion_effect.instance() + + get_tree().get_root().add_child(effect) + effect.position = position + + # Hacks + hide() + $CollisionShape2D.set_deferred("disabled", true) + + if !$DeathSound.playing: + $DeathSound.play() + + emit_signal("hit") + + +func _on_Player_area_entered(area): + + var effect = bonus_effect.instance() + + get_tree().get_root().add_child(effect) + effect.position = position + + + # Update The Score + points += 1 + $PointSound.pitch_scale += 0.01 + + $"../../HUD".update_score(points) + _update_light() + + if !$PointSound.playing: + $PointSound.play() + + emit_signal("point") + + +func _update_light(): + if global.difficulty == 1: +# light2d.energy += (winning_energy - 0.8)/8 +# light2d.texture_scale += (6.3 - 0.8)/8 + + updated_energy += (winning_energy - 0.8)/8 + updated_texture_scale += (6.3 - 0.8)/8 + + + elif global.difficulty == 2: +# light2d.energy += (winning_energy - 0.8)/14 +# light2d.texture_scale += (6.3 - 0.8)/14 + + updated_energy += (winning_energy - 0.8)/14 + updated_texture_scale += (6.3 - 0.8)/14 + + elif global.difficulty == 3: +# light2d.energy += (winning_energy - 0.8)/17 +# light2d.texture_scale += (6.3 - 0.8)/17 + + updated_energy += (winning_energy - 0.8)/17 + updated_texture_scale += (6.3 - 0.8)/17 + + else: + updated_energy += 0.005 + updated_texture_scale += 0.03 + + if light2d.energy >= winning_energy && global.difficulty <= 3: +# light2d.energy = winning_energy + 0.2 +# light2d.texture_scale = 6.5 + + updated_energy = winning_energy + 0.2 + updated_texture_scale = 6.5 + emit_signal("win") + + diff --git a/Scripts/SamplePlayer.gd b/Scripts/SamplePlayer.gd new file mode 100644 index 0000000..1eccaec --- /dev/null +++ b/Scripts/SamplePlayer.gd @@ -0,0 +1,16 @@ +extends Node + + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/Scripts/Timers.gd b/Scripts/Timers.gd new file mode 100644 index 0000000..d9faea1 --- /dev/null +++ b/Scripts/Timers.gd @@ -0,0 +1,61 @@ +extends Node + +signal spawn_enemy +signal spawn_bonus + +func _ready(): + connect("spawn_enemy", get_parent(), "_on_EnemyTimer_timeout") + connect("spawn_bonus", get_parent(), "_on_BonusTimer_timeout") + + if global.difficulty < 4: + $EnemTimer.wait_time = 1.25 - global.difficulty * 0.25 + $BonuTimer.wait_time = 2 + global.difficulty * 0.5 + else: + $EnemTimer.wait_time = 1.25 + $BonuTimer.wait_time = 2.25 + + # Hacks +# $BonuTimer.wait_time = 0.5 +# $EnemTimer.wait_time = 0.3 + + $EnemTimer.stop() + $BonuTimer.stop() + +func _update_timers(): +# print($EnemTimer.wait_time) +# print($BonuTimer.wait_time) + if global.difficulty > 3: + if $EnemTimer.wait_time >= 0.5: + $EnemTimer.wait_time -= $EnemTimer.wait_time * 0.01 + else: + $EnemTimer.wait_time -= 0.0001 + + if $BonuTimer.wait_time <= 6: + $BonuTimer.wait_time += $BonuTimer.wait_time * 0.01 + else: + $BonuTimer.wait_time += 0.0001 + +func _start_enem_timer(): + if global.difficulty > 3: + $EnemTimer.wait_time = 1.25 + $EnemTimer.start() + #print("Enem Timer Started") + +func _stop_enem_timer(): + $EnemTimer.stop() + #print("Enem Timer Stopped") + +func _stop_bonu_timer(): + $BonuTimer.stop() + #print("Bonu Timer Stopped") + +func _start_bonu_timer(): + $BonuTimer.start() + #print("Bonu Timer Started") + +func _on_EnemTimer_timeout(): + emit_signal("spawn_enemy") + + +func _on_BonuTimer_timeout(): + emit_signal("spawn_bonus") diff --git a/Scripts/Trail.gd b/Scripts/Trail.gd new file mode 100644 index 0000000..deca15c --- /dev/null +++ b/Scripts/Trail.gd @@ -0,0 +1,15 @@ +extends Line2D + + +export var length = 50 +var point = Vector2() + +func _process(delta): + global_position = Vector2.ZERO + global_rotation = 0 + + point = get_parent().global_position + add_point(point) + + while get_point_count() > length: + remove_point(0) diff --git a/Scripts/global.gd b/Scripts/global.gd new file mode 100644 index 0000000..776a8a2 --- /dev/null +++ b/Scripts/global.gd @@ -0,0 +1,12 @@ +extends Node + +var h : float + +var difficulty := 2 +var gravity = -1 + +var started = false + +var previous_velocity = 0.0 + +var first_run_on_device = false diff --git a/Themes/NormalBtn.tres b/Themes/NormalBtn.tres new file mode 100644 index 0000000..5f4efd4 --- /dev/null +++ b/Themes/NormalBtn.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.6, 0.6, 0.6, 0 ) diff --git a/Themes/PressedBtn.tres b/Themes/PressedBtn.tres new file mode 100644 index 0000000..e84bf24 --- /dev/null +++ b/Themes/PressedBtn.tres @@ -0,0 +1,7 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.6, 0.6, 0.6, 0 ) +border_color = Color( 0, 0, 0, 0.278431 ) +shadow_color = Color( 0, 0, 0, 0.14902 ) +shadow_size = 1 diff --git a/default_env.tres b/default_env.tres new file mode 100644 index 0000000..20207a4 --- /dev/null +++ b/default_env.tres @@ -0,0 +1,7 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..99248a7 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,205 @@ +[preset.0] + +name="Android" +platform="Android" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="_build/CirclEvade.apk" +script_export_mode=1 +script_encryption_key="" + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +custom_template/use_custom_build=false +custom_template/export_format=0 +architectures/armeabi-v7a=true +architectures/arm64-v8a=true +architectures/x86=false +architectures/x86_64=false +keystore/debug="" +keystore/debug_user="" +keystore/debug_password="" +keystore/release="" +keystore/release_user="" +keystore/release_password="" +one_click_deploy/clear_previous_install=false +version/code=1 +version/name="1.0" +version/min_sdk=19 +version/target_sdk=30 +package/unique_name="org.circlevade.test1" +package/name="" +package/signed=true +package/classify_as_game=true +package/retain_data_on_uninstall=false +package/exclude_from_recents=false +launcher_icons/main_192x192="" +launcher_icons/adaptive_foreground_432x432="" +launcher_icons/adaptive_background_432x432="" +graphics/32_bits_framebuffer=true +graphics/opengl_debug=false +xr_features/xr_mode=0 +xr_features/hand_tracking=0 +xr_features/hand_tracking_frequency=0 +xr_features/passthrough=0 +screen/immersive_mode=true +screen/support_small=true +screen/support_normal=true +screen/support_large=true +screen/support_xlarge=true +user_data_backup/allow=false +command_line/extra_args="" +apk_expansion/enable=false +apk_expansion/SALT="" +apk_expansion/public_key="" +permissions/custom_permissions=PoolStringArray( ) +permissions/access_checkin_properties=false +permissions/access_coarse_location=false +permissions/access_fine_location=false +permissions/access_location_extra_commands=false +permissions/access_mock_location=false +permissions/access_network_state=false +permissions/access_surface_flinger=false +permissions/access_wifi_state=false +permissions/account_manager=false +permissions/add_voicemail=false +permissions/authenticate_accounts=false +permissions/battery_stats=false +permissions/bind_accessibility_service=false +permissions/bind_appwidget=false +permissions/bind_device_admin=false +permissions/bind_input_method=false +permissions/bind_nfc_service=false +permissions/bind_notification_listener_service=false +permissions/bind_print_service=false +permissions/bind_remoteviews=false +permissions/bind_text_service=false +permissions/bind_vpn_service=false +permissions/bind_wallpaper=false +permissions/bluetooth=false +permissions/bluetooth_admin=false +permissions/bluetooth_privileged=false +permissions/brick=false +permissions/broadcast_package_removed=false +permissions/broadcast_sms=false +permissions/broadcast_sticky=false +permissions/broadcast_wap_push=false +permissions/call_phone=false +permissions/call_privileged=false +permissions/camera=false +permissions/capture_audio_output=false +permissions/capture_secure_video_output=false +permissions/capture_video_output=false +permissions/change_component_enabled_state=false +permissions/change_configuration=false +permissions/change_network_state=false +permissions/change_wifi_multicast_state=false +permissions/change_wifi_state=false +permissions/clear_app_cache=false +permissions/clear_app_user_data=false +permissions/control_location_updates=false +permissions/delete_cache_files=false +permissions/delete_packages=false +permissions/device_power=false +permissions/diagnostic=false +permissions/disable_keyguard=false +permissions/dump=false +permissions/expand_status_bar=false +permissions/factory_test=false +permissions/flashlight=false +permissions/force_back=false +permissions/get_accounts=false +permissions/get_package_size=false +permissions/get_tasks=false +permissions/get_top_activity_info=false +permissions/global_search=false +permissions/hardware_test=false +permissions/inject_events=false +permissions/install_location_provider=false +permissions/install_packages=false +permissions/install_shortcut=false +permissions/internal_system_window=false +permissions/internet=false +permissions/kill_background_processes=false +permissions/location_hardware=false +permissions/manage_accounts=false +permissions/manage_app_tokens=false +permissions/manage_documents=false +permissions/master_clear=false +permissions/media_content_control=false +permissions/modify_audio_settings=false +permissions/modify_phone_state=false +permissions/mount_format_filesystems=false +permissions/mount_unmount_filesystems=false +permissions/nfc=false +permissions/persistent_activity=false +permissions/process_outgoing_calls=false +permissions/read_calendar=false +permissions/read_call_log=false +permissions/read_contacts=false +permissions/read_external_storage=false +permissions/read_frame_buffer=false +permissions/read_history_bookmarks=false +permissions/read_input_state=false +permissions/read_logs=false +permissions/read_phone_state=false +permissions/read_profile=false +permissions/read_sms=false +permissions/read_social_stream=false +permissions/read_sync_settings=false +permissions/read_sync_stats=false +permissions/read_user_dictionary=false +permissions/reboot=false +permissions/receive_boot_completed=false +permissions/receive_mms=false +permissions/receive_sms=false +permissions/receive_wap_push=false +permissions/record_audio=false +permissions/reorder_tasks=false +permissions/restart_packages=false +permissions/send_respond_via_message=false +permissions/send_sms=false +permissions/set_activity_watcher=false +permissions/set_alarm=false +permissions/set_always_finish=false +permissions/set_animation_scale=false +permissions/set_debug_app=false +permissions/set_orientation=false +permissions/set_pointer_speed=false +permissions/set_preferred_applications=false +permissions/set_process_limit=false +permissions/set_time=false +permissions/set_time_zone=false +permissions/set_wallpaper=false +permissions/set_wallpaper_hints=false +permissions/signal_persistent_processes=false +permissions/status_bar=false +permissions/subscribed_feeds_read=false +permissions/subscribed_feeds_write=false +permissions/system_alert_window=false +permissions/transmit_ir=false +permissions/uninstall_shortcut=false +permissions/update_device_stats=false +permissions/use_credentials=false +permissions/use_sip=false +permissions/vibrate=false +permissions/wake_lock=false +permissions/write_apn_settings=false +permissions/write_calendar=false +permissions/write_call_log=false +permissions/write_contacts=false +permissions/write_external_storage=false +permissions/write_gservices=false +permissions/write_history_bookmarks=false +permissions/write_profile=false +permissions/write_secure_settings=false +permissions/write_settings=false +permissions/write_sms=false +permissions/write_social_stream=false +permissions/write_sync_settings=false +permissions/write_user_dictionary=false diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..567b8eb Binary files /dev/null and b/icon.png differ diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..b575143 --- /dev/null +++ b/project.godot @@ -0,0 +1,57 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +[application] + +config/name="CirclEvade" +run/main_scene="res://Scenes/Main.tscn" +config/icon="res://icon.png" + +[autoload] + +global="*res://Scripts/global.gd" + +[display] + +window/size/width=576 +window/size/height=1024 +window/size/test_width=288 +window/size/test_height=512 +window/handheld/orientation="portrait" +window/stretch/mode="2d" +window/stretch/aspect="keep" + +[global] + +ETC=false +icon=false + +[input] + +switch={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) + ] +} + +[input_devices] + +pointing/emulate_touch_from_mouse=true + +[physics] + +common/enable_pause_aware_picking=true + +[rendering] + +2d/snapping/use_gpu_pixel_snap=true +vram_compression/import_etc=true +environment/default_environment="res://default_env.tres"