Skip to content

Commit

Permalink
Add new tiles & ported levels
Browse files Browse the repository at this point in the history
  • Loading branch information
Killarexe committed Sep 20, 2024
1 parent cb157de commit cab1d12
Show file tree
Hide file tree
Showing 10 changed files with 172 additions and 62 deletions.
14 changes: 13 additions & 1 deletion assets/Tileset.tres
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
[gd_resource type="TileSet" load_steps=35 format=3 uid="uid://dcovkjpnowgl0"]
[gd_resource type="TileSet" load_steps=41 format=3 uid="uid://dcovkjpnowgl0"]

[ext_resource type="Texture2D" uid="uid://b0b34lhgbuxy5" path="res://assets/textures/tilesets/tileset.png" id="1_3ut7y"]
[ext_resource type="PackedScene" uid="uid://dfamu2vvdstal" path="res://scenes/bundles/levels/tiles/CheckpointTile.tscn" id="1_ax33w"]
[ext_resource type="PackedScene" uid="uid://bsn6gnphd4yo4" path="res://scenes/bundles/levels/tiles/DoorTile.tscn" id="2_cy7yi"]
[ext_resource type="PackedScene" uid="uid://c65qajnxie4mn" path="res://scenes/bundles/levels/tiles/BlueSpike.tscn" id="3_epaqs"]
[ext_resource type="PackedScene" uid="uid://dmdian5sdbbt7" path="res://scenes/bundles/levels/tiles/BlueTile.tscn" id="4_xigca"]
[ext_resource type="PackedScene" uid="uid://netao5cw804d" path="res://scenes/bundles/levels/tiles/ColorSwitchTile.tscn" id="5_31dmm"]
[ext_resource type="PackedScene" uid="uid://b8b8vj3ltcvyc" path="res://scenes/bundles/levels/tiles/RedSpike.tscn" id="6_8wkf1"]
[ext_resource type="PackedScene" uid="uid://0tpr3cxow7yb" path="res://scenes/bundles/levels/tiles/RedTile.tscn" id="7_asfgj"]
[ext_resource type="PackedScene" uid="uid://bnxaybr275ttl" path="res://scenes/bundles/levels/tiles/Spike.tscn" id="8_5sn7t"]

[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_u2aof"]
scenes/1/scene = ExtResource("1_ax33w")
scenes/2/scene = ExtResource("2_cy7yi")
scenes/3/scene = ExtResource("3_epaqs")
scenes/4/scene = ExtResource("4_xigca")
scenes/5/scene = ExtResource("5_31dmm")
scenes/6/scene = ExtResource("6_8wkf1")
scenes/7/scene = ExtResource("7_asfgj")
scenes/8/scene = ExtResource("8_5sn7t")

[sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_wfcrf"]
polygon = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
Expand Down
60 changes: 30 additions & 30 deletions assets/style/default_theme.tres

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions scenes/bundles/levels/tiles/BlueSpike.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[gd_scene load_steps=8 format=3 uid="uid://c65qajnxie4mn"]

[ext_resource type="Script" path="res://scripts/level/tiles/InteractiveTile.gd" id="1_q1djb"]
[ext_resource type="Texture2D" uid="uid://b0b34lhgbuxy5" path="res://assets/textures/tilesets/tileset.png" id="2_ibpw5"]
[ext_resource type="Script" path="res://scripts/level/tiles/ColorTileComponent.gd" id="3_drwib"]
[ext_resource type="Script" path="res://scripts/level/tiles/DeathTileComponent.gd" id="4_ny7r4"]

[sub_resource type="AtlasTexture" id="AtlasTexture_bw55b"]
atlas = ExtResource("2_ibpw5")
region = Rect2(64, 144, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_yx3h0"]
atlas = ExtResource("2_ibpw5")
region = Rect2(32, 144, 16, 16)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_38jdk"]
size = Vector2(12, 5)

[node name="RedSpikeUp" type="StaticBody2D" node_paths=PackedStringArray("interatcion_area")]
script = ExtResource("1_q1djb")
interatcion_area = NodePath("Area2D")

[node name="Sprite2D2" type="Sprite2D" parent="."]
texture = SubResource("AtlasTexture_bw55b")

[node name="Sprite2D" type="Sprite2D" parent="."]
texture = SubResource("AtlasTexture_yx3h0")

[node name="ColorTileComponent" type="Node" parent="." node_paths=PackedStringArray("off_texture", "tile_collision_shape", "area_collision_shape")]
script = ExtResource("3_drwib")
use_polygone_shape = true
disable_tile_collision = true
disable_area_collision = true
off_texture = NodePath("../Sprite2D")
tile_collision_shape = NodePath("../CollisionPolygon2D")
area_collision_shape = NodePath("../Area2D/CollisionShape2D")

[node name="DeathTileComponent" type="Node" parent="." node_paths=PackedStringArray("interactive_tile")]
script = ExtResource("4_ny7r4")
interactive_tile = NodePath("..")

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
position = Vector2(0, 3.5)
polygon = PackedVector2Array(-4, -4.5, -3, -4.5, -3, -3.5, -2, -3.5, -2, -1.5, -1, -1.5, -1, 0.5, 1, 0.5, 1, -1.5, 2, -1.5, 2, -3.5, 3, -3.5, 3, -4.5, 4, -4.5, 4, -3.5, 5, -3.5, 5, -1.5, 6, -1.5, 6, 0.5, 7, 0.5, 7, 2.5, 8, 2.5, 8, 4.5, -8, 4.5, -8, 2.5, -7, 2.5, -7, 0.5, -6, 0.5, -6, -1.5, -5, -1.5, -5, -3.5, -4, -3.5)

[node name="Area2D" type="Area2D" parent="."]

[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(0, 1)
shape = SubResource("RectangleShape2D_38jdk")
disabled = true
1 change: 1 addition & 0 deletions scenes/bundles/levels/tiles/ColorSwitchTile.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ texture = SubResource("AtlasTexture_nfxd8")
shape = SubResource("RectangleShape2D_a1f6n")

[node name="Area2D" type="Area2D" parent="."]
collision_mask = 8

[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("RectangleShape2D_mwyoo")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
[gd_scene load_steps=8 format=3 uid="uid://b8b8vj3ltcvyc"]

[ext_resource type="Script" path="res://scripts/level/tiles/InteractiveTile.gd" id="1_iuax2"]
[ext_resource type="Texture2D" uid="uid://b0b34lhgbuxy5" path="res://assets/textures/tilesets/tileset.png" id="2_fn0ge"]
[ext_resource type="Script" path="res://scripts/level/tiles/ColorTileComponent.gd" id="3_jisq8"]
[ext_resource type="Script" path="res://scripts/level/tiles/DeathTileComponent.gd" id="4_4d7ir"]
[ext_resource type="Script" path="res://scripts/level/tiles/InteractiveTile.gd" id="1_n1kxa"]
[ext_resource type="Texture2D" uid="uid://b0b34lhgbuxy5" path="res://assets/textures/tilesets/tileset.png" id="2_uj1me"]
[ext_resource type="Script" path="res://scripts/level/tiles/ColorTileComponent.gd" id="3_wdxkj"]
[ext_resource type="Script" path="res://scripts/level/tiles/DeathTileComponent.gd" id="4_rgwmr"]

[sub_resource type="AtlasTexture" id="AtlasTexture_bw55b"]
atlas = ExtResource("2_fn0ge")
atlas = ExtResource("2_uj1me")
region = Rect2(128, 144, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_yx3h0"]
atlas = ExtResource("2_fn0ge")
atlas = ExtResource("2_uj1me")
region = Rect2(96, 144, 16, 16)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_38jdk"]
size = Vector2(12, 5)

[node name="RedSpikeUp" type="StaticBody2D" node_paths=PackedStringArray("interatcion_area")]
script = ExtResource("1_iuax2")
script = ExtResource("1_n1kxa")
interatcion_area = NodePath("Area2D")

[node name="Sprite2D2" type="Sprite2D" parent="."]
Expand All @@ -27,7 +27,7 @@ texture = SubResource("AtlasTexture_bw55b")
texture = SubResource("AtlasTexture_yx3h0")

[node name="ColorTileComponent" type="Node" parent="." node_paths=PackedStringArray("off_texture", "tile_collision_shape", "area_collision_shape")]
script = ExtResource("3_jisq8")
script = ExtResource("3_wdxkj")
use_polygone_shape = true
disable_tile_collision = true
disable_area_collision = true
Expand All @@ -36,7 +36,7 @@ tile_collision_shape = NodePath("../CollisionPolygon2D")
area_collision_shape = NodePath("../Area2D/CollisionShape2D")

[node name="DeathTileComponent" type="Node" parent="." node_paths=PackedStringArray("interactive_tile")]
script = ExtResource("4_4d7ir")
script = ExtResource("4_rgwmr")
interactive_tile = NodePath("..")

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
Expand Down
34 changes: 34 additions & 0 deletions scenes/bundles/levels/tiles/Spike.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[gd_scene load_steps=6 format=3 uid="uid://bnxaybr275ttl"]

[ext_resource type="Script" path="res://scripts/level/tiles/InteractiveTile.gd" id="1_nf1nt"]
[ext_resource type="Texture2D" uid="uid://b0b34lhgbuxy5" path="res://assets/textures/tilesets/tileset.png" id="2_72k6k"]
[ext_resource type="Script" path="res://scripts/level/tiles/DeathTileComponent.gd" id="4_0hisf"]

[sub_resource type="AtlasTexture" id="AtlasTexture_yx3h0"]
atlas = ExtResource("2_72k6k")
region = Rect2(0, 64, 16, 16)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_38jdk"]
size = Vector2(12, 5)

[node name="RedSpikeUp" type="StaticBody2D" node_paths=PackedStringArray("interatcion_area")]
script = ExtResource("1_nf1nt")
interatcion_area = NodePath("Area2D")

[node name="Sprite2D" type="Sprite2D" parent="."]
texture = SubResource("AtlasTexture_yx3h0")

[node name="DeathTileComponent" type="Node" parent="." node_paths=PackedStringArray("interactive_tile")]
script = ExtResource("4_0hisf")
interactive_tile = NodePath("..")

[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
position = Vector2(0, 3.5)
polygon = PackedVector2Array(-4, -4.5, -3, -4.5, -3, -3.5, -2, -3.5, -2, -1.5, -1, -1.5, -1, 0.5, 1, 0.5, 1, -1.5, 2, -1.5, 2, -3.5, 3, -3.5, 3, -4.5, 4, -4.5, 4, -3.5, 5, -3.5, 5, -1.5, 6, -1.5, 6, 0.5, 7, 0.5, 7, 2.5, 8, 2.5, 8, 4.5, -8, 4.5, -8, 2.5, -7, 2.5, -7, 0.5, -6, 0.5, -6, -1.5, -5, -1.5, -5, -3.5, -4, -3.5)

[node name="Area2D" type="Area2D" parent="."]

[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(0, 1)
shape = SubResource("RectangleShape2D_38jdk")
disabled = true
26 changes: 16 additions & 10 deletions scenes/levels/Level3.tscn
100755 → 100644

Large diffs are not rendered by default.

27 changes: 16 additions & 11 deletions scenes/levels/Level4.tscn
100755 → 100644

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions scripts/level/tiles/ColorSwitchTileComponent.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ func _ready() -> void:

func on_interact(body: Node2D) -> void:
if body.is_in_group("Player"):
print("Ohh")
get_tree().call_group("ColorTiles", "switch_texture")
2 changes: 1 addition & 1 deletion scripts/level/tiles/ColorTileComponent.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func _get_property_list() -> Array[Dictionary]:
})
return properties

func _init() -> void:
func _ready() -> void:
add_to_group("ColorTiles")

func switch_texture() -> void:
Expand Down

0 comments on commit cab1d12

Please sign in to comment.