diff --git a/godot/Main.tscn b/godot/Main.tscn
index d264a5c..84d446d 100644
--- a/godot/Main.tscn
+++ b/godot/Main.tscn
@@ -1,9 +1,9 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Main.gdns" type="Script" id=1]
-[ext_resource path="res://Level1.tscn" type="PackedScene" id=2]
+[ext_resource path="res://levels/Level2.tscn" type="PackedScene" id=2]
[node name="Main" type="Node"]
script = ExtResource( 1 )
-[node name="Level1" parent="." instance=ExtResource( 2 )]
+[node name="Level2" parent="." instance=ExtResource( 2 )]
diff --git a/godot/camera_fix.gd b/godot/camera_fix.gd
new file mode 100644
index 0000000..31ad05f
--- /dev/null
+++ b/godot/camera_fix.gd
@@ -0,0 +1,10 @@
+extends Node2D
+
+
+# Called when the node enters the scene tree for the first time.
+func _ready() -> void:
+ var used_rect = get_node("Middleground").get_used_rect()
+ var bounds = Vector2(used_rect.position.x + used_rect.size.x, used_rect.position.y + used_rect.size.y - 1)
+ var camera : Camera2D = $"../../Player/Camera2D"
+ camera.limit_right = bounds.x * get_node("Middleground").cell_size.x
+ camera.limit_bottom = bounds.y * get_node("Middleground").cell_size.y
diff --git a/godot/characters/player/Player.tscn b/godot/characters/player/Player.tscn
index fd71fe2..fd14612 100644
--- a/godot/characters/player/Player.tscn
+++ b/godot/characters/player/Player.tscn
@@ -12,6 +12,7 @@
extents = Vector2( 7, 12 )
[node name="Player" type="KinematicBody2D"]
+collision_mask = 2
script = ExtResource( 5 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
diff --git a/godot/levels/Level2.tmx b/godot/levels/Level2.tmx
new file mode 100644
index 0000000..4a5f162
--- /dev/null
+++ b/godot/levels/Level2.tmx
@@ -0,0 +1,32 @@
+
+
diff --git a/godot/levels/level01.tmx.import b/godot/levels/Level2.tmx.import
similarity index 52%
rename from godot/levels/level01.tmx.import
rename to godot/levels/Level2.tmx.import
index b5b61e8..b3d3559 100644
--- a/godot/levels/level01.tmx.import
+++ b/godot/levels/Level2.tmx.import
@@ -2,12 +2,12 @@
importer="vnen.tiled_importer"
type="PackedScene"
-path="res://.import/level01.tmx-65e129bada03d3bf56997e5be6fa923f.scn"
+path="res://.import/Level2.tmx-357d8ae9edfbc85f5abb1db3655640e1.scn"
[deps]
-source_file="res://levels/level01.tmx"
-dest_files=[ "res://.import/level01.tmx-65e129bada03d3bf56997e5be6fa923f.scn" ]
+source_file="res://levels/Level2.tmx"
+dest_files=[ "res://.import/Level2.tmx-357d8ae9edfbc85f5abb1db3655640e1.scn" ]
[params]
@@ -15,7 +15,8 @@ custom_properties=true
tile_metadata=false
uv_clip=true
image_flags=7
-collision_layer=1
+collision_layer=2
+collision_mask=0
embed_internal_images=false
save_tiled_properties=false
add_background=true
diff --git a/godot/levels/Level2.tscn b/godot/levels/Level2.tscn
new file mode 100644
index 0000000..13c3651
--- /dev/null
+++ b/godot/levels/Level2.tscn
@@ -0,0 +1,41 @@
+[gd_scene load_steps=5 format=2]
+
+[ext_resource path="res://camera_fix.gd" type="Script" id=1]
+[ext_resource path="res://characters/player/Player.tscn" type="PackedScene" id=2]
+[ext_resource path="res://assets/backgrounds/hills.png" type="Texture" id=3]
+[ext_resource path="res://levels/Level2.tmx" type="PackedScene" id=4]
+
+[node name="Level2" type="Node2D"]
+
+[node name="Player" parent="." instance=ExtResource( 2 )]
+
+[node name="Camera2D" type="Camera2D" parent="Player"]
+current = true
+limit_left = 0
+limit_top = 0
+limit_right = 512
+limit_bottom = 288
+drag_margin_h_enabled = true
+drag_margin_v_enabled = true
+__meta__ = {
+"_edit_bone_": true
+}
+
+[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="Player/Camera2D"]
+rect = Rect2( 0, 0, 24, 24 )
+
+[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
+
+[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
+motion_scale = Vector2( 0.2, 0.2 )
+motion_offset = Vector2( 0, -288 )
+motion_mirroring = Vector2( 528, 0 )
+
+[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
+texture = ExtResource( 3 )
+centered = false
+
+[node name="Map" type="Node2D" parent="."]
+
+[node name="Level2" parent="Map" instance=ExtResource( 4 )]
+script = ExtResource( 1 )
diff --git a/godot/levels/Prototype.tmx b/godot/levels/Prototype.tmx
new file mode 100644
index 0000000..f6fb3da
--- /dev/null
+++ b/godot/levels/Prototype.tmx
@@ -0,0 +1,32 @@
+
+
diff --git a/godot/levels/Prototype.tmx.import b/godot/levels/Prototype.tmx.import
new file mode 100644
index 0000000..01f4b39
--- /dev/null
+++ b/godot/levels/Prototype.tmx.import
@@ -0,0 +1,23 @@
+[remap]
+
+importer="vnen.tiled_importer"
+type="PackedScene"
+path="res://.import/Prototype.tmx-1674122a110386791b767b1f6628b68b.scn"
+
+[deps]
+
+source_file="res://levels/Prototype.tmx"
+dest_files=[ "res://.import/Prototype.tmx-1674122a110386791b767b1f6628b68b.scn" ]
+
+[params]
+
+custom_properties=true
+tile_metadata=false
+uv_clip=true
+image_flags=7
+collision_layer=2
+collision_mask=0
+embed_internal_images=false
+save_tiled_properties=false
+add_background=true
+post_import_script=""
diff --git a/godot/Level1.tscn b/godot/levels/Prototype.tscn
similarity index 59%
rename from godot/Level1.tscn
rename to godot/levels/Prototype.tscn
index 4c3cddc..d33d09c 100644
--- a/godot/Level1.tscn
+++ b/godot/levels/Prototype.tscn
@@ -1,23 +1,22 @@
-[gd_scene load_steps=4 format=2]
+[gd_scene load_steps=5 format=2]
-[ext_resource path="res://assets/backgrounds/mountains.png" type="Texture" id=1]
-[ext_resource path="res://levels/level01.tmx" type="PackedScene" id=3]
-[ext_resource path="res://characters/player/Player.tscn" type="PackedScene" id=4]
+[ext_resource path="res://camera_fix.gd" type="Script" id=1]
+[ext_resource path="res://characters/player/Player.tscn" type="PackedScene" id=2]
+[ext_resource path="res://levels/Prototype.tmx" type="PackedScene" id=3]
+[ext_resource path="res://assets/backgrounds/mountains.png" type="Texture" id=4]
-[node name="Level1" type="Node2D"]
+[node name="Prototype" type="Node2D"]
-[node name="Player" parent="." instance=ExtResource( 4 )]
+[node name="Player" parent="." instance=ExtResource( 2 )]
[node name="Camera2D" type="Camera2D" parent="Player"]
current = true
limit_left = 0
limit_top = 0
-limit_right = 2304
-limit_bottom = 576
+limit_right = 512
+limit_bottom = 288
drag_margin_h_enabled = true
drag_margin_v_enabled = true
-editor_draw_limits = true
-editor_draw_drag_margin = true
__meta__ = {
"_edit_bone_": true
}
@@ -28,14 +27,15 @@ rect = Rect2( 0, 0, 24, 24 )
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
-motion_scale = Vector2( 0.2, 1 )
+motion_scale = Vector2( 0.2, 0.1 )
+motion_offset = Vector2( 0, -288 )
motion_mirroring = Vector2( 528, 0 )
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
-texture = ExtResource( 1 )
+texture = ExtResource( 4 )
centered = false
[node name="Map" type="Node2D" parent="."]
-position = Vector2( 0, 18 )
-[node name="level01" parent="Map" instance=ExtResource( 3 )]
+[node name="Prototype" parent="Map" instance=ExtResource( 3 )]
+script = ExtResource( 1 )
diff --git a/godot/levels/level01.tmx b/godot/levels/level01.tmx
deleted file mode 100644
index 9bc5967..0000000
--- a/godot/levels/level01.tmx
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
diff --git a/godot/parallax/clouds.tmx b/godot/parallax/clouds.tmx
index 59fcd96..5eb1130 100644
--- a/godot/parallax/clouds.tmx
+++ b/godot/parallax/clouds.tmx
@@ -2,31 +2,8 @@
diff --git a/godot/parallax/hills.tmx b/godot/parallax/hills.tmx
index bf732ab..5373dbb 100644
--- a/godot/parallax/hills.tmx
+++ b/godot/parallax/hills.tmx
@@ -2,31 +2,8 @@
diff --git a/godot/parallax/mountains.tmx b/godot/parallax/mountains.tmx
index e963695..968553e 100644
--- a/godot/parallax/mountains.tmx
+++ b/godot/parallax/mountains.tmx
@@ -2,31 +2,8 @@
diff --git a/godot/parallax/snow.tmx b/godot/parallax/snow.tmx
index b35f59d..adabf88 100644
--- a/godot/parallax/snow.tmx
+++ b/godot/parallax/snow.tmx
@@ -2,31 +2,8 @@
diff --git a/godot/project.godot b/godot/project.godot
index e1b9eb4..52b2be8 100644
--- a/godot/project.godot
+++ b/godot/project.godot
@@ -53,6 +53,18 @@ texture={
"stream": false,
"svg/scale": 1.0
}
+vnen.tiled_importer={
+"add_background": true,
+"collision_layer": 2,
+"collision_mask": 0,
+"custom_properties": true,
+"embed_internal_images": false,
+"image_flags": 7,
+"post_import_script": "",
+"save_tiled_properties": false,
+"tile_metadata": false,
+"uv_clip": true
+}
[input]
@@ -81,8 +93,8 @@ right={
[layer_names]
-2d_physics/layer_1="Tiles"
-2d_physics/layer_2="Player"
+2d_physics/layer_1="Player"
+2d_physics/layer_2="Tiles"
[physics]
diff --git a/godot/tilesets/backgrounds.tsx b/godot/tilesets/backgrounds.tsx
index 1635d01..5e4097e 100644
--- a/godot/tilesets/backgrounds.tsx
+++ b/godot/tilesets/backgrounds.tsx
@@ -1,4 +1,5 @@
+
diff --git a/godot/tilesets/tiles.tsx b/godot/tilesets/tiles.tsx
index 7eb103a..547a5ff 100644
--- a/godot/tilesets/tiles.tsx
+++ b/godot/tilesets/tiles.tsx
@@ -1,5 +1,6 @@
+
@@ -21,11 +22,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -46,11 +92,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -91,6 +174,12 @@
+
+
+
+
+
+
@@ -111,6 +200,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -131,6 +231,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -156,6 +288,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -176,6 +329,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -196,4 +369,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+