lighting, parallax, tilemap

This commit is contained in:
OddlyTimbot 2025-05-05 21:06:50 -04:00
parent 5e6d16f8b5
commit 54f9fda72e
18 changed files with 640 additions and 17 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b02nj4rsecisl"
path="res://.godot/imported/forestbackground.png-4846598cc10da3096137e8a4da3839f8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/background/forestbackground.png"
dest_files=["res://.godot/imported/forestbackground.png-4846598cc10da3096137e8a4da3839f8.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 not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://uswj5ignpua4"
path="res://.godot/imported/forestbackground_mid.png-5b7094629076846d134a2bfdea519d1d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/background/forestbackground_mid.png"
dest_files=["res://.godot/imported/forestbackground_mid.png-5b7094629076846d134a2bfdea519d1d.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 not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bu2davrqnpe"
path="res://.godot/imported/plane.png-e62a8d1a3f3bfdfe1d44089d7bf28e27.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/background/plane.png"
dest_files=["res://.godot/imported/plane.png-e62a8d1a3f3bfdfe1d44089d7bf28e27.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 not shown.

After

Width:  |  Height:  |  Size: 670 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dhkx31lax12gl"
path="res://.godot/imported/sky_far.png-53af80db9e190becec56523dcc98b81b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/background/sky_far.png"
dest_files=["res://.godot/imported/sky_far.png-53af80db9e190becec56523dcc98b81b.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 not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cfbvrcr2cxndb"
path="res://.godot/imported/trees_foreground.png-41fd28b4c519661740065de2874a011c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/background/trees_foreground.png"
dest_files=["res://.godot/imported/trees_foreground.png-41fd28b4c519661740065de2874a011c.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 not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dq8nlvjv522pc"
path="res://.godot/imported/mushroom_32x64.png-0518ef5d6eb970404747f784c23426d1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/terrain/vegetation/mushroom_32x64.png"
dest_files=["res://.godot/imported/mushroom_32x64.png-0518ef5d6eb970404747f784c23426d1.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 not shown.

After

Width:  |  Height:  |  Size: 675 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cfkcsnjdu1hyu"
path="res://.godot/imported/veg_32x32.png-bf2a8a729cda480430649d77b20ab720.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/terrain/vegetation/veg_32x32.png"
dest_files=["res://.godot/imported/veg_32x32.png-bf2a8a729cda480430649d77b20ab720.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

View File

@ -1,67 +1,400 @@
[gd_scene load_steps=12 format=3 uid="uid://cwuxdg5c8ylmp"]
[gd_scene load_steps=20 format=4 uid="uid://cwuxdg5c8ylmp"]
[ext_resource type="Script" uid="uid://cw3ucen7ivcu3" path="res://scripts/gamecontroller.gd" id="1_wj22x"]
[ext_resource type="Script" uid="uid://bus3b1g717jlm" path="res://scripts/scene_manager.gd" id="2_lbhrr"]
[ext_resource type="PackedScene" uid="uid://cgk1d1f5ffbbd" path="res://scenes/player.tscn" id="2_lnu2h"]
[ext_resource type="PackedScene" uid="uid://clf5mhteceas4" path="res://scenes/trigger.tscn" id="3_jlag1"]
[ext_resource type="Texture2D" uid="uid://c386aypkw54oc" path="res://assets/graphics/terrain/Terrain (32x32).png" id="3_u5sy4"]
[ext_resource type="Texture2D" uid="uid://dhkx31lax12gl" path="res://assets/graphics/background/sky_far.png" id="3_vtaks"]
[ext_resource type="Texture2D" uid="uid://dq8nlvjv522pc" path="res://assets/graphics/terrain/vegetation/mushroom_32x64.png" id="4_0tnpc"]
[ext_resource type="PackedScene" uid="uid://cym46ub26gs80" path="res://scenes/crate.tscn" id="4_iywne"]
[ext_resource type="Texture2D" uid="uid://uswj5ignpua4" path="res://assets/graphics/background/forestbackground_mid.png" id="4_kvpfn"]
[ext_resource type="Texture2D" uid="uid://cfbvrcr2cxndb" path="res://assets/graphics/background/trees_foreground.png" id="5_dinhu"]
[ext_resource type="Texture2D" uid="uid://cfkcsnjdu1hyu" path="res://assets/graphics/terrain/vegetation/veg_32x32.png" id="5_vtaks"]
[ext_resource type="Texture2D" uid="uid://bu2davrqnpe" path="res://assets/graphics/background/plane.png" id="6_kvuet"]
[ext_resource type="PackedScene" uid="uid://c633ux67ehud7" path="res://scenes/bullet.tscn" id="6_p57ef"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
texture = ExtResource("3_u5sy4")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:0/0/terrains_peering_bit/right_side = 0
0:0/0/terrains_peering_bit/bottom_right_corner = 0
0:0/0/terrains_peering_bit/bottom_side = 0
1:0/0 = 0
1:0/0/terrain_set = 0
1:0/0/terrain = 0
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:0/0/terrains_peering_bit/right_side = 0
1:0/0/terrains_peering_bit/bottom_right_corner = 0
1:0/0/terrains_peering_bit/bottom_side = 0
1:0/0/terrains_peering_bit/bottom_left_corner = 0
1:0/0/terrains_peering_bit/left_side = 0
2:0/0 = 0
2:0/0/terrain_set = 0
2:0/0/terrain = 0
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:0/0/terrains_peering_bit/bottom_side = 0
2:0/0/terrains_peering_bit/bottom_left_corner = 0
2:0/0/terrains_peering_bit/left_side = 0
4:0/0 = 0
4:0/0/terrain_set = 0
4:0/0/terrain = 0
4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
4:0/0/terrains_peering_bit/bottom_side = 0
6:0/0 = 0
6:0/0/terrain_set = 0
6:0/0/terrain = 0
6:0/0/terrains_peering_bit/right_side = 0
6:0/0/terrains_peering_bit/bottom_side = 0
6:0/0/terrains_peering_bit/bottom_left_corner = 0
6:0/0/terrains_peering_bit/left_side = 0
6:0/0/terrains_peering_bit/top_left_corner = 0
6:0/0/terrains_peering_bit/top_side = 0
6:0/0/terrains_peering_bit/top_right_corner = 0
7:0/0 = 0
7:0/0/terrain_set = 0
7:0/0/terrain = 0
7:0/0/terrains_peering_bit/right_side = 0
7:0/0/terrains_peering_bit/bottom_right_corner = 0
7:0/0/terrains_peering_bit/bottom_side = 0
7:0/0/terrains_peering_bit/left_side = 0
7:0/0/terrains_peering_bit/top_left_corner = 0
7:0/0/terrains_peering_bit/top_side = 0
7:0/0/terrains_peering_bit/top_right_corner = 0
9:0/0 = 0
9:0/0/terrain_set = 0
9:0/0/terrain = 0
9:0/0/terrains_peering_bit/right_side = 0
9:0/0/terrains_peering_bit/bottom_right_corner = 0
9:0/0/terrains_peering_bit/bottom_side = 0
9:0/0/terrains_peering_bit/bottom_left_corner = 0
9:0/0/terrains_peering_bit/left_side = 0
9:0/0/terrains_peering_bit/top_side = 0
10:0/0 = 0
10:0/0/terrain_set = 0
10:0/0/terrain = 0
10:0/0/terrains_peering_bit/right_side = 0
10:0/0/terrains_peering_bit/bottom_side = 0
10:0/0/terrains_peering_bit/bottom_left_corner = 0
10:0/0/terrains_peering_bit/left_side = 0
10:0/0/terrains_peering_bit/top_left_corner = 0
10:0/0/terrains_peering_bit/top_side = 0
12:0/0 = 0
12:0/0/terrain_set = 0
12:0/0/terrain = 0
12:0/0/terrains_peering_bit/right_side = 0
12:0/0/terrains_peering_bit/bottom_right_corner = 0
12:0/0/terrains_peering_bit/bottom_side = 0
12:0/0/terrains_peering_bit/left_side = 0
12:0/0/terrains_peering_bit/top_side = 0
13:0/0 = 0
13:0/0/terrain_set = 0
13:0/0/terrain = 0
13:0/0/terrains_peering_bit/right_side = 0
13:0/0/terrains_peering_bit/bottom_side = 0
13:0/0/terrains_peering_bit/bottom_left_corner = 0
13:0/0/terrains_peering_bit/left_side = 0
13:0/0/terrains_peering_bit/top_side = 0
15:0/0 = 0
15:0/0/terrain_set = 0
15:0/0/terrain = 0
15:0/0/terrains_peering_bit/right_side = 0
15:0/0/terrains_peering_bit/bottom_side = 0
15:0/0/terrains_peering_bit/left_side = 0
15:0/0/terrains_peering_bit/top_side = 0
0:1/0 = 0
0:1/0/terrain_set = 0
0:1/0/terrain = 0
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:1/0/terrains_peering_bit/right_side = 0
0:1/0/terrains_peering_bit/bottom_right_corner = 0
0:1/0/terrains_peering_bit/bottom_side = 0
0:1/0/terrains_peering_bit/top_side = 0
0:1/0/terrains_peering_bit/top_right_corner = 0
1:1/0 = 0
2:1/0 = 0
2:1/0/terrain_set = 0
2:1/0/terrain = 0
2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:1/0/terrains_peering_bit/bottom_side = 0
2:1/0/terrains_peering_bit/bottom_left_corner = 0
2:1/0/terrains_peering_bit/left_side = 0
2:1/0/terrains_peering_bit/top_left_corner = 0
2:1/0/terrains_peering_bit/top_side = 0
4:1/0 = 0
4:1/0/terrain_set = 0
4:1/0/terrain = 0
4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
4:1/0/terrains_peering_bit/bottom_side = 0
4:1/0/terrains_peering_bit/top_side = 0
6:1/0 = 0
6:1/0/terrain_set = 0
6:1/0/terrain = 0
6:1/0/terrains_peering_bit/right_side = 0
6:1/0/terrains_peering_bit/bottom_right_corner = 0
6:1/0/terrains_peering_bit/bottom_side = 0
6:1/0/terrains_peering_bit/bottom_left_corner = 0
6:1/0/terrains_peering_bit/left_side = 0
6:1/0/terrains_peering_bit/top_left_corner = 0
6:1/0/terrains_peering_bit/top_side = 0
7:1/0 = 0
7:1/0/terrain_set = 0
7:1/0/terrain = 0
7:1/0/terrains_peering_bit/right_side = 0
7:1/0/terrains_peering_bit/bottom_right_corner = 0
7:1/0/terrains_peering_bit/bottom_side = 0
7:1/0/terrains_peering_bit/bottom_left_corner = 0
7:1/0/terrains_peering_bit/left_side = 0
7:1/0/terrains_peering_bit/top_side = 0
7:1/0/terrains_peering_bit/top_right_corner = 0
9:1/0 = 0
9:1/0/terrain_set = 0
9:1/0/terrain = 0
9:1/0/terrains_peering_bit/right_side = 0
9:1/0/terrains_peering_bit/bottom_right_corner = 0
9:1/0/terrains_peering_bit/bottom_side = 0
9:1/0/terrains_peering_bit/left_side = 0
9:1/0/terrains_peering_bit/top_side = 0
9:1/0/terrains_peering_bit/top_right_corner = 0
10:1/0 = 0
10:1/0/terrain_set = 0
10:1/0/terrain = 0
10:1/0/terrains_peering_bit/right_side = 0
10:1/0/terrains_peering_bit/bottom_side = 0
10:1/0/terrains_peering_bit/left_side = 0
10:1/0/terrains_peering_bit/top_left_corner = 0
10:1/0/terrains_peering_bit/top_side = 0
10:1/0/terrains_peering_bit/top_right_corner = 0
12:1/0 = 0
12:1/0/terrain_set = 0
12:1/0/terrain = 0
12:1/0/terrains_peering_bit/right_side = 0
12:1/0/terrains_peering_bit/bottom_side = 0
12:1/0/terrains_peering_bit/left_side = 0
12:1/0/terrains_peering_bit/top_side = 0
12:1/0/terrains_peering_bit/top_right_corner = 0
13:1/0 = 0
13:1/0/terrain_set = 0
13:1/0/terrain = 0
13:1/0/terrains_peering_bit/right_side = 0
13:1/0/terrains_peering_bit/bottom_side = 0
13:1/0/terrains_peering_bit/left_side = 0
13:1/0/terrains_peering_bit/top_left_corner = 0
13:1/0/terrains_peering_bit/top_side = 0
15:1/0 = 0
15:1/0/terrain_set = 0
15:1/0/terrain = 0
15:1/0/terrains_peering_bit/right_side = 0
15:1/0/terrains_peering_bit/bottom_side = 0
15:1/0/terrains_peering_bit/bottom_left_corner = 0
15:1/0/terrains_peering_bit/left_side = 0
15:1/0/terrains_peering_bit/top_side = 0
15:1/0/terrains_peering_bit/top_right_corner = 0
16:1/0 = 0
16:1/0/terrain_set = 0
16:1/0/terrain = 0
16:1/0/terrains_peering_bit/right_side = 0
16:1/0/terrains_peering_bit/bottom_right_corner = 0
16:1/0/terrains_peering_bit/bottom_side = 0
16:1/0/terrains_peering_bit/left_side = 0
16:1/0/terrains_peering_bit/top_left_corner = 0
16:1/0/terrains_peering_bit/top_side = 0
0:2/0 = 0
0:2/0/terrain_set = 0
0:2/0/terrain = 0
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:2/0/terrains_peering_bit/right_side = 0
0:2/0/terrains_peering_bit/top_side = 0
0:2/0/terrains_peering_bit/top_right_corner = 0
1:2/0 = 0
1:2/0/terrain_set = 0
1:2/0/terrain = 0
1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:2/0/terrains_peering_bit/right_side = 0
1:2/0/terrains_peering_bit/left_side = 0
1:2/0/terrains_peering_bit/top_left_corner = 0
1:2/0/terrains_peering_bit/top_side = 0
1:2/0/terrains_peering_bit/top_right_corner = 0
2:2/0 = 0
2:2/0/terrain_set = 0
2:2/0/terrain = 0
2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:2/0/terrains_peering_bit/left_side = 0
2:2/0/terrains_peering_bit/top_left_corner = 0
2:2/0/terrains_peering_bit/top_side = 0
4:2/0 = 0
4:2/0/terrain_set = 0
4:2/0/terrain = 0
4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
4:2/0/terrains_peering_bit/top_side = 0
6:3/0 = 0
6:3/0/terrain_set = 0
6:3/0/terrain = 0
6:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 0, -16, -0.31863, 16, -16, 16)
6:3/0/terrains_peering_bit/right_side = 0
6:3/0/terrains_peering_bit/bottom_side = 0
6:3/0/terrains_peering_bit/top_side = 0
6:3/0/terrains_peering_bit/top_right_corner = 0
7:3/0 = 0
7:3/0/terrain_set = 0
7:3/0/terrain = 0
7:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(2.54905, -16, 16, -16, 16, 16, 2.54905, 16)
7:3/0/terrains_peering_bit/bottom_side = 0
7:3/0/terrains_peering_bit/left_side = 0
7:3/0/terrains_peering_bit/top_left_corner = 0
7:3/0/terrains_peering_bit/top_side = 0
9:3/0 = 0
9:3/0/terrain_set = 0
9:3/0/terrain = 0
9:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.18631, -16, -1.59315)
9:3/0/terrains_peering_bit/right_side = 0
9:3/0/terrains_peering_bit/bottom_side = 0
9:3/0/terrains_peering_bit/bottom_left_corner = 0
9:3/0/terrains_peering_bit/left_side = 0
10:3/0 = 0
10:3/0/terrain_set = 0
10:3/0/terrain = 0
10:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.18631, -16, -1.59315)
10:3/0/terrains_peering_bit/right_side = 0
10:3/0/terrains_peering_bit/bottom_right_corner = 0
10:3/0/terrains_peering_bit/bottom_side = 0
10:3/0/terrains_peering_bit/left_side = 0
12:3/0 = 0
12:3/0/terrain_set = 0
12:3/0/terrain = 0
12:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, -6.69124, -16, -7.00988, 16, -16, 16)
12:3/0/terrains_peering_bit/right_side = 0
12:3/0/terrains_peering_bit/bottom_side = 0
12:3/0/terrains_peering_bit/top_side = 0
13:3/0 = 0
13:3/0/terrain_set = 0
13:3/0/terrain = 0
13:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -3.82357, -16, -2.86768)
13:3/0/terrains_peering_bit/right_side = 0
13:3/0/terrains_peering_bit/bottom_side = 0
13:3/0/terrains_peering_bit/left_side = 0
15:3/0 = 0
15:3/0/terrain_set = 0
15:3/0/terrain = 0
15:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, -0.955893, -0.955891, -0.955893, -0.63726, 16, -16, 16)
15:3/0/terrains_peering_bit/right_side = 0
15:3/0/terrains_peering_bit/bottom_side = 0
16:3/0 = 0
16:3/0/terrain_set = 0
16:3/0/terrain = 0
16:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, 1.27452, 16, 0, -0.31863, -16, -0.955893)
16:3/0/terrains_peering_bit/bottom_side = 0
16:3/0/terrains_peering_bit/left_side = 0
0:4/0 = 0
0:4/0/terrain_set = 0
0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
0:4/0/terrains_peering_bit/right_side = 0
1:4/0 = 0
1:4/0/terrain_set = 0
1:4/0/terrain = 0
1:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
1:4/0/terrains_peering_bit/right_side = 0
1:4/0/terrains_peering_bit/left_side = 0
2:4/0 = 0
2:4/0/terrain_set = 0
2:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
2:4/0/terrains_peering_bit/left_side = 0
4:4/0 = 0
4:4/0/terrain_set = 0
4:4/0/terrain = 0
4:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 16, -16, 16, 16, -16, 16)
6:4/0 = 0
6:4/0/terrain_set = 0
6:4/0/terrain = 0
6:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -16, 0, -16, -0.31863, 16, -16, 16)
6:4/0/terrains_peering_bit/right_side = 0
6:4/0/terrains_peering_bit/bottom_right_corner = 0
6:4/0/terrains_peering_bit/bottom_side = 0
6:4/0/terrains_peering_bit/top_side = 0
7:4/0 = 0
7:4/0/terrain_set = 0
7:4/0/terrain = 0
7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(2.54905, -16, 16, -16, 16, 16, 2.54905, 16)
7:4/0/terrains_peering_bit/bottom_side = 0
7:4/0/terrains_peering_bit/bottom_left_corner = 0
7:4/0/terrains_peering_bit/left_side = 0
7:4/0/terrains_peering_bit/top_side = 0
9:4/0 = 0
9:4/0/terrain_set = 0
9:4/0/terrain = 0
9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -0.63726, 16, -0.955893, 16, 16, -16, 16)
9:4/0/terrains_peering_bit/right_side = 0
9:4/0/terrains_peering_bit/left_side = 0
9:4/0/terrains_peering_bit/top_left_corner = 0
9:4/0/terrains_peering_bit/top_side = 0
10:4/0 = 0
10:4/0/terrain_set = 0
10:4/0/terrain = 0
10:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, -0.63726, 16, -0.955893, 16, 16, -16, 16)
10:4/0/terrains_peering_bit/right_side = 0
10:4/0/terrains_peering_bit/left_side = 0
10:4/0/terrains_peering_bit/top_side = 0
10:4/0/terrains_peering_bit/top_right_corner = 0
12:4/0 = 0
12:4/0/terrain_set = 0
12:4/0/terrain = 0
12:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 3.50494, 16, 3.18631, 16, 16, -16, 16)
12:4/0/terrains_peering_bit/right_side = 0
12:4/0/terrains_peering_bit/left_side = 0
12:4/0/terrains_peering_bit/top_side = 0
13:4/0 = 0
13:4/0/terrain_set = 0
13:4/0/terrain = 0
13:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(5.73536, -16, 16, -16, 16, 16, 5.09809, 16)
13:4/0/terrains_peering_bit/bottom_side = 0
13:4/0/terrains_peering_bit/left_side = 0
13:4/0/terrains_peering_bit/top_side = 0
15:4/0 = 0
15:4/0/terrain_set = 0
15:4/0/terrain = 0
15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -16, 1.59315, 0.63726, 16, 0.955891, 16, 16, -16, 16, -16, -16)
15:4/0/terrains_peering_bit/right_side = 0
15:4/0/terrains_peering_bit/top_side = 0
16:4/0 = 0
16:4/0/terrain_set = 0
16:4/0/terrain = 0
16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(0.637264, -16, 16, -16, 16, 16, -16, 16, -16, 0.955891, 1.59315, 1.91179)
16:4/0/terrains_peering_bit/left_side = 0
16:4/0/terrains_peering_bit/top_side = 0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_kvpfn"]
texture = ExtResource("4_0tnpc")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrains_peering_bit/bottom_side = 1
0:1/0 = 0
0:1/0/terrain_set = 0
0:1/0/terrain = 1
0:1/0/terrains_peering_bit/top_side = 1
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_dinhu"]
texture = ExtResource("5_vtaks")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 1
[sub_resource type="TileSet" id="TileSet_0tnpc"]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 1
terrain_set_0/mode = 0
terrain_set_0/terrain_0/name = "LeafyRocks"
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
terrain_set_0/terrain_1/name = "veg"
terrain_set_0/terrain_1/color = Color(0.5, 0.4375, 0.25, 1)
sources/0 = SubResource("TileSetAtlasSource_gee14")
sources/1 = SubResource("TileSetAtlasSource_kvpfn")
sources/2 = SubResource("TileSetAtlasSource_dinhu")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_um86g"]
size = Vector2(55.5, 41)
@ -75,9 +408,41 @@ script = ExtResource("1_wj22x")
unique_name_in_owner = true
script = ExtResource("2_lbhrr")
[node name="Parallax2D" type="Parallax2D" parent="."]
repeat_size = Vector2(320, 180)
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D"]
texture_filter = 1
position = Vector2(160, 90)
texture = ExtResource("3_vtaks")
[node name="Parallax2D2" type="Parallax2D" parent="."]
scroll_scale = Vector2(0.5, 0.5)
repeat_size = Vector2(320, 0)
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D2"]
texture_filter = 1
position = Vector2(160, 300)
texture = ExtResource("4_kvpfn")
[node name="Parallax2D3" type="Parallax2D" parent="."]
scroll_scale = Vector2(0.8, 0.8)
repeat_size = Vector2(320, 0)
[node name="Sprite2D" type="Sprite2D" parent="Parallax2D3"]
texture_filter = 1
position = Vector2(160, 300)
texture = ExtResource("5_dinhu")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1
position = Vector2(684, 372)
texture = ExtResource("6_kvuet")
[node name="TileMapLayer" type="TileMapLayer" parent="."]
texture_filter = 1
tile_map_data = PackedByteArray(0, 0, 14, 0, 10, 0, 0, 0, 4, 0, 4, 0, 0, 0, 17, 0, 8, 0, 0, 0, 0, 0, 4, 0, 0, 0, 18, 0, 8, 0, 0, 0, 1, 0, 4, 0, 0, 0, 19, 0, 8, 0, 0, 0, 1, 0, 4, 0, 0, 0, 20, 0, 8, 0, 0, 0, 2, 0, 4, 0, 0, 0)
position = Vector2(1, 0)
tile_map_data = PackedByteArray("AAAOAAoAAAAEAAQAAAAQAAoAAAAPAAQAAAARAAoAAAABAAQAAAASAAoAAAABAAQAAAATAAoAAAAQAAQAAAAJAAoAAAAEAAIAAAAJAAkAAAANAAMAAAAIAAkAAAAPAAQAAAAIAAgAAAAQAAMAAAAHAAgAAAAPAAQAAAAHAAcAAAAEAAAAAAATAAkAAAAEAAAAAAAQAAkAAAAEAAAAAAAEAA0AAAABAAIAAAAFAA0AAAABAAIAAAAGAA0AAAABAAIAAAAHAA0AAAABAAIAAAAIAA0AAAABAAIAAAAJAA0AAAABAAIAAAAKAA0AAAABAAIAAAALAA0AAAAJAAQAAAAMAA0AAAABAAQAAAANAA0AAAAKAAQAAAAOAA0AAAABAAIAAAAPAA0AAAABAAIAAAAQAA0AAAABAAIAAAARAA0AAAABAAIAAAASAA0AAAABAAIAAAATAA0AAAABAAIAAAAUAA0AAAABAAIAAAAVAA0AAAABAAIAAAAWAA0AAAABAAIAAAAXAA0AAAABAAIAAAAYAA0AAAABAAIAAAAZAA0AAAACAAIAAAAEAAwAAAABAAAAAAAFAAwAAAABAAAAAAAGAAwAAAABAAAAAAAHAAwAAAABAAAAAAAIAAwAAAABAAAAAAAJAAwAAAABAAAAAAAKAAwAAAABAAAAAAALAAwAAAACAAAAAAANAAwAAAAAAAAAAAAOAAwAAAABAAAAAAAPAAwAAAABAAAAAAAQAAwAAAABAAAAAAARAAwAAAABAAAAAAASAAwAAAABAAAAAAATAAwAAAABAAAAAAAUAAwAAAABAAAAAAAVAAwAAAABAAAAAAAWAAwAAAABAAAAAAAXAAwAAAABAAAAAAAYAAwAAAABAAAAAAAZAAwAAAACAAAAAAAQAAgAAgAAAAAAAAAVAAsAAQAAAAEAAAAVAAoAAQAAAAAAAAAWAAsAAQAAAAEAAAAWAAoAAQAAAAAAAAAZAAsAAgAAAAAAAAAYAAsAAQAAAAEAAAAYAAoAAQAAAAAAAAAXAAsAAQAAAAEAAAAXAAoAAQAAAAAAAAANAAkAAAAQAAQAAAAMAAkAAAABAAQAAAALAAkAAAABAAQAAAAKAAkAAAABAAQAAAADAAwAAAABAAAAAAACAAwAAAABAAAAAAABAAwAAAABAAAAAAAAAAwAAAAGAAQAAAADAA0AAAABAAIAAAACAA0AAAABAAIAAAABAA0AAAABAAIAAAAAAA0AAAAAAAIAAAA=")
tile_set = SubResource("TileSet_0tnpc")
[node name="CharacterBody2D" parent="." instance=ExtResource("2_lnu2h")]
@ -86,7 +451,7 @@ position = Vector2(471, 287)
[node name="level" type="Node2D" parent="."]
[node name="StaticBody2D" type="StaticBody2D" parent="level"]
position = Vector2(465, 331)
position = Vector2(1050, 300)
scale = Vector2(0.600002, 1)
metadata/_edit_group_ = true
@ -95,7 +460,7 @@ position = Vector2(-0.75, 10.5)
shape = SubResource("RectangleShape2D_um86g")
[node name="StaticBody2D2" type="StaticBody2D" parent="level"]
position = Vector2(520, 335)
position = Vector2(1091, 498)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D2"]
@ -103,7 +468,7 @@ position = Vector2(-0.75, 10.5)
shape = SubResource("RectangleShape2D_um86g")
[node name="StaticBody2D3" type="StaticBody2D" parent="level"]
position = Vector2(610, 267)
position = Vector2(1051, 368)
scale = Vector2(2.2, 1)
metadata/_edit_group_ = true
@ -135,7 +500,7 @@ position = Vector2(403, 324)
position = Vector2(357, 331)
[node name="Trigger" parent="." instance=ExtResource("3_jlag1")]
position = Vector2(189, 316)
position = Vector2(-39, 214)
[node name="Trigger2" parent="." instance=ExtResource("3_jlag1")]
position = Vector2(638, 390)
@ -144,5 +509,10 @@ effect = "teleport"
[node name="Area2D" parent="." instance=ExtResource("6_p57ef")]
position = Vector2(366, 300)
[node name="DirectionalLight2D" type="DirectionalLight2D" parent="."]
color = Color(0.328443, 0.958547, 0.863958, 1)
energy = 0.23
blend_mode = 1
[connection signal="triggerFired" from="Trigger" to="." method="_on_trigger_fired"]
[connection signal="triggerFired" from="Trigger2" to="." method="_on_trigger_fired"]

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=33 format=3 uid="uid://cgk1d1f5ffbbd"]
[gd_scene load_steps=35 format=3 uid="uid://cgk1d1f5ffbbd"]
[ext_resource type="Script" uid="uid://dmchcjip7pcfj" path="res://scripts/player.gd" id="1_3vyb7"]
[ext_resource type="Texture2D" uid="uid://x7vc805d7m4t" path="res://assets/graphics/player/jump/player jump 48x48.png" id="2_dqkch"]
@ -211,6 +211,15 @@ animations = [{
"speed": 12.0
}]
[sub_resource type="Gradient" id="Gradient_qlg0r"]
offsets = PackedFloat32Array(0.014245, 0.678063)
colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_tuyoq"]
gradient = SubResource("Gradient_qlg0r")
fill = 1
fill_from = Vector2(0.5, 0.5)
[node name="CharacterBody2D" type="CharacterBody2D"]
script = ExtResource("1_3vyb7")
metadata/_edit_group_ = true
@ -239,7 +248,7 @@ one_shot = true
texture_filter = 1
position = Vector2(0, -7)
sprite_frames = SubResource("SpriteFrames_jej6c")
animation = &"melee"
animation = &"idle"
autoplay = "idle"
[node name="Camera2D" type="Camera2D" parent="."]
@ -247,4 +256,8 @@ offset = Vector2(0, -20)
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
[node name="PointLight2D" type="PointLight2D" parent="."]
scale = Vector2(2, 2)
texture = SubResource("GradientTexture2D_tuyoq")
[connection signal="animation_finished" from="PlayerGraphic" to="." method="_on_animation_finished"]

View File

@ -30,16 +30,10 @@ var pushEnabled:bool = false
var upJump:bool = false
func _physics_process(delta: float) -> void:
# Add the gravity.
if current_state == State.JUMP:
# apply normal gravity
velocity += get_gravity() * delta
else:
#apply hard gravity
velocity += get_gravity() * hard_gravity * delta
handle_input()
update_movement()
update_movement(delta)
update_states()
update_animation()
move_and_slide()
@ -78,7 +72,15 @@ func handle_input() -> void:
direction = Input.get_axis("ui_left", "ui_right")
func update_movement()-> void:
func update_movement(delta)-> void:
# Add the gravity.
if current_state == State.JUMP:
# apply normal gravity
velocity += get_gravity() * delta
else:
#apply hard gravity
velocity += get_gravity() * hard_gravity * delta
if direction:
velocity.x = move_toward(velocity.x, SPEED * direction, acceleration)
if direction <0: