From 7c9e657d7a2c8e82b1f357833f1576edac4c1cae Mon Sep 17 00:00:00 2001 From: Laegnur Date: Tue, 27 Aug 2024 18:53:33 +0200 Subject: [PATCH] Step by step - Creating instances --- .gitignore | 1 + assets/Bouncy Platform Long.png | Bin 0 -> 3921 bytes assets/Bouncy Platform Long.png.import | 34 +++++ assets/Bouncy Platform Medium.png | Bin 0 -> 3849 bytes assets/Bouncy Platform Medium.png.import | 34 +++++ assets/ballBlue_10.png | Bin 0 -> 2987 bytes assets/ballBlue_10.png.import | 34 +++++ project.godot | 30 ++++- scenes/ball.tscn | 20 +++ scenes/main.tscn | 151 +++++++++++++++++++++++ scripts/main.gd | 9 ++ 11 files changed, 309 insertions(+), 4 deletions(-) create mode 100644 assets/Bouncy Platform Long.png create mode 100644 assets/Bouncy Platform Long.png.import create mode 100644 assets/Bouncy Platform Medium.png create mode 100644 assets/Bouncy Platform Medium.png.import create mode 100644 assets/ballBlue_10.png create mode 100644 assets/ballBlue_10.png.import create mode 100644 scenes/ball.tscn create mode 100644 scenes/main.tscn create mode 100644 scripts/main.gd diff --git a/.gitignore b/.gitignore index 0af181c..956b6e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # Godot 4+ specific ignores +/Docs/ .godot/ /android/ diff --git a/assets/Bouncy Platform Long.png b/assets/Bouncy Platform Long.png new file mode 100644 index 0000000000000000000000000000000000000000..aca8330d8874289113232d06c66e6a7fc8d20301 GIT binary patch literal 3921 zcmV-X53cZuP)w9waprvhk+CmKoFWZ z)I*g*TPh@k+J6X5m8#7@ZPTM!)4AvV&N+&0+cY8;iH3lq zz!6{<5CQsuFrYM4sSx6NU;_)lG!O^If!Bd!(RggJkqVW10$D5)^#V@;j{^4tu10Pu zgb)r);5hIi@LV(=OV?Vkra%^pL_NS)fInlk=Ou&?tuzaK3wSmfk7c*Ic*{T*i$sqA z-vf3wrFlXKQM)+sWHcTdu69wyKo*Nc72q4dGl16g<_RH0Z7krMz%$W!%yPQGF_6U~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)oM=~@;Zewp`Wpbznf9?PP002ovPDHLkV1lEklQIAR literal 0 HcmV?d00001 diff --git a/assets/ballBlue_10.png.import b/assets/ballBlue_10.png.import new file mode 100644 index 0000000..936661b --- /dev/null +++ b/assets/ballBlue_10.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dv6rx85s1gy3i" +path="res://.godot/imported/ballBlue_10.png-a6ac20f1eeff46860499a0f8c7bba4ff.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/ballBlue_10.png" +dest_files=["res://.godot/imported/ballBlue_10.png-a6ac20f1eeff46860499a0f8c7bba4ff.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 diff --git a/project.godot b/project.godot index 1b82aff..83ee48c 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="Godot Docs" -run/main_scene="res://scenes/label.tscn" +run/main_scene="res://scenes/main.tscn" config/features=PackedStringArray("4.3", "Forward Plus") config/icon="res://icon.png" @@ -22,7 +22,29 @@ version_control/autoload_on_startup=true [importer_defaults] -bitmap={ -"create_from": 0, -"threshold": 0.5 +texture={ +"compress/hdr_mode": 0, +"compress/lossy_quality": 0.7, +"compress/mode": 0, +"compress/normal_map": 0, +"detect_3d": true, +"flags/anisotropic": false, +"flags/filter": false, +"flags/mipmaps": false, +"flags/repeat": 0, +"flags/srgb": 2, +"process/HDR_as_SRGB": false, +"process/fix_alpha_border": true, +"process/premult_alpha": false, +"size_limit": 0, +"stream": false, +"svg/scale": 1.0 +} + +[input] + +click={ +"deadzone": 0.5, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(295, 13),"global_position":Vector2(304, 59),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null) +] } diff --git a/scenes/ball.tscn b/scenes/ball.tscn new file mode 100644 index 0000000..8414640 --- /dev/null +++ b/scenes/ball.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=4 format=3 uid="uid://dm5jrnxmxnuof"] + +[ext_resource type="Texture2D" uid="uid://dv6rx85s1gy3i" path="res://assets/ballBlue_10.png" id="1"] + +[sub_resource type="PhysicsMaterial" id="1"] +bounce = 0.5 + +[sub_resource type="CircleShape2D" id="2"] +radius = 37.1452 + +[node name="Ball" type="RigidBody2D"] +physics_material_override = SubResource("1") +gravity_scale = 4.0 + +[node name="Sprite2D" type="Sprite2D" parent="."] +scale = Vector2(0.5, 0.5) +texture = ExtResource("1") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("2") diff --git a/scenes/main.tscn b/scenes/main.tscn new file mode 100644 index 0000000..b6ea510 --- /dev/null +++ b/scenes/main.tscn @@ -0,0 +1,151 @@ +[gd_scene load_steps=13 format=3 uid="uid://coq78ajuagqrq"] + +[ext_resource type="Script" path="res://scripts/main.gd" id="1"] +[ext_resource type="PackedScene" uid="uid://dm5jrnxmxnuof" path="res://scenes/ball.tscn" id="2"] +[ext_resource type="Texture2D" uid="uid://dkq1swbmmxmbq" path="res://assets/Bouncy Platform Long.png" id="3"] + +[sub_resource type="PhysicsMaterial" id="1"] +bounce = 0.5 + +[sub_resource type="CapsuleShape2D" id="2"] +radius = 28.7617 +height = 309.37 + +[sub_resource type="PhysicsMaterial" id="3"] +bounce = 0.5 + +[sub_resource type="PhysicsMaterial" id="4"] +bounce = 0.5 + +[sub_resource type="PhysicsMaterial" id="5"] +bounce = 0.5 + +[sub_resource type="PhysicsMaterial" id="6"] +bounce = 0.5 + +[sub_resource type="PhysicsMaterial" id="7"] +bounce = 0.5 + +[sub_resource type="PhysicsMaterial" id="8"] +bounce = 0.5 + +[sub_resource type="PhysicsMaterial" id="9"] +bounce = 0.5 + +[node name="Main" type="Node"] +script = ExtResource("1") +Ball = ExtResource("2") + +[node name="WallContainer" type="Node" parent="."] + +[node name="Wall2" type="StaticBody2D" parent="WallContainer"] +position = Vector2(948.743, 478.292) +rotation = -0.264907 +physics_material_override = SubResource("1") + +[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall2"] +texture = ExtResource("3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall2"] +rotation = 1.5708 +shape = SubResource("2") + +[node name="Wall7" type="StaticBody2D" parent="WallContainer"] +position = Vector2(530.235, 200) +rotation = -1.02983 +physics_material_override = SubResource("3") + +[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall7"] +texture = ExtResource("3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall7"] +rotation = 1.5708 +shape = SubResource("2") + +[node name="Wall8" type="StaticBody2D" parent="WallContainer"] +position = Vector2(653.325, 204.282) +rotation = 1.07416 +physics_material_override = SubResource("4") + +[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall8"] +texture = ExtResource("3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall8"] +rotation = 1.5708 +shape = SubResource("2") + +[node name="Wall4" type="StaticBody2D" parent="WallContainer"] +position = Vector2(1064.67, 326.032) +rotation = -1.5708 +physics_material_override = SubResource("5") + +[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall4"] +texture = ExtResource("3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall4"] +rotation = 1.5708 +shape = SubResource("2") + +[node name="Wall1" type="StaticBody2D" parent="WallContainer"] +position = Vector2(215.838, 474.657) +rotation = 0.315662 +physics_material_override = SubResource("6") + +[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall1"] +texture = ExtResource("3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall1"] +rotation = 1.5708 +shape = SubResource("2") + +[node name="Wall5" type="StaticBody2D" parent="WallContainer"] +position = Vector2(98, 320.82) +rotation = 1.5708 +physics_material_override = SubResource("7") + +[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall5"] +texture = ExtResource("3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall5"] +rotation = 1.5708 +shape = SubResource("2") + +[node name="Wall3" type="StaticBody2D" parent="WallContainer"] +position = Vector2(464.924, 553.519) +physics_material_override = SubResource("8") + +[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall3"] +texture = ExtResource("3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall3"] +rotation = 1.5708 +shape = SubResource("2") + +[node name="Wall6" type="StaticBody2D" parent="WallContainer"] +position = Vector2(767.458, 554.361) +physics_material_override = SubResource("9") + +[node name="Sprite2D" type="Sprite2D" parent="WallContainer/Wall6"] +texture = ExtResource("3") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="WallContainer/Wall6"] +rotation = 1.5708 +shape = SubResource("2") + +[node name="Ball" parent="." instance=ExtResource("2")] +position = Vector2(456, 110) + +[node name="Ball2" parent="." instance=ExtResource("2")] +position = Vector2(300, 97) + +[node name="Ball3" parent="." instance=ExtResource("2")] +position = Vector2(204, 171) + +[node name="Ball4" parent="." instance=ExtResource("2")] +position = Vector2(805, 107) + +[node name="Ball5" parent="." instance=ExtResource("2")] +position = Vector2(987, 130) + +[node name="Ball6" parent="." instance=ExtResource("2")] +position = Vector2(701, 81) diff --git a/scripts/main.gd b/scripts/main.gd new file mode 100644 index 0000000..b9d468c --- /dev/null +++ b/scripts/main.gd @@ -0,0 +1,9 @@ +extends Node + +@export var Ball: PackedScene + +func _input(event): + if event.is_action_pressed("click"): + var new_ball = Ball.instantiate() + new_ball.position = get_viewport().get_mouse_position() + add_child(new_ball)