This commit is contained in:
2026-01-09 06:57:02 -05:00
11 changed files with 156 additions and 11 deletions

70
export_presets.cfg Normal file
View File

@@ -0,0 +1,70 @@
[preset.0]
name="Windows Desktop"
platform="Windows Desktop"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="../exports/net-gunner/windows/Net Gunner.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/embed_build_outputs=false

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,42 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bqwpra5d1faxw"
path="res://.godot/imported/van_reily.gltf-2817ab131dfda784fe3b5bb0047959d3.scn"
[deps]
source_file="res://models/pawns/van_reily.gltf"
dest_files=["res://.godot/imported/van_reily.gltf-2817ab131dfda784fe3b5bb0047959d3.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1

View File

@@ -89,6 +89,12 @@ layout_mode = 2
text = "WAITING FOR OPPONENT" text = "WAITING FOR OPPONENT"
horizontal_alignment = 1 horizontal_alignment = 1
[node name="IPLabel" type="Label" parent="Setup/Panel/Host Waiting"]
unique_name_in_owner = true
layout_mode = 2
text = "WAITING FOR OPPONENT"
horizontal_alignment = 1
[node name="PanelContainer" type="PanelContainer" parent="Setup/Panel/Host Waiting"] [node name="PanelContainer" type="PanelContainer" parent="Setup/Panel/Host Waiting"]
layout_mode = 2 layout_mode = 2
@@ -139,9 +145,10 @@ layout_mode = 2
[node name="Label" type="Label" parent="Setup/Panel/Joining/HBoxContainer2"] [node name="Label" type="Label" parent="Setup/Panel/Joining/HBoxContainer2"]
layout_mode = 2 layout_mode = 2
text = "MATCH CODE" text = "IP ADDRESS"
[node name="TextEdit" type="TextEdit" parent="Setup/Panel/Joining/HBoxContainer2"] [node name="IPEdit" type="TextEdit" parent="Setup/Panel/Joining/HBoxContainer2"]
unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3

View File

@@ -281,6 +281,7 @@ offset_bottom = 648.0
[node name="Music" type="AudioStreamPlayer" parent="."] [node name="Music" type="AudioStreamPlayer" parent="."]
stream = ExtResource("4_mykxm") stream = ExtResource("4_mykxm")
volume_db = -18.606
autoplay = true autoplay = true
[node name="SelectSound" type="AudioStreamPlayer" parent="."] [node name="SelectSound" type="AudioStreamPlayer" parent="."]

View File

@@ -49,14 +49,17 @@ func start_level(pawns : Dictionary[int, PawnBaseData]) -> void:
level_synced[1] = true level_synced[1] = true
switch_scene(vs_man_level) switch_scene(vs_man_level)
func switch_scene(packed_scene : PackedScene) -> void: func switch_scene(packed_scene : PackedScene, spawn : bool = true) -> void:
var blinder = blinder_template.instantiate() as TextureRect var blinder = blinder_template.instantiate() as TextureRect
var tween = create_tween() var tween = create_tween()
blinder.self_modulate.a = 0 blinder.self_modulate.a = 0
add_child(blinder) add_child(blinder)
tween.tween_property(blinder, "self_modulate:a", 1, .15) tween.tween_property(blinder, "self_modulate:a", 1, .15)
if spawn:
var spawner = get_tree().get_first_node_in_group("level_spawner") as MultiplayerSpawner var spawner = get_tree().get_first_node_in_group("level_spawner") as MultiplayerSpawner
tween.tween_callback(spawner.add_child.bind(packed_scene.instantiate(),true)) tween.tween_callback(spawner.add_child.bind(packed_scene.instantiate(),true))
else:
tween.tween_callback(get_tree().change_scene_to_packed.bind(packed_scene))
tween.tween_property(blinder, "self_modulate:a", 0, .15) tween.tween_property(blinder, "self_modulate:a", 0, .15)
tween.tween_callback(blinder.queue_free) tween.tween_callback(blinder.queue_free)

View File

@@ -25,11 +25,12 @@ func become_host() -> void:
multiplayer.peer_disconnected.connect(_remove_player_from_game) multiplayer.peer_disconnected.connect(_remove_player_from_game)
func join_game(new_handle : String) -> Error: func join_game(new_handle : String, ip : String = "") -> Error:
print("Player 2 joining.") print("Player 2 joining.")
if ip == "":
ip = SERVER_IP
var client_peer = ENetMultiplayerPeer.new() var client_peer = ENetMultiplayerPeer.new()
var error = client_peer.create_client(SERVER_IP, SERVER_PORT) var error = client_peer.create_client(ip, SERVER_PORT)
multiplayer.multiplayer_peer = client_peer multiplayer.multiplayer_peer = client_peer
handle = new_handle handle = new_handle
id = multiplayer.get_unique_id() id = multiplayer.get_unique_id()
@@ -85,3 +86,18 @@ func receive_peer_handle(peer_id, peer_handle) -> void:
@rpc("any_peer", "call_remote") @rpc("any_peer", "call_remote")
func report_handle_to_peer(peer_id : int) -> void: func report_handle_to_peer(peer_id : int) -> void:
rpc_id(peer_id, "receive_peer_handle", multiplayer.get_unique_id(), handle) rpc_id(peer_id, "receive_peer_handle", multiplayer.get_unique_id(), handle)
func get_local_ip() -> String:
var ip_address = ""
# Get all local addresses as an Array
var addresses: PackedStringArray = IP.get_local_addresses()
for address in addresses:
# Check if it is an IPv4 address and not a loopback or link-local address
if "." in address and not address.begins_with("127.") and not address.begins_with("169.254."):
# Filter for common private IP ranges (192.168.x.x, 10.x.x.x, 172.16-31.x.x)
if address.begins_with("192.168.") or address.begins_with("10.") or (address.begins_with("172.") and int(address.split(".")[1]) >= 16 and int(address.split(".")[1]) <= 31):
ip_address = address
break # Exit the loop once a valid local IP is found
return ip_address

View File

@@ -33,6 +33,7 @@ func _on_start_hosting_button_pressed() -> void:
#Set fields #Set fields
%ParticipantsText.text = "[color=FFFF00]*%s (HOST)[/color]\n" % handle %ParticipantsText.text = "[color=FFFF00]*%s (HOST)[/color]\n" % handle
%"Host Waiting".visible = true %"Host Waiting".visible = true
%IPLabel.text = Multiplayer.get_local_ip()
Multiplayer.become_host() Multiplayer.become_host()
@@ -61,7 +62,7 @@ func _on_join_button_pressed() -> void:
#Check for valid game #Check for valid game
#If found #If found
%Joining.visible = false %Joining.visible = false
if await Multiplayer.join_game(handle): if await Multiplayer.join_game(handle, %IPEdit.text):
%"Host Waiting".visible = true %"Host Waiting".visible = true
%StartButton.visible = false %StartButton.visible = false

View File

@@ -2,6 +2,7 @@ extends MultiplayerSpawner
func _ready() -> void: func _ready() -> void:
print(Multiplayer.get_local_ip())
if Game.net_test: if Game.net_test:
await get_tree().create_timer(0.25).timeout await get_tree().create_timer(0.25).timeout
Multiplayer.join_game("123") Multiplayer.join_game("123")

View File

@@ -68,7 +68,7 @@ func _process(delta: float) -> void:
switch_sound.play() switch_sound.play()
switch_menu(wrapi(menu_choice + menu_dir, 0, len(menu_list))) switch_menu(wrapi(menu_choice + menu_dir, 0, len(menu_list)))
if Input.is_action_just_pressed("ui_accept"): if Input.is_action_just_pressed("ui_accept"):
Game.switch_scene(menu_list[menu_choice].scene) Game.switch_scene(menu_list[menu_choice].scene, false)
func switch_menu(new_choice : int) -> void: func switch_menu(new_choice : int) -> void:

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=34 format=3 uid="uid://c8xf3qawk5c6u"] [gd_scene load_steps=35 format=3 uid="uid://c8xf3qawk5c6u"]
[ext_resource type="Script" uid="uid://bcs7ygh6s3l35" path="res://scripts/pawn_controller.gd" id="1_h27ep"] [ext_resource type="Script" uid="uid://bcs7ygh6s3l35" path="res://scripts/pawn_controller.gd" id="1_h27ep"]
[ext_resource type="Script" uid="uid://wye3mat5y5yg" path="res://scripts/pawn_body.gd" id="2_dn5ph"] [ext_resource type="Script" uid="uid://wye3mat5y5yg" path="res://scripts/pawn_body.gd" id="2_dn5ph"]
@@ -20,6 +20,7 @@
[ext_resource type="AudioStream" uid="uid://cfq0pu0qxgb6u" path="res://audio/sounds/134688__otbtechno__bike-bell.wav" id="18_1x3g1"] [ext_resource type="AudioStream" uid="uid://cfq0pu0qxgb6u" path="res://audio/sounds/134688__otbtechno__bike-bell.wav" id="18_1x3g1"]
[ext_resource type="Texture2D" uid="uid://dmnwtwu5v4voh" path="res://visuals/images/icons/detect mark.png" id="19_5822g"] [ext_resource type="Texture2D" uid="uid://dmnwtwu5v4voh" path="res://visuals/images/icons/detect mark.png" id="19_5822g"]
[ext_resource type="AudioStream" uid="uid://cmnibhyxpag0a" path="res://audio/sounds/BeepBeep_high.wav" id="20_v7o58"] [ext_resource type="AudioStream" uid="uid://cmnibhyxpag0a" path="res://audio/sounds/BeepBeep_high.wav" id="20_v7o58"]
[ext_resource type="PackedScene" uid="uid://bqwpra5d1faxw" path="res://models/pawns/van_reily.gltf" id="21_dn5ph"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_y646j"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_y646j"]
next_pass = ExtResource("4_8twd3") next_pass = ExtResource("4_8twd3")
@@ -230,6 +231,8 @@ floor_snap_length = 1.0
script = ExtResource("1_h27ep") script = ExtResource("1_h27ep")
speed = 3.0 speed = 3.0
[node name="blockbench_export" parent="." instance=ExtResource("21_dn5ph")]
[node name="PawnBody" type="Node3D" parent="."] [node name="PawnBody" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.425, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.425, 0)
script = ExtResource("2_dn5ph") script = ExtResource("2_dn5ph")