add htrohr spritesheet

This commit is contained in:
interfisch 2024-11-13 00:47:40 +01:00
parent 1a6343ff29
commit 77b49b0b86
8 changed files with 92 additions and 10 deletions

View file

@ -3,7 +3,7 @@
[ext_resource type="Texture2D" uid="uid://bu05e161cb61k" path="res://sprites/background/spritesheet_bg.png" id="1_8lp8c"]
[ext_resource type="TileSet" uid="uid://beswbm12qkkxk" path="res://sprites/spritesheet_road/bg_road.tres" id="2_jv1n3"]
[ext_resource type="TileSet" uid="uid://buu8w8n61kbxf" path="res://sprites/spritesheet_road/markings.tres" id="3_42xuk"]
[ext_resource type="TileSet" uid="uid://b15864hbqomim" path="res://sprites/spritesheet_road/road.tres" id="4_hpo6d"]
[ext_resource type="TileSet" uid="uid://carpfxq3rn3aa" path="res://sprites/spritesheet_htrohr/htrohr.tres" id="5_748hi"]
[ext_resource type="Texture2D" uid="uid://dpuhee0x5ekud" path="res://sprites/background/spritesheet_scenery.png" id="5_lefrm"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_qbu02"]
@ -214,17 +214,18 @@ tile_map_data = PackedByteArray("AAD7//b/AgAHAAIAAGD4//f/AgAHAAIAAGD3//j/AgAHAAI
tile_set = ExtResource("2_jv1n3")
[node name="markings" type="TileMapLayer" parent="."]
visible = false
z_index = 1
tile_map_data = PackedByteArray("AAAAAAAAAQAAAAAAAFAAAP//AQAAAAAAAHA=")
tile_set = ExtResource("3_42xuk")
[node name="road_r" type="TileMapLayer" parent="."]
tile_map_data = PackedByteArray("AAD//wAAAgABAAAAAFAAAAAAAgABAAAAAFABAAAAAgABAAAAAFAHAP//AAAGAAIAAFAHAAAAAAAHAAIAAFAGAAAAAAAHAAMAAFAFAPv/AAACAAAAAAAGAPv/AAADAAAAAAAGAPz/AAADAAEAAAAGAP3/AAACAAAAAAAHAP3/AAADAAAAAAAHAP7/AAADAAEAAAACAAAAAgABAAAAAFADAAAAAgABAAAAAFAEAAAAAgABAAAAAFAFAAAAAgABAAAAAFAFAPn/AgADAAAAAAAEAPn/AgADAAAAAGAFAPr/AgABAAAAAAADAPn/AgABAAAAACADAPj/AgABAAAAACADAPf/AgADAAAAAHAAAPf/AgADAAAAABACAPf/AgABAAAAAHABAPf/AgABAAAAAHAAAPj/AgABAAAAABAAAPn/AgABAAAAABAAAPr/AgADAAEAABAEAP3/AAAAAAQAAFADAP3/AAAAAAUAAFADAP7/AAABAAUAAFAAAPv/AgADAAAAAEABAPv/AgABAAAAAEACAPv/AgABAAAAAEADAPv/AgABAAAAAEAEAPv/AgAFAAAAAAAEAPz/AgABAAAAABACAP7/AgAGAAIAAGACAP3/AgAAAAIAACABAPz/AgAAAAIAACABAP3/AgAGAAEAACAAAPz/AgADAAIAAFD///z/AgABAAAAAHD+//z/AgABAAAAAHD9//z/AgADAAAAABD9//3/AgABAAAAADD8//3/AgABAAAAACD8//z/AgABAAAAACD8//v/AgAFAAAAAGD9//v/AgADAAAAACD9//r/AgADAAAAAHD9//7/AgAFAAAAACD8//7/AgAFAAAAADD9//n/AgADAAAAAFD9//j/AgADAAAAAAD8//j/AgAFAAAAAED7//b/AAAGAAIAAAD8//b/AAAHAAIAAAD8//f/AAAHAAMAAAD4//f/AAAHAAMAAGD3//f/AAAHAAIAAGD3//j/AAAGAAIAAGD6//b/AAADAAEAAGD5//b/AAADAAAAAGD5//f/AAACAAAAAGD8//r/AgAFAAAAADD8//n/AgAFAAAAABD3//n/AgABAAAAADD3//r/AgADAAEAADD3//v/AgADAAIAACD3//z/AgAAAAIAAFD4//z/AgAGAAIAABD4//3/AgABAAAAADD4//7/AgABAAAAADD4////AgABAAAAADD4/wAAAgADAAAAADD5/wAAAgABAAAAAFD6/wAAAgABAAAAAFD7/wAAAgABAAAAAFD8/wAAAgABAAAAAFD9/wAAAgABAAAAAFD+/wAAAgABAAAAAFAEAPr/AgAFAAAAACADAPr/AgAFAAAAADA=")
tile_set = ExtResource("4_hpo6d")
tile_map_data = PackedByteArray("AAD+/wEAAAAAAAAAAAD//wEAAAAAAAAAAAAAAAEAAAAAAAAAAAABAAEAAAAAAAAAAAACAAEAAAAAAAAAAAADAAEAAAAAAAAAAAAEAAEAAAAAAAAAAAAFAAEAAAAAAAAAAAAGAAEAAAABAAMAAFAHAAAAAAACAAMAAFAHAAEAAAABAAIAAFAGAAAAAAAAAAMAAFAJAP7/AAAAAAIAAFAJAP//AAABAAIAAFAIAP7/AAAAAAMAAFAIAP//AAACAAMAAFAIAAAAAAABAAIAAFAHAP//AAAAAAMAAFAJAP3/AAAAAAAAAFAJAPz/AAAAAAAAAFAJAPv/AAABAAMAAAAIAPr/AAAAAAIAAAAIAPv/AAAAAAMAAAAJAPr/AAABAAIAAAAHAPr/AAAAAAAAAAAGAPr/AAAAAAAAAAAFAPr/AAAAAAAAAAAEAPr/AAAAAAAAAAADAPr/AAAAAAAAAAACAPr/AAADAAAAAGACAPv/AAADAAAAAFABAPr/AAAAAAMAADABAPv/AAAAAAIAADAAAPr/AAAAAAIAAAAAAPv/AAABAAIAADD///r/AAAAAAAAAAD+//r/AAAAAAAAAAD9//r/AAAAAAAAAAD8//r/AAABAAMAAGD8//v/AAAAAAMAAGD7//r/AAABAAIAAGD7//v/AAAAAAIAAGD8////AAAAAAMAADD8/wAAAAAAAAIAADD7////AAABAAMAADD7/wAAAAABAAIAADD9/wAAAAADAAAAAAD9/wEAAAADAAAAADD7//7/AAAAAAAAAFD7//3/AAAAAAAAAFD7//z/AAAAAAAAAFA=")
tile_set = ExtResource("5_748hi")
[node name="road_l" type="TileMapLayer" parent="."]
tile_map_data = PackedByteArray("AAABAP//AgABAAAAAHAAAP//AgABAAAAAHD/////AgABAAAAAHAGAP7/AAAAAAQAAFAFAP7/AAAAAAUAAFAFAP//AAABAAUAAFAFAPz/AAAGAAAAAAAFAP3/AAAGAAEAAAAGAP3/AAAHAAEAAAACAP//AgABAAAAAHADAP//AgABAAAAAHAEAP//AgABAAAAAHAFAPv/AgABAAAAABAFAPr/AgABAAAAABAFAPn/AgAFAAAAAAAEAPn/AgAFAAAAABAEAPr/AgADAAAAAFADAPr/AgADAAAAADADAPf/AgAFAAAAAHADAPn/AgABAAAAADADAPj/AgABAAAAADACAPf/AgABAAAAAFABAPf/AgABAAAAAFAAAPf/AgAFAAAAABAAAPr/AgADAAEAAAAAAPn/AgABAAAAAAAAAPj/AgABAAAAAAAAAPv/AgAFAAAAAEABAPv/AgABAAAAAGACAPv/AgABAAAAAGADAPv/AgABAAAAAGAEAPv/AgADAAAAAAAEAP3/AAAGAAIAAFAEAP7/AAAHAAIAAFADAP7/AAAHAAMAAFAEAPz/AgABAAAAAAACAP7/AgABAAAAAFABAP7/AgAFAAIAAGAAAP7/AgAAAAIAAFD///3/AgAAAAIAAFAAAP3/AgAGAAEAAFD///z/AgAEAAIAAFD+//z/AAAAAAQAABD+//3/AAAAAAUAABD9//3/AAABAAUAABD9//7/AgADAAAAAFD8//7/AgADAAAAADD8//v/AgADAAAAAGD8//r/AgADAAAAAED9//v/AgAFAAAAACD9//r/AgAFAAAAAAD8//z/AgABAAAAADD8//3/AgABAAAAADD8//n/AgADAAAAABD8//j/AgADAAAAADD9//n/AgAFAAAAAFD9//j/AgAFAAAAAHD8//f/AgAFAAAAAHD7//f/AgABAAAAAFD6//f/AAAHAAEAAGD6//j/AAAGAAEAAGD5//j/AAAGAAAAAGD4//j/AgAFAAAAAGD4//n/AgAEAAIAACD5//n/AgAAAAIAACD6//r/AgAAAAIAACD7//v/AgAAAAIAACD7//z/AgAFAAIAABD6//v/AgAGAAEAACD5//r/AgAGAAEAACD7//3/AgABAAAAACD7//7/AgABAAAAACD7////AgAFAAAAADD8////AgABAAAAAHD9////AgABAAAAAHD+////AgABAAAAAHA=")
tile_set = ExtResource("4_hpo6d")
tile_map_data = PackedByteArray("AAD+//7/AAAAAAAAAAD///7/AAAAAAAAAAAAAP7/AAAAAAAAAAABAP7/AAAAAAAAAAACAP7/AAABAAAAAAADAP7/AAAAAAAAAAAEAP7/AAAAAAAAAAAFAP7/AAAAAAAAAAAGAP7/AAABAAMAAFAHAP3/AAAAAAIAAFAHAP7/AAABAAIAAFAGAP3/AAAAAAMAAFAGAPv/AAAAAAIAAAAGAPz/AAAAAAMAAAAHAPv/AAABAAIAAAAHAPz/AAABAAMAAAAEAPv/AAADAAAAAGAFAPv/AAAAAAAAAAAEAPz/AAADAAAAAFADAPz/AAAAAAAAAAACAPz/AAAAAAAAAAABAPz/AAAAAAAAAAAAAPz/AAAAAAAAAAD///z/AAAAAAAAAAD+//z/AAAAAAAAAAD9//z/AAADAAAAAGD9//7/AAADAAAAADD9//3/AAAAAAAAAFA=")
tile_set = ExtResource("5_748hi")
[node name="area_finish" type="Area2D" parent="."]
collision_layer = 4

View file

@ -12,6 +12,7 @@ var checkpointtimes :Array[float]=[]
const ROAD_R_NAME="road_r"
const ROAD_L_NAME="road_l"
const CAR_NAME="CharacterBody_Car"
const COLLISION_SLOWDOWN_CAR=1.01
@ -52,6 +53,15 @@ var resetcar_movingspeed=resetcar_stoppedspeed+10 #stop timer when above this sp
var resetcar_distance=128 #196 is roughly when car is in the middle of a two wide road
var resetcar_steerangle=120
# other car avoidance
var avoid_car_distance_far=100
var avoid_car_distance_close=50
var avoid_car_steeringangle_far=0
var avoid_car_steeringangle_close=50
var avoid_car_mininum_space=50 #how much space RayCast_FL/R must have for avoidance to start.
var avoidance_steeringangle:float=0 #actual set steering angle to avoid car
var avoidance_turndirection:int=0
#Effects
const BURNOUT_KEEP_ON_AFTER_START=1
@ -71,6 +81,9 @@ var burnout:float=0 #at 0 is off
@onready var ray_cast_fl: RayCast2D = $RayCast_FL
@onready var ray_cast_fr: RayCast2D = $RayCast_FR
@onready var ray_cast_car_fl: RayCast2D = $RayCast_Car_FL
@onready var ray_cast_car_fr: RayCast2D = $RayCast_Car_FR
@onready var reset_timer: Timer = $resetTimer
@onready var ray_cast_car: RayCast2D = $RayCast_Car #for tracking markers
@ -158,7 +171,7 @@ func apply_friction():
func get_input(delta:float):
# Check RayCast to Road
const distance_inf=1000
var distance_fl=distance_inf
var distance_fr=distance_inf
@ -178,9 +191,11 @@ func get_input(delta:float):
var distance_min= min(distance_fl,distance_fr)
var turndirection = 1 if distance_fl<distance_fr else -1
var steering_angle=constrain( remap(velocity.length(),steering_speed_fast,steering_speed_slow,steering_angle_fast,steering_angle_slow),steering_angle_fast,steering_angle_slow) #set maximum steering_angle based on speed
var steering_distance_far=constrain( remap(velocity.length(),steering_speed_fast,steering_speed_slow,steering_distance_far_fast,steering_distance_far_slow),steering_distance_far_fast,steering_distance_far_slow)
var steering_distance_close=constrain( remap(velocity.length(),steering_speed_fast,steering_speed_slow,steering_distance_close_fast,steering_distance_close_slow),steering_distance_close_fast,steering_distance_close_slow)
@ -190,8 +205,7 @@ func get_input(delta:float):
steer_direction = turndirection*deg_to_rad(constrain(remap(distance_min,steering_distance_far,steering_distance_close,0,steering_angle), 0,steering_angle))
else:
steer_direction=0 #drive straight
applied_engine_power=0
var key_accelerator_pressed=Input.is_action_pressed(Gamestate.userinput_prefix+str(playerid))

View file

@ -1,7 +1,8 @@
extends Node
var sample_hz = 44100.0 # Keep the number of samples to mix low, GDScript is not super fast.
#var sample_hz = 44100.0 # Keep the number of samples to mix low, GDScript is not super fast.
var sample_hz = 44100.0/4 # Keep the number of samples to mix low, GDScript is not super fast.
@onready var noise = FastNoiseLite.new()
var phase_rotation = 0.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cqm2b2ftsvyvo"
path="res://.godot/imported/htrohr.png-9207093de063b6e9d9057f83388197ff.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/spritesheet_htrohr/htrohr.png"
dest_files=["res://.godot/imported/htrohr.png-9207093de063b6e9d9057f83388197ff.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

@ -0,0 +1,32 @@
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://carpfxq3rn3aa"]
[ext_resource type="Texture2D" uid="uid://cqm2b2ftsvyvo" path="res://sprites/spritesheet_htrohr/htrohr.png" id="1_hmlue"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ev3b5"]
texture = ExtResource("1_hmlue")
texture_region_size = Vector2i(64, 64)
0:0/0 = 0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -3, 32, -3, 32, 3, -32, 3)
1:0/0 = 0
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -3, 32, -3, 32, 3, -32, 3)
2:0/0 = 0
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -3, 0, -3, 0, 3, -32, 3)
3:0/0 = 0
3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -3, 0, -3, 3, 0, 3, 32, -3, 32, -3, 5, -5, 3, -32, 3)
0:1/0 = 0
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 3, -6, 3, -3, 6, -3, 32, 3, 32, 3, 6, 6, 3, 32, 3, 32, -3, -32, -3)
0:2/0 = 0
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -3, 2, -3, 32, 27, 32, 32, 27, 32, -2, 3, -32, 3)
1:2/0 = 0
1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 27, -27, 32, -32, 32)
1:3/0 = 0
1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-26, -32, 3, -2, 3, 32, -3, 32, -3, 2, -32, -27, -32, -32)
0:3/0 = 0
0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(27, -32, 32, -27, 32, -32)
2:3/0 = 0
2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-27, -32, 32, 27, 32, 32, 27, 32, -32, -27, -32, -32)
[resource]
tile_size = Vector2i(64, 64)
physics_layer_0/collision_layer = 3
sources/0 = SubResource("TileSetAtlasSource_ev3b5")

Binary file not shown.