diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2023-12-25 12:03:15 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2023-12-25 12:03:15 +0100 |
commit | d74263a17e98159b2e3176a5f8e1ff361909c210 (patch) | |
tree | 868520cc28b32f60bfcde231c4b61878e7c171e4 | |
parent | afb1ca10cca0982d37fe76b226b606ca7aa5335c (diff) |
level backgrounds
15 files changed, 148 insertions, 16 deletions
diff --git a/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Clouds).png b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Clouds).png Binary files differnew file mode 100644 index 0000000..7aeb782 --- /dev/null +++ b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Clouds).png diff --git a/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Clouds).png.import b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Clouds).png.import new file mode 100644 index 0000000..9595f94 --- /dev/null +++ b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Clouds).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://da5045vo8yxkk" +path="res://.godot/imported/2015-02-26 [DB32](Generic Platformer)(Clouds).png-817fa798949d44ac44f27704cf3c050a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Clouds).png" +dest_files=["res://.godot/imported/2015-02-26 [DB32](Generic Platformer)(Clouds).png-817fa798949d44ac44f27704cf3c050a.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/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png Binary files differnew file mode 100644 index 0000000..2912e89 --- /dev/null +++ b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png diff --git a/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png.import b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png.import new file mode 100644 index 0000000..801144d --- /dev/null +++ b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://daf6e8ddbsfgp" +path="res://.godot/imported/2015-02-26 [DB32](Generic Platformer)(Mountains).png-d92c0791e6166ef681d82142872405f7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png" +dest_files=["res://.godot/imported/2015-02-26 [DB32](Generic Platformer)(Mountains).png-d92c0791e6166ef681d82142872405f7.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/Assets/Environment/2015-02-26 [DB32](Generic Platformer)(Tileset).png b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Tileset).png Binary files differindex fd794a3..fd794a3 100644 --- a/Assets/Environment/2015-02-26 [DB32](Generic Platformer)(Tileset).png +++ b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Tileset).png diff --git a/Assets/Environment/2015-02-26 [DB32](Generic Platformer)(Tileset).png.import b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Tileset).png.import index ca71707..4916324 100644 --- a/Assets/Environment/2015-02-26 [DB32](Generic Platformer)(Tileset).png.import +++ b/Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Tileset).png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://volnaff7i3gn" -path="res://.godot/imported/2015-02-26 [DB32](Generic Platformer)(Tileset).png-da7d58f1a32e9e2c0d83e0a7eb712791.ctex" +path="res://.godot/imported/2015-02-26 [DB32](Generic Platformer)(Tileset).png-0ff6c4d14da7b824e282de6b835630fb.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Assets/Environment/2015-02-26 [DB32](Generic Platformer)(Tileset).png" -dest_files=["res://.godot/imported/2015-02-26 [DB32](Generic Platformer)(Tileset).png-da7d58f1a32e9e2c0d83e0a7eb712791.ctex"] +source_file="res://Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Tileset).png" +dest_files=["res://.godot/imported/2015-02-26 [DB32](Generic Platformer)(Tileset).png-0ff6c4d14da7b824e282de6b835630fb.ctex"] [params] diff --git a/Assets/Environment/generic_platformer.tres b/Assets/Environment/generic_platformer/generic_platformer.tres index 61f6138..73a05cb 100644 --- a/Assets/Environment/generic_platformer.tres +++ b/Assets/Environment/generic_platformer/generic_platformer.tres @@ -1,7 +1,7 @@ [gd_resource type="TileSet" load_steps=12 format=3 uid="uid://c5h11mosp5q0j"] -[ext_resource type="Texture2D" uid="uid://volnaff7i3gn" path="res://Assets/Environment/2015-02-26 [DB32](Generic Platformer)(Tileset).png" id="1"] -[ext_resource type="Texture2D" uid="uid://coniqajt6fs2q" path="res://Assets/Environment/generic_platformer_test.png" id="2_hdguw"] +[ext_resource type="Texture2D" uid="uid://volnaff7i3gn" path="res://Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Tileset).png" id="1"] +[ext_resource type="Texture2D" uid="uid://coniqajt6fs2q" path="res://Assets/Environment/generic_platformer/generic_platformer_test.png" id="2_hdguw"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_37fvt"] texture = ExtResource("1") diff --git a/Assets/Environment/generic_platformer_test.png b/Assets/Environment/generic_platformer/generic_platformer_test.png Binary files differindex b2ac7b0..b2ac7b0 100644 --- a/Assets/Environment/generic_platformer_test.png +++ b/Assets/Environment/generic_platformer/generic_platformer_test.png diff --git a/Assets/Environment/generic_platformer_test.png.import b/Assets/Environment/generic_platformer/generic_platformer_test.png.import index 66dcdaa..0ca6fb5 100644 --- a/Assets/Environment/generic_platformer_test.png.import +++ b/Assets/Environment/generic_platformer/generic_platformer_test.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://coniqajt6fs2q" -path="res://.godot/imported/generic_platformer_test.png-ca82c02a68eb4ad57553a1cb53799039.ctex" +path="res://.godot/imported/generic_platformer_test.png-e804f34e9d341c34689594aee19ed0ee.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Assets/Environment/generic_platformer_test.png" -dest_files=["res://.godot/imported/generic_platformer_test.png-ca82c02a68eb4ad57553a1cb53799039.ctex"] +source_file="res://Assets/Environment/generic_platformer/generic_platformer_test.png" +dest_files=["res://.godot/imported/generic_platformer_test.png-e804f34e9d341c34689594aee19ed0ee.ctex"] [params] diff --git a/Levels/Level.gd b/Levels/Level.gd index 0706b0b..910feb8 100644 --- a/Levels/Level.gd +++ b/Levels/Level.gd @@ -1,6 +1,8 @@ extends Node2D +var character: CharacterBody2D + var idx = 0 var timer = 0 @@ -14,8 +16,15 @@ func _ready(): self.set_hud() get_tree().get_root().size_changed.connect(Callable(self, 'resize_hud')) - var character = load("res://Characters/" + Network.player.character + ".tscn").instantiate() + character = load("res://Characters/" + Network.player.character + ".tscn").instantiate() self.set_player(character) + + if has_node("ParallaxBackground"): + $ParallaxBackground/ParallaxLayer.motion_mirroring.x = ( + $ParallaxBackground/ParallaxLayer/Sprite2D.get_rect().size + * + $ParallaxBackground/ParallaxLayer/Sprite2D.scale + ).x func _process(delta): diff --git a/Levels/Level_0001.tscn b/Levels/Level_0001.tscn index 86c527c..6d00d95 100644 --- a/Levels/Level_0001.tscn +++ b/Levels/Level_0001.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=3 uid="uid://c5rui0aqppyhs"] +[gd_scene load_steps=7 format=3 uid="uid://c5rui0aqppyhs"] -[ext_resource type="TileSet" uid="uid://c5h11mosp5q0j" path="res://Assets/Environment/generic_platformer.tres" id="1"] +[ext_resource type="TileSet" uid="uid://c5h11mosp5q0j" path="res://Assets/Environment/generic_platformer/generic_platformer.tres" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://cssvf3k8yn751" path="res://Objects/Flag.tscn" id="3"] [ext_resource type="Script" path="res://Levels/Level_0001.gd" id="4"] [ext_resource type="PackedScene" path="res://Objects/CheckFall.tscn" id="5"] +[ext_resource type="Texture2D" uid="uid://daf6e8ddbsfgp" path="res://Assets/Environment/generic_platformer/2015-02-26 [DB32](Generic Platformer)(Mountains).png" id="6_kahe0"] [node name="Level_0001" type="Node2D"] script = ExtResource("4") @@ -34,3 +35,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(1019, 772) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(-103, -251) +scale = Vector2(6.93056, 6.93056) +texture = ExtResource("6_kahe0") +centered = false diff --git a/Levels/Level_0002.tscn b/Levels/Level_0002.tscn index 9397650..8c7c9fa 100644 --- a/Levels/Level_0002.tscn +++ b/Levels/Level_0002.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=28 format=3 uid="uid://7i6ssblunihy"] +[gd_scene load_steps=29 format=3 uid="uid://7i6ssblunihy"] [ext_resource type="Texture2D" uid="uid://cv2wvpr5mttn4" path="res://Assets/Environment/WinterTileset/Tiles/1.png" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] @@ -15,6 +15,7 @@ [ext_resource type="Texture2D" uid="uid://doawng5y4amm5" path="res://Assets/Environment/WinterTileset/Object/Tree_2.png" id="13"] [ext_resource type="Texture2D" uid="uid://btr0korernb4" path="res://Assets/Environment/WinterTileset/Object/Igloo.png" id="14"] [ext_resource type="Texture2D" uid="uid://xffp6y4guc5u" path="res://Assets/Environment/WinterTileset/Object/Tree_1.png" id="15"] +[ext_resource type="Texture2D" uid="uid://bb2wq2h3sij5t" path="res://Assets/Environment/WinterTileset/BG/BG.png" id="16_1c524"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_bmefr"] texture = ExtResource("1") @@ -458,7 +459,7 @@ script = ExtResource("9") [node name="TileMap" type="TileMap" parent="."] scale = Vector2(0.125, 0.125) tile_set = SubResource("10") -cell_quadrant_size = 128 +rendering_quadrant_size = 128 format = 2 layer_0/tile_data = PackedInt32Array(-1441784, 7, 0, 14, 0, 0, 786440, 7, 0, 1048604, 1, 0, 1048603, 1, 0, 1048602, 1, 0, 1048601, 1, 0, 1048600, 1, 0, 1048599, 1, 0, 1048598, 1, 0, 1048597, 1, 0, 1048596, 1, 0, 1048595, 1, 0, 851976, 7, 0, 917512, 7, 0, 983048, 7, 0, 1048584, 0, 0, 1048594, 1, 0, 1048593, 1, 0, 1048592, 1, 0, 1048591, 1, 0, 1048590, 1, 0, 1048589, 1, 0, 1048588, 1, 0, 1048587, 1, 0, 1048586, 1, 0, 1048585, 1, 0, 1048605, 2, 0, 983069, 9, 0, 720904, 7, 0, 655368, 7, 0, 589832, 7, 0, 524296, 7, 0, 458760, 7, 0, 393224, 7, 0, 65550, 6, 0, 131086, 6, 0, 196622, 6, 0, 262158, 6, 0, 327694, 6, 0, 393230, 6, 0, 458766, 6, 0, 43, 1, 0, 42, 1, 0, 41, 1, 0, 40, 1, 0, 39, 1, 0, 38, 1, 0, 37, 1, 0, 36, 1, 0, 35, 1, 0, 34, 1, 0, 33, 1, 0, 32, 1, 0, 31, 1, 0, 30, 1, 0, 327688, 7, 0, 262152, 7, 0, 196616, 7, 0, 131080, 7, 0, 65544, 7, 0, 8, 7, 0, -65528, 7, 0, -131064, 7, 0, -196600, 7, 0, -262136, 7, 0, -65522, 9, 0, -65498, 8, 0, -655293, 3, 0, -524231, 3, 0, -327631, 3, 0, -393166, 10, 0, -589766, 10, 0, -655291, 5, 0, -524229, 5, 0, -327629, 5, 0, -327630, 4, 0, -524230, 4, 0, -655292, 4, 0, -1376248, 7, 0, -1310712, 7, 0, -1245176, 7, 0, -1179640, 7, 0, -1114104, 7, 0, -1048568, 7, 0, -983032, 7, 0, -917496, 7, 0, -851960, 7, 0, -786424, 7, 0, -720888, 7, 0, -655352, 7, 0, -589816, 7, 0, -524280, 7, 0, -458744, 7, 0, -393208, 7, 0, -327672, 7, 0, 524302, 6, 0, 589838, 6, 0, 655374, 6, 0, 720910, 6, 0, 786446, 6, 0, 29, 1, 0, 28, 1, 0, 27, 1, 0, 26, 1, 0, 25, 1, 0, 24, 1, 0, 23, 1, 0, 22, 1, 0, 21, 1, 0, 20, 1, 0, 19, 1, 0, 18, 1, 0, 17, 1, 0, 16, 1, 0, 15, 1, 0, 44, 2, 0) @@ -482,3 +483,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(472, 320) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(74.0001, -401) +scale = Vector2(0.784155, 0.784155) +texture = ExtResource("16_1c524") +centered = false diff --git a/Levels/Level_0003.tscn b/Levels/Level_0003.tscn index 7f895fc..bdc022c 100644 --- a/Levels/Level_0003.tscn +++ b/Levels/Level_0003.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=28 format=3 uid="uid://cj3urxdtcls8x"] +[gd_scene load_steps=29 format=3 uid="uid://cj3urxdtcls8x"] [ext_resource type="Texture2D" uid="uid://cv2wvpr5mttn4" path="res://Assets/Environment/WinterTileset/Tiles/1.png" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] @@ -15,6 +15,7 @@ [ext_resource type="Texture2D" uid="uid://doawng5y4amm5" path="res://Assets/Environment/WinterTileset/Object/Tree_2.png" id="13"] [ext_resource type="Texture2D" uid="uid://btr0korernb4" path="res://Assets/Environment/WinterTileset/Object/Igloo.png" id="14"] [ext_resource type="Texture2D" uid="uid://xffp6y4guc5u" path="res://Assets/Environment/WinterTileset/Object/Tree_1.png" id="15"] +[ext_resource type="Texture2D" uid="uid://bb2wq2h3sij5t" path="res://Assets/Environment/WinterTileset/BG/BG.png" id="16_iyx8m"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v701e"] texture = ExtResource("1") @@ -515,3 +516,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(674, 435) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(-153, -498) +scale = Vector2(1.14446, 1.14446) +texture = ExtResource("16_iyx8m") +centered = false diff --git a/Levels/Level_0004.tscn b/Levels/Level_0004.tscn index c4bc19b..71e83b3 100644 --- a/Levels/Level_0004.tscn +++ b/Levels/Level_0004.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=3 uid="uid://b4fd51otvuatn"] +[gd_scene load_steps=7 format=3 uid="uid://b4fd51otvuatn"] [ext_resource type="TileSet" path="res://Assets/Environment/nestle.tres" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://cssvf3k8yn751" path="res://Objects/Flag.tscn" id="3"] [ext_resource type="Script" path="res://Levels/Level_0004.gd" id="4"] [ext_resource type="PackedScene" path="res://Objects/CheckFall.tscn" id="5"] +[ext_resource type="Texture2D" uid="uid://56ec4yc6bstu" path="res://Assets/Environment/FreeTileset/BG/BG.png" id="6_7yvqi"] [node name="Level_0004" type="Node2D"] script = ExtResource("4") @@ -39,3 +40,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(824, 320) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(-3, -730) +scale = Vector2(1.504, 1.504) +texture = ExtResource("6_7yvqi") +centered = false diff --git a/Levels/Level_0005.tscn b/Levels/Level_0005.tscn index b41530f..208c049 100644 --- a/Levels/Level_0005.tscn +++ b/Levels/Level_0005.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=3 uid="uid://cdgecw8l2lhto"] +[gd_scene load_steps=7 format=3 uid="uid://cdgecw8l2lhto"] [ext_resource type="TileSet" path="res://Assets/Environment/nestle.tres" id="1"] [ext_resource type="PackedScene" uid="uid://bxkau6af500fs" path="res://Characters/Character.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://cssvf3k8yn751" path="res://Objects/Flag.tscn" id="3"] [ext_resource type="Script" path="res://Levels/Level_0005.gd" id="4"] [ext_resource type="PackedScene" path="res://Objects/CheckFall.tscn" id="5"] +[ext_resource type="Texture2D" uid="uid://56ec4yc6bstu" path="res://Assets/Environment/FreeTileset/BG/BG.png" id="6_y8ca1"] [node name="Level_0005" type="Node2D"] script = ExtResource("4") @@ -41,3 +42,13 @@ editor_draw_limits = true [node name="CheckFall" parent="." instance=ExtResource("5")] position = Vector2(824, 216) scale = Vector2(8, 1) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] + +[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"] +position = Vector2(-1385, -1856) +scale = Vector2(2.73615, 2.73615) +texture = ExtResource("6_y8ca1") +centered = false |