diff --git a/assets/track.png b/assets/track.png new file mode 100644 index 0000000..c78277e Binary files /dev/null and b/assets/track.png differ diff --git a/assets/track.png.import b/assets/track.png.import new file mode 100644 index 0000000..a551c15 --- /dev/null +++ b/assets/track.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bd0jqkgq1gh7p" +path="res://.godot/imported/track.png-2a16d0d882b60e9efeaeb81e6e259bb4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/track.png" +dest_files=["res://.godot/imported/track.png-2a16d0d882b60e9efeaeb81e6e259bb4.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/src/game/level1.tscn b/src/game/level1.tscn index 3e96935..31b1591 100644 --- a/src/game/level1.tscn +++ b/src/game/level1.tscn @@ -1,16 +1,18 @@ -[gd_scene load_steps=4 format=3 uid="uid://c77xk0mywwt5f"] +[gd_scene load_steps=5 format=3 uid="uid://c77xk0mywwt5f"] [ext_resource type="Script" path="res://src/game/level.gd" id="1_hv75i"] [ext_resource type="PackedScene" uid="uid://ckau5s2tsb3oc" path="res://src/game/player.tscn" id="2_5nf51"] +[ext_resource type="Texture2D" uid="uid://bd0jqkgq1gh7p" path="res://assets/track.png" id="2_knecs"] [sub_resource type="Curve2D" id="Curve2D_ll8bj"] _data = { -"points": PackedVector2Array(-33.6888, -46.2486, 33.6888, 46.2486, 325, 200, -79.196, 14.1421, 79.196, -14.1421, 543, 271, -62.2254, 38.1838, 62.2254, -38.1838, 714, 113, -35.3553, -48.0833, 35.3553, 48.0833, 961, 148, 62.2254, -69.2965, -62.2254, 69.2965, 978, 429, 59.397, -33.9411, -59.397, 33.9411, 739, 445, 77.7818, -1.41421, -77.7818, 1.41421, 596, 562, 62.2254, 25.4558, -62.2254, -25.4558, 316, 518, 42.4264, 69.2965, -42.4264, -69.2965, 119, 387, -1.41421, 50.9117, 1.41421, -50.9117, 72, 187, -33.9411, 22.6274, 33.9411, -22.6274, 137, 52, -38.1838, -12.7279, 38.1838, 12.7279, 241, 47, -25.4558, -49.4975, 25.4558, 49.4975, 299, 154, -15.3576, -23.2238, 15.3576, 23.2238, 325, 200) +"points": PackedVector2Array(-96.196, 0.475433, 96.196, -0.475433, 59, -56, -752, -468, 752, 468, 2353, -2, 962.225, -826.544, -962.225, 826.544, 2317, 1760, 370.586, 534.912, -370.586, -534.912, -2118, 1739, -352, 856, 352, -856, -2086, 159, -428, -220, 428, 220, -810, -253, -102.358, -2.55713, 102.358, 2.55713, 59, -56) } -point_count = 14 +point_count = 7 [node name="level1" type="Node2D" node_paths=PackedStringArray("path", "line")] script = ExtResource("1_hv75i") +starting_width = 400.0 shrink_factor = 0.5 path = NodePath("TrackPath") line = NodePath("TrackLine") @@ -19,6 +21,9 @@ line = NodePath("TrackLine") curve = SubResource("Curve2D_ll8bj") [node name="TrackLine" type="Line2D" parent="."] +texture_repeat = 2 +texture = ExtResource("2_knecs") +texture_mode = 2 [node name="player" parent="." instance=ExtResource("2_5nf51")] position = Vector2(42.7545, -14.9219) diff --git a/src/game/player.tscn b/src/game/player.tscn index 05ae0dd..bcc66e3 100644 --- a/src/game/player.tscn +++ b/src/game/player.tscn @@ -8,11 +8,13 @@ size = Vector2(36, 20) [node name="player" type="StaticBody2D" node_paths=PackedStringArray("camera")] script = ExtResource("1_g4ij8") -acc = 500.0 +acc = 600.0 dec = 400.0 -max_speed = 1000.0 -turn_speed = 2.0 -brake_strength = 60.0 +max_speed = 3000.0 +turn_speed = 0.8 +brake_strength = 600.0 +drift_factor = 1.2 +camera_offset_factor = 0.5 camera = NodePath("Camera2D") [node name="Sprite2D" type="Sprite2D" parent="."]