Skip to content

Commit

Permalink
add space shooter
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousdev-gh committed Jun 20, 2024
1 parent e205c35 commit 2fcb45d
Show file tree
Hide file tree
Showing 27 changed files with 602 additions and 6 deletions.
Binary file added assets/enemyGreen5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/enemyGreen5.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://8pqbv2k7d4hp"
path="res://.godot/imported/enemyGreen5.png-fee32ff53a25949df958c50204a0e121.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/enemyGreen5.png"
dest_files=["res://.godot/imported/enemyGreen5.png-fee32ff53a25949df958c50204a0e121.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/fire00.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/fire00.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cmm046t0jp1x"
path="res://.godot/imported/fire00.png-7dbba8964878f1ffc86d434ca5f288fe.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/fire00.png"
dest_files=["res://.godot/imported/fire00.png-7dbba8964878f1ffc86d434ca5f288fe.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/laserGreen13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/laserGreen13.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://ggkb4okarru7"
path="res://.godot/imported/laserGreen13.png-115ab4d3577f0fbadf766e2bd061c18e.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/laserGreen13.png"
dest_files=["res://.godot/imported/laserGreen13.png-115ab4d3577f0fbadf766e2bd061c18e.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/parts/cockpitBlue_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/parts/cockpitBlue_5.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://4qr7nnqx7vb7"
path="res://.godot/imported/cockpitBlue_5.png-88c7d121fc7b1226e745d383f9629e31.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/parts/cockpitBlue_5.png"
dest_files=["res://.godot/imported/cockpitBlue_5.png-88c7d121fc7b1226e745d383f9629e31.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/parts/enemyBlack4Body.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/parts/enemyBlack4Body.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://vnfbjnw4ax6f"
path="res://.godot/imported/enemyBlack4Body.png-6d567cb1a72d143fb7eff4a88e1a9cfa.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/parts/enemyBlack4Body.png"
dest_files=["res://.godot/imported/enemyBlack4Body.png-6d567cb1a72d143fb7eff4a88e1a9cfa.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/parts/wingBlue_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/parts/wingBlue_4.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bcm1m4px4m824"
path="res://.godot/imported/wingBlue_4.png-dcbea818274f1f3423b818c0080080cc.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/parts/wingBlue_4.png"
dest_files=["res://.godot/imported/wingBlue_4.png-dcbea818274f1f3423b818c0080080cc.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file added assets/playerShip1_orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/playerShip1_orange.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://hvk1vskd1rt4"
path="res://.godot/imported/playerShip1_orange.png-b7a72a361080ce1b0ab0e1e9c6c09453.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/playerShip1_orange.png"
dest_files=["res://.godot/imported/playerShip1_orange.png-b7a72a361080ce1b0ab0e1e9c6c09453.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
28 changes: 28 additions & 0 deletions scenes/explosion.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[gd_scene load_steps=3 format=3 uid="uid://b1jltndmr23o0"]

[sub_resource type="Curve" id="Curve_grxal"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0.429467), 0.0, 0.0, 0, 0]
point_count = 2

[sub_resource type="Gradient" id="Gradient_n42rl"]
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)

[node name="Explosion" type="CPUParticles2D"]
emitting = false
amount = 100
lifetime = 1.5
one_shot = true
speed_scale = 2.0
explosiveness = 1.0
lifetime_randomness = 0.54
direction = Vector2(0, 0)
spread = 180.0
gravity = Vector2(0, 0)
initial_velocity_min = 40.0
initial_velocity_max = 50.0
scale_amount_min = 5.0
scale_amount_max = 10.0
scale_amount_curve = SubResource("Curve_grxal")
color_ramp = SubResource("Gradient_n42rl")

[connection signal="tree_entered" from="." to="." method="set_emitting" binds= [true]]
31 changes: 25 additions & 6 deletions scenes/game_selection.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,41 @@ grow_vertical = 2
script = ExtResource("1_82t7m")

[node name="LaunchTetris" type="Button" parent="."]
texture_filter = 2
layout_mode = 0
offset_left = 157.0
offset_top = 208.0
offset_right = 353.0
offset_bottom = 239.0
offset_left = 158.0
offset_top = 209.0
offset_right = 660.0
offset_bottom = 300.0
scale = Vector2(0.5, 0.5)
theme_override_font_sizes/font_size = 60
action_mode = 0
text = "Tetris"

[node name="LaunchGame2" type="Button" parent="."]
texture_filter = 2
layout_mode = 0
offset_left = 157.0
offset_top = 266.0
offset_right = 352.0
offset_bottom = 297.0
offset_right = 661.0
offset_bottom = 357.0
scale = Vector2(0.5, 0.5)
theme_override_font_sizes/font_size = 60
action_mode = 0
text = "Snake"

[node name="LaunchGame3" type="Button" parent="."]
texture_filter = 2
layout_mode = 0
offset_left = 157.0
offset_top = 324.0
offset_right = 663.0
offset_bottom = 415.0
scale = Vector2(0.5, 0.5)
theme_override_font_sizes/font_size = 60
action_mode = 0
text = "Space shooter"

[connection signal="pressed" from="LaunchTetris" to="." method="_on_launch_tetris_pressed"]
[connection signal="pressed" from="LaunchGame2" to="." method="_on_launch_snake_pressed"]
[connection signal="pressed" from="LaunchGame3" to="." method="_on_launch_space_shooter_pressed"]
45 changes: 45 additions & 0 deletions scenes/space_shooter/enemy_1.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[gd_scene load_steps=6 format=3 uid="uid://ccgesfkgw36wd"]

[ext_resource type="Script" path="res://scripts/space_shooter/enemy_1.gd" id="2_8k6oi"]
[ext_resource type="Texture2D" uid="uid://bcm1m4px4m824" path="res://assets/parts/wingBlue_4.png" id="2_kub14"]
[ext_resource type="Script" path="res://scripts/space_shooter/destroyed_part.gd" id="3_2r8gt"]
[ext_resource type="Texture2D" uid="uid://vnfbjnw4ax6f" path="res://assets/parts/enemyBlack4Body.png" id="3_8ylo3"]
[ext_resource type="PackedScene" uid="uid://b1jltndmr23o0" path="res://scenes/explosion.tscn" id="5_kkc2m"]

[node name="Node2D" type="Node2D"]
script = ExtResource("2_8k6oi")
particles_scene = ExtResource("5_kkc2m")

[node name="Enemy" type="Area2D" parent="."]
position = Vector2(0, 5)
scale = Vector2(0.5, 0.5)

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Enemy"]
polygon = PackedVector2Array(42, -38, 42, 12, 10, 36, -10, 36, -42, 12, -42, -38)

[node name="Parts" type="Node2D" parent="."]

[node name="RightWing" type="Sprite2D" parent="Parts"]
position = Vector2(11.5, 0)
scale = Vector2(0.5, 0.5)
texture = ExtResource("2_kub14")
script = ExtResource("3_2r8gt")

[node name="LeftWing" type="Sprite2D" parent="Parts"]
position = Vector2(-10.5, 0)
scale = Vector2(0.5, 0.5)
texture = ExtResource("2_kub14")
flip_h = true
script = ExtResource("3_2r8gt")

[node name="Body" type="Sprite2D" parent="Parts"]
position = Vector2(0.5, 5)
scale = Vector2(0.5, 0.5)
texture = ExtResource("3_8ylo3")
script = ExtResource("3_2r8gt")

[connection signal="before_kill" from="." to="Parts" method="_on_node_2d_before_kill"]
[connection signal="before_kill" from="." to="Parts/RightWing" method="_on_node_2d_before_kill"]
[connection signal="before_kill" from="." to="Parts/LeftWing" method="_on_node_2d_before_kill"]
[connection signal="before_kill" from="." to="Parts/Body" method="_on_node_2d_before_kill"]
[connection signal="area_entered" from="Enemy" to="." method="_on_enemy_area_entered"]
Loading

0 comments on commit 2fcb45d

Please sign in to comment.