generated from krampus/template-godot4
	Compare commits
	
		
			No commits in common. "9adf009a21d6ebd5028c9f5fc72ae4d09358928c" and "115b31568fd1b98a7c57f7d84394b35a9ac66b68" have entirely different histories.
		
	
	
		
			9adf009a21
			...
			115b31568f
		
	
		
							
								
								
									
										
											BIN
										
									
								
								assets/sprites/particles/smudge.png
									 (Stored with Git LFS)
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								assets/sprites/particles/smudge.png
									 (Stored with Git LFS)
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,34 +0,0 @@ | |||||||
| [remap] |  | ||||||
| 
 |  | ||||||
| importer="texture" |  | ||||||
| type="CompressedTexture2D" |  | ||||||
| uid="uid://dy310v1j5vexd" |  | ||||||
| path="res://.godot/imported/smudge.png-6be29afb408991155df57310104cb1f8.ctex" |  | ||||||
| metadata={ |  | ||||||
| "vram_texture": false |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| [deps] |  | ||||||
| 
 |  | ||||||
| source_file="res://assets/sprites/particles/smudge.png" |  | ||||||
| dest_files=["res://.godot/imported/smudge.png-6be29afb408991155df57310104cb1f8.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=true |  | ||||||
| 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=0 |  | ||||||
| @ -307,6 +307,7 @@ directional_shadow_pancake_size = 5.0 | |||||||
| gravity_point_center = Vector3(0, 1, 0) | gravity_point_center = Vector3(0, 1, 0) | ||||||
| gravity_direction = Vector3(0, 1, 0) | gravity_direction = Vector3(0, 1, 0) | ||||||
| script = ExtResource("9_jwlau") | script = ExtResource("9_jwlau") | ||||||
|  | terrain_angular_damping = 2.0 | ||||||
| 
 | 
 | ||||||
| [node name="CollisionPolygon3D" type="CollisionPolygon3D" parent="Course/Fairway"] | [node name="CollisionPolygon3D" type="CollisionPolygon3D" parent="Course/Fairway"] | ||||||
| transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 209.788, 6.20358, 256.527) | transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 209.788, 6.20358, 256.527) | ||||||
| @ -442,6 +443,7 @@ spawn_turns = 1 | |||||||
| 
 | 
 | ||||||
| [node name="ExplosionEffect" parent="Course" instance=ExtResource("16_xufks")] | [node name="ExplosionEffect" parent="Course" instance=ExtResource("16_xufks")] | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 274.103, 5.01502, 286.299) | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 274.103, 5.01502, 286.299) | ||||||
|  | visible = false | ||||||
| 
 | 
 | ||||||
| [node name="CityBuildings" type="Node3D" parent="."] | [node name="CityBuildings" type="Node3D" parent="."] | ||||||
| transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 129.404, -9.53674e-07, 309.4) | transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 129.404, -9.53674e-07, 309.4) | ||||||
|  | |||||||
| @ -6,4 +6,4 @@ | |||||||
| [resource] | [resource] | ||||||
| script = ExtResource("2_wmp72") | script = ExtResource("2_wmp72") | ||||||
| scene = ExtResource("1_2cp8o") | scene = ExtResource("1_2cp8o") | ||||||
| level_name = "Mall" | level_name = "Forbidden Mall" | ||||||
|  | |||||||
| @ -39,8 +39,3 @@ func _process(_delta: float) -> void: | |||||||
| 		spawn_balls(DROP_SPAWN_GROUP) | 		spawn_balls(DROP_SPAWN_GROUP) | ||||||
| 	if Input.is_action_just_pressed("debug_3"): | 	if Input.is_action_just_pressed("debug_3"): | ||||||
| 		spawn_balls(PUTT_SPAWN_GROUP, PUTT_VEC) | 		spawn_balls(PUTT_SPAWN_GROUP, PUTT_VEC) | ||||||
| 
 |  | ||||||
| 	if Input.is_action_just_pressed("ui_page_up"): |  | ||||||
| 		Engine.time_scale *= 2.0 |  | ||||||
| 	if Input.is_action_just_pressed("ui_page_down"): |  | ||||||
| 		Engine.time_scale *= 0.5 |  | ||||||
|  | |||||||
| @ -1,9 +0,0 @@ | |||||||
| [gd_resource type="Resource" script_class="Level" load_steps=3 format=3 uid="uid://dexm07r8wvu83"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="PackedScene" uid="uid://cvs546kk7t7aw" path="res://levels/terrain_test/terrain_test.tscn" id="1_iggnc"] |  | ||||||
| [ext_resource type="Script" path="res://src/world/level/level.gd" id="2_uc833"] |  | ||||||
| 
 |  | ||||||
| [resource] |  | ||||||
| script = ExtResource("2_uc833") |  | ||||||
| scene = ExtResource("1_iggnc") |  | ||||||
| level_name = "Terrain Debug" |  | ||||||
| @ -12,13 +12,12 @@ config_version=5 | |||||||
| 
 | 
 | ||||||
| config/name="GFOLF" | config/name="GFOLF" | ||||||
| config/description="GFOLF: Combat Golf Action" | config/description="GFOLF: Combat Golf Action" | ||||||
| config/version="0.0.2" | config/version="0.0.1" | ||||||
| run/main_scene="res://src/game/game.tscn" | run/main_scene="res://src/game/game.tscn" | ||||||
| config/use_custom_user_dir=true | config/use_custom_user_dir=true | ||||||
| config/project_settings_override="user://settings.godot" | config/project_settings_override="user://settings.godot" | ||||||
| config/features=PackedStringArray("4.3", "Forward Plus") | config/features=PackedStringArray("4.3", "Forward Plus") | ||||||
| run/max_fps=60 | run/max_fps=60 | ||||||
| run/main_scene.editor="res://src/game/debug_game.tscn" |  | ||||||
| 
 | 
 | ||||||
| [autoload] | [autoload] | ||||||
| 
 | 
 | ||||||
| @ -256,7 +255,7 @@ locale/translations=PackedStringArray("res://assets/text/text.en.translation") | |||||||
| 3d/sleep_threshold_angular=2.0 | 3d/sleep_threshold_angular=2.0 | ||||||
| jolt_3d/sleep/velocity_threshold=0.1 | jolt_3d/sleep/velocity_threshold=0.1 | ||||||
| jolt_3d/sleep/time_threshold=1.0 | jolt_3d/sleep/time_threshold=1.0 | ||||||
| jolt_3d/limits/max_angular_velocity=5700.0 | jolt_3d/limits/max_angular_velocity=270000.0 | ||||||
| jolt_3d/limits/max_temporary_memory=64 | jolt_3d/limits/max_temporary_memory=64 | ||||||
| 
 | 
 | ||||||
| [rendering] | [rendering] | ||||||
| @ -267,6 +266,5 @@ lights_and_shadows/directional_shadow/size=16384 | |||||||
| lights_and_shadows/directional_shadow/soft_shadow_filter_quality=0 | lights_and_shadows/directional_shadow/soft_shadow_filter_quality=0 | ||||||
| textures/decals/filter=2 | textures/decals/filter=2 | ||||||
| anti_aliasing/quality/msaa_3d=3 | anti_aliasing/quality/msaa_3d=3 | ||||||
| viewport/hdr_2d=true |  | ||||||
| anti_aliasing/quality/screen_space_aa=1 | anti_aliasing/quality/screen_space_aa=1 | ||||||
| anti_aliasing/quality/use_debanding=true | anti_aliasing/quality/use_debanding=true | ||||||
|  | |||||||
| @ -3,7 +3,6 @@ class_name BallParticleEffects extends Node3D | |||||||
| 
 | 
 | ||||||
| @export var splash_effect_scene: PackedScene | @export var splash_effect_scene: PackedScene | ||||||
| 
 | 
 | ||||||
| @onready var chunk_particles: GPUParticles3D = %ChunkParticles |  | ||||||
| @onready var sand_particles: GPUParticles3D = %SandParticles | @onready var sand_particles: GPUParticles3D = %SandParticles | ||||||
| 
 | 
 | ||||||
| @onready var ball: GameBall = $".." | @onready var ball: GameBall = $".." | ||||||
| @ -15,23 +14,11 @@ func play_splash() -> void: | |||||||
| 	effect.global_position = ball.global_position | 	effect.global_position = ball.global_position | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| func _physics_process(_delta: float) -> void: |  | ||||||
| 	global_rotation = Vector3.ZERO |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func play_effect(terrain: Terrain.Type) -> void: | func play_effect(terrain: Terrain.Type) -> void: | ||||||
| 	global_rotation = Vector3.ZERO | 	global_rotation = Vector3.ZERO | ||||||
| 	match terrain: | 	match terrain: | ||||||
| 		Terrain.Type.SAND: | 		Terrain.Type.SAND: | ||||||
| 			# Adjust sand particle direction | 			# Adjust sand particle direction | ||||||
| 			var material: ParticleProcessMaterial = sand_particles.process_material | 			var material: ParticleProcessMaterial = sand_particles.process_material | ||||||
| 			material.direction = -ball.current_gravity.normalized() | 			material.direction = -ball.linear_velocity.normalized() | ||||||
| 			sand_particles.emitting = true | 			sand_particles.emitting = true | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| func play_chunk(chunk_scale: float) -> void: |  | ||||||
| 	print_debug("Playing chunk effect, scale: ", chunk_scale) |  | ||||||
| 	chunk_particles.amount_ratio = chunk_scale |  | ||||||
| 	var material: ParticleProcessMaterial = chunk_particles.process_material |  | ||||||
| 	material.direction = -ball.current_gravity.normalized() |  | ||||||
| 	chunk_particles.emitting = true |  | ||||||
|  | |||||||
| @ -6,7 +6,6 @@ signal entered_water | |||||||
| 
 | 
 | ||||||
| ## Types of game balls | ## Types of game balls | ||||||
| enum Type { | enum Type { | ||||||
| 	DEBUG = -1, |  | ||||||
| 	NONE, | 	NONE, | ||||||
| 	BASIC, | 	BASIC, | ||||||
| 	PLASMA, | 	PLASMA, | ||||||
| @ -131,7 +130,6 @@ func get_surface_snap_point() -> Vector3: | |||||||
| 	) | 	) | ||||||
| 	var collisions := get_world_3d().direct_space_state.intersect_ray(params) | 	var collisions := get_world_3d().direct_space_state.intersect_ray(params) | ||||||
| 	if collisions: | 	if collisions: | ||||||
| 		@warning_ignore("unsafe_cast") |  | ||||||
| 		return collisions["position"] as Vector3 | 		return collisions["position"] as Vector3 | ||||||
| 	return global_position | 	return global_position | ||||||
| 
 | 
 | ||||||
| @ -222,14 +220,12 @@ func _on_sleeping_state_changed() -> void: | |||||||
| 	if sleeping: | 	if sleeping: | ||||||
| 		# Trigger to reassign on wake | 		# Trigger to reassign on wake | ||||||
| 		_awake = false | 		_awake = false | ||||||
| 		linear_velocity = Vector3.ZERO |  | ||||||
| 		angular_velocity = Vector3.ZERO |  | ||||||
| 		linear_damp = 0.0 |  | ||||||
| 		angular_damp = 0.0 |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| func _manual_sleep() -> void: | func _manual_sleep() -> void: | ||||||
| 	freeze = true | 	freeze = true | ||||||
|  | 	linear_velocity = Vector3.ZERO | ||||||
|  | 	angular_velocity = Vector3.ZERO | ||||||
| 	manual_sleep_timer.start() | 	manual_sleep_timer.start() | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| [gd_scene load_steps=30 format=3 uid="uid://dfttci386ohip"] | [gd_scene load_steps=26 format=3 uid="uid://dfttci386ohip"] | ||||||
| 
 | 
 | ||||||
| [ext_resource type="Script" path="res://src/equipment/balls/physics_ball/game_ball.gd" id="1_iwh2u"] | [ext_resource type="Script" path="res://src/equipment/balls/physics_ball/game_ball.gd" id="1_iwh2u"] | ||||||
| [ext_resource type="Resource" uid="uid://c6tt1hto75ex4" path="res://src/equipment/balls/physics_ball/normal_terrain_physics.tres" id="3_3gnie"] | [ext_resource type="Resource" uid="uid://c6tt1hto75ex4" path="res://src/equipment/balls/physics_ball/normal_terrain_physics.tres" id="3_3gnie"] | ||||||
| @ -12,8 +12,8 @@ | |||||||
| [ext_resource type="AudioStream" uid="uid://b5xx5t050i4p" path="res://assets/sound/sfx/ball/sand2.wav" id="11_ed8je"] | [ext_resource type="AudioStream" uid="uid://b5xx5t050i4p" path="res://assets/sound/sfx/ball/sand2.wav" id="11_ed8je"] | ||||||
| [ext_resource type="AudioStream" uid="uid://dutumw1vj854w" path="res://assets/sound/sfx/ball/splash1.wav" id="11_xmj6n"] | [ext_resource type="AudioStream" uid="uid://dutumw1vj854w" path="res://assets/sound/sfx/ball/splash1.wav" id="11_xmj6n"] | ||||||
| [ext_resource type="Script" path="res://src/equipment/balls/physics_ball/ball_particle_effects.gd" id="12_7krl6"] | [ext_resource type="Script" path="res://src/equipment/balls/physics_ball/ball_particle_effects.gd" id="12_7krl6"] | ||||||
|  | [ext_resource type="Texture2D" uid="uid://c47bkx508biqr" path="res://assets/sprites/particles/plasma.png" id="12_guipt"] | ||||||
| [ext_resource type="PackedScene" uid="uid://cm4bb3lg4mfd2" path="res://src/world/effects/splash/splash_effect.tscn" id="12_qlrvx"] | [ext_resource type="PackedScene" uid="uid://cm4bb3lg4mfd2" path="res://src/world/effects/splash/splash_effect.tscn" id="12_qlrvx"] | ||||||
| [ext_resource type="Texture2D" uid="uid://dy310v1j5vexd" path="res://assets/sprites/particles/smudge.png" id="14_el0o3"] |  | ||||||
| 
 | 
 | ||||||
| [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_u134x"] | [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_u134x"] | ||||||
| bounce = 0.8 | bounce = 0.8 | ||||||
| @ -35,13 +35,10 @@ script/source = "extends Control | |||||||
| const COLOR_X := Color(1, 0, 0) | const COLOR_X := Color(1, 0, 0) | ||||||
| const COLOR_Y := Color(0, 1, 0) | const COLOR_Y := Color(0, 1, 0) | ||||||
| const COLOR_Z := Color(0, 0, 1) | const COLOR_Z := Color(0, 0, 1) | ||||||
| const COLOR_VELOCITY := Color.ORANGE |  | ||||||
| const COLOR_MAGNUS := Color.CYAN | const COLOR_MAGNUS := Color.CYAN | ||||||
| const VELOCITY_SCALE := 0.5 |  | ||||||
| const MAGNUS_SCALE := 3 | const MAGNUS_SCALE := 3 | ||||||
| const WIDTH := 4 | const WIDTH := 4 | ||||||
| 
 | 
 | ||||||
| @export var draw_velocity := true |  | ||||||
| @export var draw_reoriented_basis := true | @export var draw_reoriented_basis := true | ||||||
| @export var draw_magnus_effect := true | @export var draw_magnus_effect := true | ||||||
| @export var draw_gravity_basis := true | @export var draw_gravity_basis := true | ||||||
| @ -57,11 +54,6 @@ func _process(_delta: float) -> void: | |||||||
| func _draw() -> void: | func _draw() -> void: | ||||||
| 	var camera := get_viewport().get_camera_3d() | 	var camera := get_viewport().get_camera_3d() | ||||||
| 	var start := camera.unproject_position(physics_ball.global_position) | 	var start := camera.unproject_position(physics_ball.global_position) | ||||||
| 
 |  | ||||||
| 	if draw_velocity: |  | ||||||
| 		var end := camera.unproject_position(physics_ball.global_position + physics_ball.linear_velocity * VELOCITY_SCALE) |  | ||||||
| 		draw_line(start, end, COLOR_VELOCITY, WIDTH) |  | ||||||
| 
 |  | ||||||
| 	if draw_reoriented_basis and physics_ball._last_contact_normal != null: | 	if draw_reoriented_basis and physics_ball._last_contact_normal != null: | ||||||
| 		var basis := physics_ball.get_reoriented_basis() | 		var basis := physics_ball.get_reoriented_basis() | ||||||
| 		var end_x := camera.unproject_position(physics_ball.global_position + basis.x) | 		var end_x := camera.unproject_position(physics_ball.global_position + basis.x) | ||||||
| @ -113,35 +105,6 @@ playback_mode = 1 | |||||||
| streams_count = 1 | streams_count = 1 | ||||||
| stream_0/stream = ExtResource("11_xmj6n") | stream_0/stream = ExtResource("11_xmj6n") | ||||||
| 
 | 
 | ||||||
| [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_706cj"] |  | ||||||
| angle_min = -720.0 |  | ||||||
| angle_max = 720.0 |  | ||||||
| spread = 20.0 |  | ||||||
| initial_velocity_min = 1.0 |  | ||||||
| initial_velocity_max = 5.0 |  | ||||||
| scale_min = 0.0 |  | ||||||
| hue_variation_min = -0.02 |  | ||||||
| hue_variation_max = -2.23517e-08 |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CompressedTexture2D" id="CompressedTexture2D_5u1jh"] |  | ||||||
| load_path = "res://.godot/imported/smudge.png-6be29afb408991155df57310104cb1f8.ctex" |  | ||||||
| 
 |  | ||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fbolh"] |  | ||||||
| transparency = 1 |  | ||||||
| vertex_color_use_as_albedo = true |  | ||||||
| albedo_color = Color(0.17, 0.12954, 0.0272, 1) |  | ||||||
| albedo_texture = SubResource("CompressedTexture2D_5u1jh") |  | ||||||
| texture_filter = 2 |  | ||||||
| billboard_mode = 3 |  | ||||||
| billboard_keep_scale = true |  | ||||||
| particles_anim_h_frames = 1 |  | ||||||
| particles_anim_v_frames = 1 |  | ||||||
| particles_anim_loop = false |  | ||||||
| 
 |  | ||||||
| [sub_resource type="QuadMesh" id="QuadMesh_npp3t"] |  | ||||||
| material = SubResource("StandardMaterial3D_fbolh") |  | ||||||
| size = Vector2(0.15, 0.15) |  | ||||||
| 
 |  | ||||||
| [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_mwiw1"] | [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_mwiw1"] | ||||||
| angle_min = -720.0 | angle_min = -720.0 | ||||||
| angle_max = 720.0 | angle_max = 720.0 | ||||||
| @ -156,9 +119,9 @@ hue_variation_max = -2.23517e-08 | |||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_v1i8b"] | [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_v1i8b"] | ||||||
| transparency = 1 | transparency = 1 | ||||||
| vertex_color_use_as_albedo = true | vertex_color_use_as_albedo = true | ||||||
| albedo_color = Color(0.45, 0.4092, 0.306, 1) | albedo_color = Color(0.78, 0.70928, 0.5304, 1) | ||||||
| albedo_texture = ExtResource("14_el0o3") | albedo_texture = ExtResource("12_guipt") | ||||||
| texture_filter = 2 | texture_filter = 4 | ||||||
| billboard_mode = 3 | billboard_mode = 3 | ||||||
| billboard_keep_scale = true | billboard_keep_scale = true | ||||||
| particles_anim_h_frames = 1 | particles_anim_h_frames = 1 | ||||||
| @ -198,8 +161,8 @@ anchor_bottom = 1.0 | |||||||
| grow_horizontal = 2 | grow_horizontal = 2 | ||||||
| grow_vertical = 2 | grow_vertical = 2 | ||||||
| script = SubResource("GDScript_p4v7o") | script = SubResource("GDScript_p4v7o") | ||||||
|  | draw_reoriented_basis = false | ||||||
| draw_magnus_effect = false | draw_magnus_effect = false | ||||||
| draw_gravity_basis = false |  | ||||||
| 
 | 
 | ||||||
| [node name="SFX" type="Node3D" parent="."] | [node name="SFX" type="Node3D" parent="."] | ||||||
| unique_name_in_owner = true | unique_name_in_owner = true | ||||||
| @ -243,15 +206,6 @@ unique_name_in_owner = true | |||||||
| script = ExtResource("12_7krl6") | script = ExtResource("12_7krl6") | ||||||
| splash_effect_scene = ExtResource("12_qlrvx") | splash_effect_scene = ExtResource("12_qlrvx") | ||||||
| 
 | 
 | ||||||
| [node name="ChunkParticles" type="GPUParticles3D" parent="ParticleEffects"] |  | ||||||
| unique_name_in_owner = true |  | ||||||
| emitting = false |  | ||||||
| amount = 12 |  | ||||||
| one_shot = true |  | ||||||
| explosiveness = 1.0 |  | ||||||
| process_material = SubResource("ParticleProcessMaterial_706cj") |  | ||||||
| draw_pass_1 = SubResource("QuadMesh_npp3t") |  | ||||||
| 
 |  | ||||||
| [node name="SandParticles" type="GPUParticles3D" parent="ParticleEffects"] | [node name="SandParticles" type="GPUParticles3D" parent="ParticleEffects"] | ||||||
| unique_name_in_owner = true | unique_name_in_owner = true | ||||||
| emitting = false | emitting = false | ||||||
|  | |||||||
| @ -1,6 +0,0 @@ | |||||||
| [gd_scene load_steps=2 format=3 uid="uid://ces65grpayngu"] |  | ||||||
| 
 |  | ||||||
| [ext_resource type="PackedScene" uid="uid://cefit4bc8akbb" path="res://src/game/game.tscn" id="1_qa7ks"] |  | ||||||
| 
 |  | ||||||
| [node name="Game" instance=ExtResource("1_qa7ks")] |  | ||||||
| start_scene = "res://src/world/world.tscn" |  | ||||||
| @ -89,12 +89,6 @@ func _finish_scene_load(instance: Node) -> void: | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| func _process(_delta: float) -> void: | func _process(_delta: float) -> void: | ||||||
| 	# REMOVEME |  | ||||||
| 	if Input.is_action_just_pressed("ui_page_up"): |  | ||||||
| 		Engine.time_scale *= 2.0 |  | ||||||
| 	if Input.is_action_just_pressed("ui_page_down"): |  | ||||||
| 		Engine.time_scale *= 0.5 |  | ||||||
| 
 |  | ||||||
| 	if _loading_resources and not loading_screen.visible: | 	if _loading_resources and not loading_screen.visible: | ||||||
| 		loader_transition.play("fade_in") | 		loader_transition.play("fade_in") | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -119,6 +119,7 @@ _data = { | |||||||
| [node name="Game" type="Node" groups=["GameGroup"]] | [node name="Game" type="Node" groups=["GameGroup"]] | ||||||
| process_mode = 3 | process_mode = 3 | ||||||
| script = ExtResource("1_4qa87") | script = ExtResource("1_4qa87") | ||||||
|  | start_scene = "res://src/world/world.tscn" | ||||||
| 
 | 
 | ||||||
| [node name="RootControl" type="Control" parent="."] | [node name="RootControl" type="Control" parent="."] | ||||||
| unique_name_in_owner = true | unique_name_in_owner = true | ||||||
|  | |||||||
| @ -16,7 +16,6 @@ iron = ExtResource("2_piku2") | |||||||
| wedge = ExtResource("5_wm4ae") | wedge = ExtResource("5_wm4ae") | ||||||
| putter = ExtResource("3_tytwr") | putter = ExtResource("3_tytwr") | ||||||
| _balls = { | _balls = { | ||||||
| -1: -1, |  | ||||||
| 1: -1, | 1: -1, | ||||||
| 2: 5, | 2: 5, | ||||||
| 3: -1, | 3: -1, | ||||||
|  | |||||||
| @ -6,7 +6,6 @@ signal ball_changed(ball: GameBall) | |||||||
| 
 | 
 | ||||||
| ## Scenes for each type of ball. | ## Scenes for each type of ball. | ||||||
| const SCENE_MAP: Dictionary = { | const SCENE_MAP: Dictionary = { | ||||||
| 	GameBall.Type.DEBUG: preload("res://src/equipment/balls/debug_ball/debug_ball.tscn"), |  | ||||||
| 	GameBall.Type.BASIC: preload("res://src/equipment/balls/physics_ball/physics_ball.tscn"), | 	GameBall.Type.BASIC: preload("res://src/equipment/balls/physics_ball/physics_ball.tscn"), | ||||||
| 	GameBall.Type.PLASMA: preload("res://src/equipment/balls/plasma_ball/plasma_ball.tscn"), | 	GameBall.Type.PLASMA: preload("res://src/equipment/balls/plasma_ball/plasma_ball.tscn"), | ||||||
| 	GameBall.Type.BRICK: preload("res://src/equipment/balls/brick/brick.tscn"), | 	GameBall.Type.BRICK: preload("res://src/equipment/balls/brick/brick.tscn"), | ||||||
|  | |||||||
| @ -38,7 +38,7 @@ const BIG_POWER_THRESHOLD := 0.7 | |||||||
| const WATER_DAMAGE := 10.0 | const WATER_DAMAGE := 10.0 | ||||||
| 
 | 
 | ||||||
| ## Angle of influence that shot curve has, in radians | ## Angle of influence that shot curve has, in radians | ||||||
| const CURVE_INFLUENCE := PI / 4 | const CURVE_INFLUENCE := PI / 3 | ||||||
| 
 | 
 | ||||||
| ## Just enough to make things interesting! | ## Just enough to make things interesting! | ||||||
| const SHOT_OFFSET_X_FACTOR := 20.0 | const SHOT_OFFSET_X_FACTOR := 20.0 | ||||||
| @ -311,9 +311,6 @@ func take_shot() -> void: | |||||||
| 		game_ball.magnetic = club_type == Club.Type.IRON | 		game_ball.magnetic = club_type == Club.Type.IRON | ||||||
| 		game_ball.freeze = false | 		game_ball.freeze = false | ||||||
| 		game_ball.apply_impulse(impulse, offset) | 		game_ball.apply_impulse(impulse, offset) | ||||||
| 		if not is_shot_good(): |  | ||||||
| 			# Play chunk particle effect |  | ||||||
| 			game_ball.effects.play_chunk(absf(shot_curve) / (1.0 - NICE_THRESHOLD)) |  | ||||||
| 
 | 
 | ||||||
| 	reset_prompt_timer.start() | 	reset_prompt_timer.start() | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -329,7 +329,7 @@ _data = { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| [sub_resource type="SphereShape3D" id="SphereShape3D_xvvdi"] | [sub_resource type="SphereShape3D" id="SphereShape3D_xvvdi"] | ||||||
| radius = 2.0 | radius = 1.5 | ||||||
| 
 | 
 | ||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4n2rd"] | [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4n2rd"] | ||||||
| transparency = 1 | transparency = 1 | ||||||
|  | |||||||
| @ -4,7 +4,6 @@ class_name BallSelector extends Control | |||||||
| const TWEEN_TIME := 0.2 | const TWEEN_TIME := 0.2 | ||||||
| 
 | 
 | ||||||
| const Y_OFFSET := { | const Y_OFFSET := { | ||||||
| 	GameBall.Type.DEBUG: 0, |  | ||||||
| 	GameBall.Type.NONE: 50, | 	GameBall.Type.NONE: 50, | ||||||
| 	GameBall.Type.BASIC: 18, | 	GameBall.Type.BASIC: 18, | ||||||
| 	GameBall.Type.PLASMA: -14, | 	GameBall.Type.PLASMA: -14, | ||||||
|  | |||||||
| @ -1,6 +1,8 @@ | |||||||
| class_name BallZone extends Area3D | class_name BallZone extends Area3D | ||||||
| ## A spatial area that has an effect on balls inside it. | ## A spatial area that has an effect on balls inside it. | ||||||
| 
 | 
 | ||||||
|  | @export var terrain_angular_damping := 1.0 | ||||||
|  | 
 | ||||||
| @export var water_hazard := false | @export var water_hazard := false | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,46 +1,38 @@ | |||||||
| [gd_scene load_steps=10 format=3 uid="uid://c6k44l0mnq3o1"] | [gd_scene load_steps=8 format=3 uid="uid://c6k44l0mnq3o1"] | ||||||
| 
 |  | ||||||
| [ext_resource type="Curve" uid="uid://b5vptoxuq3dwb" path="res://src/world/effects/explosion/intensity_curve.tres" id="1_rxjwh"] |  | ||||||
| 
 | 
 | ||||||
| [sub_resource type="Gradient" id="Gradient_tuj3x"] | [sub_resource type="Gradient" id="Gradient_tuj3x"] | ||||||
| offsets = PackedFloat32Array(0, 0.148459, 0.29972, 0.840336) | offsets = PackedFloat32Array(0, 0.0850112, 0.693512, 0.760626) | ||||||
| colors = PackedColorArray(1, 0.0623333, 0.03, 1, 1, 1, 1, 1, 1, 1, 0.3, 1, 0.08736, 0.09, 0.0702, 1) | colors = PackedColorArray(3, 3, 3, 1, 2, 2, 0.6, 1, 1, 0.0623333, 0.03, 1, 0, 0, 0, 1) | ||||||
| 
 | 
 | ||||||
| [sub_resource type="GradientTexture1D" id="GradientTexture1D_d6li3"] | [sub_resource type="GradientTexture1D" id="GradientTexture1D_d6li3"] | ||||||
| gradient = SubResource("Gradient_tuj3x") | gradient = SubResource("Gradient_tuj3x") | ||||||
| 
 | 
 | ||||||
| [sub_resource type="Curve" id="Curve_kl03u"] | [sub_resource type="Curve" id="Curve_oo5uu"] | ||||||
| max_value = 3.0 | _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.0842105, 1), 0.0, 0.0, 0, 0, Vector2(0.246316, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] | ||||||
| _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.145, 3), 0.0, 0.0, 0, 0, Vector2(0.566, 3), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] |  | ||||||
| point_count = 4 | point_count = 4 | ||||||
| 
 | 
 | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_auv7e"] |  | ||||||
| curve = SubResource("Curve_kl03u") |  | ||||||
| 
 |  | ||||||
| [sub_resource type="CurveTexture" id="CurveTexture_quj8c"] | [sub_resource type="CurveTexture" id="CurveTexture_quj8c"] | ||||||
| curve = ExtResource("1_rxjwh") | curve = SubResource("Curve_oo5uu") | ||||||
| 
 | 
 | ||||||
| [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hjkte"] | [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hjkte"] | ||||||
| lifetime_randomness = 0.6 | lifetime_randomness = 0.52 | ||||||
|  | emission_shape = 3 | ||||||
|  | emission_box_extents = Vector3(1, 1, 1) | ||||||
| direction = Vector3(0, 0, 0) | direction = Vector3(0, 0, 0) | ||||||
| spread = 180.0 | spread = 180.0 | ||||||
| initial_velocity_min = -4.0 | initial_velocity_min = 4.0 | ||||||
| initial_velocity_max = 4.0 | initial_velocity_max = 4.0 | ||||||
| gravity = Vector3(0, 0, 0) | gravity = Vector3(0, 0, 0) | ||||||
| scale_min = 0.75 | scale_min = 0.3 | ||||||
| scale_max = 1.5 |  | ||||||
| scale_curve = SubResource("CurveTexture_quj8c") | scale_curve = SubResource("CurveTexture_quj8c") | ||||||
| color_ramp = SubResource("GradientTexture1D_d6li3") | color_ramp = SubResource("GradientTexture1D_d6li3") | ||||||
| emission_curve = SubResource("CurveTexture_auv7e") |  | ||||||
| turbulence_enabled = true | turbulence_enabled = true | ||||||
| turbulence_noise_strength = 0.2 |  | ||||||
| turbulence_noise_scale = 4.0 |  | ||||||
| turbulence_noise_speed = Vector3(1, 1, 1) | turbulence_noise_speed = Vector3(1, 1, 1) | ||||||
|  | turbulence_noise_speed_random = 1.41 | ||||||
| 
 | 
 | ||||||
| [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fliyi"] | [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fliyi"] | ||||||
| shading_mode = 0 |  | ||||||
| vertex_color_use_as_albedo = true | vertex_color_use_as_albedo = true | ||||||
| disable_receive_shadows = true | emission_enabled = true | ||||||
| billboard_mode = 3 | billboard_mode = 3 | ||||||
| billboard_keep_scale = true | billboard_keep_scale = true | ||||||
| particles_anim_h_frames = 1 | particles_anim_h_frames = 1 | ||||||
| @ -53,9 +45,7 @@ radius = 1.0 | |||||||
| height = 2.0 | height = 2.0 | ||||||
| 
 | 
 | ||||||
| [node name="ExplosionEffect" type="GPUParticles3D"] | [node name="ExplosionEffect" type="GPUParticles3D"] | ||||||
| emitting = false | lifetime = 0.7 | ||||||
| amount = 48 |  | ||||||
| one_shot = true |  | ||||||
| explosiveness = 0.92 | explosiveness = 0.92 | ||||||
| fixed_fps = 60 | fixed_fps = 60 | ||||||
| interpolate = false | interpolate = false | ||||||
|  | |||||||
| @ -1,5 +0,0 @@ | |||||||
| [gd_resource type="Curve" format=3 uid="uid://b5vptoxuq3dwb"] |  | ||||||
| 
 |  | ||||||
| [resource] |  | ||||||
| _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.145455, 1), 0.0, 0.0, 0, 0, Vector2(0.566234, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] |  | ||||||
| point_count = 4 |  | ||||||
| @ -1,12 +1,11 @@ | |||||||
| [gd_scene load_steps=7 format=3 uid="uid://cdtdvka0bssgy"] | [gd_scene load_steps=6 format=3 uid="uid://cdtdvka0bssgy"] | ||||||
| 
 | 
 | ||||||
| [ext_resource type="Script" path="res://src/world/level/level_catalog.gd" id="1_wjjeu"] | [ext_resource type="Script" path="res://src/world/level/level_catalog.gd" id="1_wjjeu"] | ||||||
| [ext_resource type="Resource" uid="uid://chewry1b1a28j" path="res://levels/debug_level/debug_island.tres" id="3_3eqbc"] | [ext_resource type="Resource" uid="uid://chewry1b1a28j" path="res://levels/debug_level/debug_island.tres" id="3_3eqbc"] | ||||||
| [ext_resource type="Script" path="res://src/world/level/level.gd" id="3_8lfqu"] | [ext_resource type="Script" path="res://src/world/level/level.gd" id="3_8lfqu"] | ||||||
| [ext_resource type="Resource" uid="uid://cfsy1nlfo4inx" path="res://levels/oneill/oneill.tres" id="4_8547s"] | [ext_resource type="Resource" uid="uid://cfsy1nlfo4inx" path="res://levels/oneill/oneill.tres" id="4_8547s"] | ||||||
| [ext_resource type="Resource" uid="uid://3odongr8qm8e" path="res://levels/mall/mall.tres" id="5_htd21"] | [ext_resource type="Resource" uid="uid://3odongr8qm8e" path="res://levels/mall/mall.tres" id="5_htd21"] | ||||||
| [ext_resource type="Resource" uid="uid://dexm07r8wvu83" path="res://levels/terrain_test/terrain_test.tres" id="6_uwkvl"] |  | ||||||
| 
 | 
 | ||||||
| [node name="LevelCatalog" type="Node"] | [node name="LevelCatalog" type="Node"] | ||||||
| script = ExtResource("1_wjjeu") | script = ExtResource("1_wjjeu") | ||||||
| levels = Array[ExtResource("3_8lfqu")]([ExtResource("3_3eqbc"), ExtResource("4_8547s"), ExtResource("5_htd21"), ExtResource("6_uwkvl")]) | levels = Array[ExtResource("3_8lfqu")]([ExtResource("3_3eqbc"), ExtResource("4_8547s"), ExtResource("5_htd21")]) | ||||||
|  | |||||||
| @ -2,8 +2,8 @@ | |||||||
| 
 | 
 | ||||||
| [ext_resource type="Script" path="res://src/world/world.gd" id="1_ybjyx"] | [ext_resource type="Script" path="res://src/world/world.gd" id="1_ybjyx"] | ||||||
| [ext_resource type="Script" path="res://src/player/world_player.gd" id="2_e743i"] | [ext_resource type="Script" path="res://src/player/world_player.gd" id="2_e743i"] | ||||||
|  | [ext_resource type="PackedScene" uid="uid://cvs546kk7t7aw" path="res://levels/terrain_test/terrain_test.tscn" id="2_hbpi4"] | ||||||
| [ext_resource type="Script" path="res://src/ui/world_ui.gd" id="2_imewa"] | [ext_resource type="Script" path="res://src/ui/world_ui.gd" id="2_imewa"] | ||||||
| [ext_resource type="PackedScene" uid="uid://bm2o3mex10v11" path="res://levels/debug_level/debug_level.tscn" id="2_qsk3q"] |  | ||||||
| [ext_resource type="Resource" uid="uid://crock3revdn73" path="res://src/player/debug_player.tres" id="3_pyw81"] | [ext_resource type="Resource" uid="uid://crock3revdn73" path="res://src/player/debug_player.tres" id="3_pyw81"] | ||||||
| [ext_resource type="Script" path="res://src/world/play_manager/practice_manager.gd" id="5_yk526"] | [ext_resource type="Script" path="res://src/world/play_manager/practice_manager.gd" id="5_yk526"] | ||||||
| [ext_resource type="PackedScene" uid="uid://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="7_0gd42"] | [ext_resource type="PackedScene" uid="uid://byvjsvavbg5xe" path="res://src/ui/menus/pause_menu/pause_menu.tscn" id="7_0gd42"] | ||||||
| @ -155,7 +155,7 @@ _data = { | |||||||
| 
 | 
 | ||||||
| [node name="World" type="Node" groups=["WorldGroup"]] | [node name="World" type="Node" groups=["WorldGroup"]] | ||||||
| script = ExtResource("1_ybjyx") | script = ExtResource("1_ybjyx") | ||||||
| initial_level = ExtResource("2_qsk3q") | initial_level = ExtResource("2_hbpi4") | ||||||
| manager = SubResource("Resource_hpydy") | manager = SubResource("Resource_hpydy") | ||||||
| 
 | 
 | ||||||
| [node name="Level" type="Node3D" parent="."] | [node name="Level" type="Node3D" parent="."] | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user