First network test
This commit is contained in:
commit
cd2d63c8eb
98 changed files with 581 additions and 0 deletions
1
.godot/.gdignore
Normal file
1
.godot/.gdignore
Normal file
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,195 @@
|
|||
[editor_states]
|
||||
|
||||
Anim={
|
||||
"visible": false
|
||||
}
|
||||
2D={
|
||||
"grid_offset": Vector2(0, 0),
|
||||
"grid_snap_active": false,
|
||||
"grid_step": Vector2(8, 8),
|
||||
"grid_visibility": 1,
|
||||
"ofs": Vector2(-569.721, -329.508),
|
||||
"primary_grid_step": Vector2i(8, 8),
|
||||
"show_group_gizmos": true,
|
||||
"show_guides": true,
|
||||
"show_helpers": false,
|
||||
"show_lock_gizmos": true,
|
||||
"show_origin": true,
|
||||
"show_position_gizmos": true,
|
||||
"show_rulers": true,
|
||||
"show_transformation_gizmos": true,
|
||||
"show_viewport": true,
|
||||
"show_zoom_control": true,
|
||||
"smart_snap_active": false,
|
||||
"snap_guides": true,
|
||||
"snap_node_anchors": true,
|
||||
"snap_node_center": true,
|
||||
"snap_node_parent": true,
|
||||
"snap_node_sides": true,
|
||||
"snap_other_nodes": true,
|
||||
"snap_pixel": true,
|
||||
"snap_relative": false,
|
||||
"snap_rotation": false,
|
||||
"snap_rotation_offset": 0.0,
|
||||
"snap_rotation_step": 0.261799,
|
||||
"snap_scale": false,
|
||||
"snap_scale_step": 0.1,
|
||||
"zoom": 0.683013
|
||||
}
|
||||
3D={
|
||||
"fov": 70.01,
|
||||
"gizmos_status": {
|
||||
"AudioListener3D": 0,
|
||||
"AudioStreamPlayer3D": 0,
|
||||
"CPUParticles3D": 0,
|
||||
"CSGShape3D": 0,
|
||||
"Camera3D": 0,
|
||||
"CollisionObject3D": 0,
|
||||
"CollisionPolygon3D": 0,
|
||||
"CollisionShape3D": 0,
|
||||
"Decal": 0,
|
||||
"FogVolume": 0,
|
||||
"GPUParticles3D": 0,
|
||||
"GPUParticlesCollision3D": 0,
|
||||
"Joint3D": 0,
|
||||
"Light3D": 0,
|
||||
"LightmapGI": 0,
|
||||
"LightmapProbe": 0,
|
||||
"Marker3D": 0,
|
||||
"MeshInstance3DCustomAABB": 0,
|
||||
"NavigationLink3D": 0,
|
||||
"NavigationObstacle3D": 0,
|
||||
"NavigationRegion3D": 0,
|
||||
"OccluderInstance3D": 0,
|
||||
"Particles3DEmissionShape": 0,
|
||||
"Path3D": 0,
|
||||
"PhysicalBone3D": 0,
|
||||
"RayCast3D": 0,
|
||||
"ReflectionProbe": 0,
|
||||
"ShapeCast3D": 0,
|
||||
"Skeleton3D": 0,
|
||||
"SoftBody3D": 0,
|
||||
"SpringArm3D": 0,
|
||||
"SpringBoneCollision3D": 0,
|
||||
"SpringBoneSimulator3D": 0,
|
||||
"VehicleWheel3D": 0,
|
||||
"VisibleOnScreenNotifier3D": 0,
|
||||
"VoxelGI": 0
|
||||
},
|
||||
"local_coords": false,
|
||||
"preview_sun_env": {
|
||||
"environ_ao_enabled": false,
|
||||
"environ_enabled": true,
|
||||
"environ_energy": 1.0,
|
||||
"environ_gi_enabled": false,
|
||||
"environ_glow_enabled": true,
|
||||
"environ_ground_color": Color(0.2, 0.169, 0.133, 1),
|
||||
"environ_sky_color": Color(0.385, 0.454, 0.55, 1),
|
||||
"environ_tonemap_enabled": true,
|
||||
"sun_color": Color(1, 1, 1, 1),
|
||||
"sun_enabled": true,
|
||||
"sun_energy": 1.0,
|
||||
"sun_max_distance": 100.0,
|
||||
"sun_rotation": Vector2(-1.0472, 2.61799)
|
||||
},
|
||||
"rotate_snap": 15.0,
|
||||
"scale_snap": 10.0,
|
||||
"show_grid": true,
|
||||
"show_origin": true,
|
||||
"snap_enabled": false,
|
||||
"translate_snap": 1.0,
|
||||
"viewport_mode": 1,
|
||||
"viewports": [{
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 22,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"grid": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": true,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"transform_gizmo": true,
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.43455,
|
||||
"y_rotation": 0.0541421
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 22,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"grid": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"transform_gizmo": true,
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 22,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"grid": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"transform_gizmo": true,
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}, {
|
||||
"auto_orthogonal": false,
|
||||
"auto_orthogonal_enabled": true,
|
||||
"cinematic_preview": false,
|
||||
"display_mode": 22,
|
||||
"distance": 4.0,
|
||||
"doppler": false,
|
||||
"frame_time": false,
|
||||
"gizmos": true,
|
||||
"grid": true,
|
||||
"half_res": false,
|
||||
"information": false,
|
||||
"listener": false,
|
||||
"lock_rotation": false,
|
||||
"orthogonal": false,
|
||||
"position": Vector3(0, 0, 0),
|
||||
"transform_gizmo": true,
|
||||
"use_environment": false,
|
||||
"view_type": 0,
|
||||
"x_rotation": 0.5,
|
||||
"y_rotation": -0.5
|
||||
}],
|
||||
"zfar": 4000.01,
|
||||
"znear": 0.05
|
||||
}
|
||||
Game={
|
||||
"camera_override_mode": 2,
|
||||
"hide_selection": false,
|
||||
"select_mode": 0
|
||||
}
|
||||
selected_nodes=Array[NodePath]([NodePath("/root/@EditorNode@21272/@Panel@14/@VBoxContainer@15/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@26/DockVSplitCenter/@VSplitContainer@54/@VBoxContainer@55/@EditorMainScreen@102/MainScreen/@CanvasItemEditor@11482/@VSplitContainer@11134/@HSplitContainer@11136/@HSplitContainer@11138/@Control@11139/@SubViewportContainer@11140/@SubViewport@11141/Control/CenterContainer/HBoxContainer/VBoxContainer2/HBoxContainer/ServerPortBox")])
|
|
@ -0,0 +1,5 @@
|
|||
[folding]
|
||||
|
||||
node_unfolds=[NodePath("CenterContainer"), PackedStringArray("Layout", "Layout/Transform"), NodePath("CenterContainer/HBoxContainer/VBoxContainer"), PackedStringArray("Localization", "Layout", "Layout/Container Sizing"), NodePath("CenterContainer/HBoxContainer/VBoxContainer/Log"), PackedStringArray("Layout"), NodePath("CenterContainer/HBoxContainer/VBoxContainer2/HBoxContainer2/ServerIPBox"), PackedStringArray("Layout")]
|
||||
resource_unfolds=[]
|
||||
nodes_folded=[]
|
11
.godot/editor/create_recent.Node
Normal file
11
.godot/editor/create_recent.Node
Normal file
|
@ -0,0 +1,11 @@
|
|||
HBoxContainer
|
||||
VSeparator
|
||||
VBoxContainer
|
||||
Label
|
||||
LineEdit
|
||||
MultiplayerSynchronizer
|
||||
CodeEdit
|
||||
ColorRect
|
||||
HSeparator
|
||||
Button
|
||||
CenterContainer
|
63
.godot/editor/editor_layout.cfg
Normal file
63
.godot/editor/editor_layout.cfg
Normal file
|
@ -0,0 +1,63 @@
|
|||
[docks]
|
||||
|
||||
dock_3_selected_tab_idx=0
|
||||
dock_4_selected_tab_idx=0
|
||||
dock_5_selected_tab_idx=0
|
||||
dock_floating={}
|
||||
dock_filesystem_h_split_offset=360
|
||||
dock_filesystem_v_split_offset=0
|
||||
dock_filesystem_display_mode=0
|
||||
dock_filesystem_file_sort=0
|
||||
dock_filesystem_file_list_display_mode=1
|
||||
dock_filesystem_selected_paths=PackedStringArray("res://")
|
||||
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://")
|
||||
dock_node_current_tab=0
|
||||
dock_history_include_scene=true
|
||||
dock_history_include_global=true
|
||||
dock_bottom=[]
|
||||
dock_closed=[]
|
||||
dock_split_2=0
|
||||
dock_split_3=0
|
||||
dock_hsplit_1=0
|
||||
dock_hsplit_2=270
|
||||
dock_hsplit_3=-491
|
||||
dock_hsplit_4=0
|
||||
dock_3="Scene,Import"
|
||||
dock_4="FileSystem"
|
||||
dock_5="Inspector,Node,History"
|
||||
|
||||
[EditorNode]
|
||||
|
||||
open_scenes=PackedStringArray("res://Main.tscn")
|
||||
current_scene="res://Main.tscn"
|
||||
center_split_offset=0
|
||||
selected_default_debugger_tab_idx=0
|
||||
selected_main_editor_idx=2
|
||||
selected_bottom_panel_item=0
|
||||
|
||||
[EditorWindow]
|
||||
|
||||
screen=0
|
||||
mode="maximized"
|
||||
position=Vector2i(0, 28)
|
||||
|
||||
[ScriptEditor]
|
||||
|
||||
open_scripts=["res://main.gd"]
|
||||
selected_script="res://main.gd"
|
||||
open_help=["MultiplayerPeer"]
|
||||
script_split_offset=300
|
||||
list_split_offset=0
|
||||
zoom_factor=1.0
|
||||
|
||||
[GameView]
|
||||
|
||||
floating_window_rect=Rect2i(1111, 552, 1618, 965)
|
||||
floating_window_screen=0
|
||||
|
||||
[ShaderEditor]
|
||||
|
||||
open_shaders=[]
|
||||
split_offset=300
|
||||
selected_shader=""
|
||||
text_shader_zoom_factor=1.0
|
0
.godot/editor/favorites.Node
Normal file
0
.godot/editor/favorites.Node
Normal file
5
.godot/editor/filesystem_cache10
Normal file
5
.godot/editor/filesystem_cache10
Normal file
|
@ -0,0 +1,5 @@
|
|||
ea4bc82a6ad023ab7ee23ee620429895
|
||||
::res://::1745759673
|
||||
default_env.tres::Environment::-1::1745759669::0::1::::<><><>0<>0<><>::
|
||||
icon.png::CompressedTexture2D::8843606547707297254::1745759669::1745759674::1::::<><><>0<>0<>839b9ce3ffef2224476c45ec2bf89d42<>res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex::
|
||||
::res://addons/::1745759669
|
2
.godot/editor/filesystem_update4
Normal file
2
.godot/editor/filesystem_update4
Normal file
|
@ -0,0 +1,2 @@
|
|||
res://Main.tscn
|
||||
res://main.gd
|
|
@ -0,0 +1,3 @@
|
|||
[folding]
|
||||
|
||||
sections_unfolded=PackedStringArray()
|
39
.godot/editor/project_metadata.cfg
Normal file
39
.godot/editor/project_metadata.cfg
Normal file
|
@ -0,0 +1,39 @@
|
|||
[editor_metadata]
|
||||
|
||||
executable_path="/home/buymymojo/.local/share/Godot-Manager/versions/4.4.1-stable/Godot_v4.4.1-stable_linux.x86_64"
|
||||
|
||||
[dialog_bounds]
|
||||
|
||||
project_settings=Rect2(1020, 555, 1800, 1050)
|
||||
create_new_node=Rect2(1245, 555, 1561, 1239)
|
||||
|
||||
[recent_files]
|
||||
|
||||
scenes=["res://Main.tscn"]
|
||||
scripts=["MultiplayerPeer", "res://main.gd"]
|
||||
|
||||
[color_picker]
|
||||
|
||||
picker_shape=3
|
||||
recent_presets=PackedColorArray(0.279967, 0.279967, 0.279967, 1, 0.325049, 0.252212, 0.324162, 1)
|
||||
|
||||
[debug_options]
|
||||
|
||||
run_main_feature_tags=""
|
||||
multiple_instances_enabled=true
|
||||
run_instances_config=Array[Dictionary]([{
|
||||
"arguments": "",
|
||||
"features": "",
|
||||
"override_args": false,
|
||||
"override_features": false
|
||||
}, {
|
||||
"arguments": "",
|
||||
"features": "",
|
||||
"override_args": false,
|
||||
"override_features": false
|
||||
}])
|
||||
run_instance_count=2.0
|
||||
|
||||
[script_setup]
|
||||
|
||||
last_selected_language="GDScript"
|
1
.godot/editor/recent_dirs
Normal file
1
.godot/editor/recent_dirs
Normal file
|
@ -0,0 +1 @@
|
|||
res://
|
13
.godot/editor/script_editor_cache.cfg
Normal file
13
.godot/editor/script_editor_cache.cfg
Normal file
|
@ -0,0 +1,13 @@
|
|||
[res://main.gd]
|
||||
|
||||
state={
|
||||
"bookmarks": PackedInt32Array(),
|
||||
"breakpoints": PackedInt32Array(),
|
||||
"column": 28,
|
||||
"folded_lines": Array[int]([]),
|
||||
"h_scroll_position": 11,
|
||||
"row": 31,
|
||||
"scroll_position": 0.0,
|
||||
"selection": false,
|
||||
"syntax_highlighter": "GDScript"
|
||||
}
|
1
.godot/global_script_class_cache.cfg
Normal file
1
.godot/global_script_class_cache.cfg
Normal file
|
@ -0,0 +1 @@
|
|||
list=[]
|
BIN
.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex
Normal file
BIN
.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex
Normal file
Binary file not shown.
|
@ -0,0 +1,3 @@
|
|||
source_md5="0feb238e9e690a790231908cacfe2c4b"
|
||||
dest_md5="b3ccb78ca3b4b8c1c67e8cc239dc4ec3"
|
||||
|
0
.godot/scene_groups_cache.cfg
Normal file
0
.godot/scene_groups_cache.cfg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.godot/uid_cache.bin
Normal file
BIN
.godot/uid_cache.bin
Normal file
Binary file not shown.
117
Main.tscn
Normal file
117
Main.tscn
Normal file
|
@ -0,0 +1,117 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dokpuags3k7nh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cqtqx7hb57hss" path="res://main.gd" id="1_glv2v"]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_glv2v")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.325049, 0.252212, 0.324162, 1)
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="StartServerButton" type="Button" parent="CenterContainer/HBoxContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Start Server"
|
||||
|
||||
[node name="JoinServerButton" type="Button" parent="CenterContainer/HBoxContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Join Server"
|
||||
|
||||
[node name="SendMessageButton" type="Button" parent="CenterContainer/HBoxContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Send Message"
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="CenterContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "MSG:"
|
||||
|
||||
[node name="MSGBox" type="LineEdit" parent="CenterContainer/HBoxContainer/VBoxContainer/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
placeholder_text = "Write Message Here"
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="CenterContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Log" type="CodeEdit" parent="CenterContainer/HBoxContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(600, 512)
|
||||
layout_mode = 2
|
||||
placeholder_text = "Waiting..."
|
||||
editable = false
|
||||
context_menu_enabled = false
|
||||
emoji_menu_enabled = false
|
||||
shortcut_keys_enabled = false
|
||||
wrap_mode = 1
|
||||
scroll_smooth = true
|
||||
gutters_draw_line_numbers = true
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="CenterContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="CenterContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="CenterContainer/HBoxContainer/VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/HBoxContainer/VBoxContainer2/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Server IP:"
|
||||
|
||||
[node name="ServerIPBox" type="LineEdit" parent="CenterContainer/HBoxContainer/VBoxContainer2/HBoxContainer2"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(128, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "127.0.0.1"
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/HBoxContainer/VBoxContainer2"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer/HBoxContainer/VBoxContainer2/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Server Port:"
|
||||
|
||||
[node name="ServerPortBox" type="LineEdit" parent="CenterContainer/HBoxContainer/VBoxContainer2/HBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "5550"
|
||||
placeholder_text = "Write Message Here"
|
BIN
Media/Demo.mp4
Normal file
BIN
Media/Demo.mp4
Normal file
Binary file not shown.
BIN
Media/Demo.webm
Normal file
BIN
Media/Demo.webm
Normal file
Binary file not shown.
8
README.md
Normal file
8
README.md
Normal file
|
@ -0,0 +1,8 @@
|
|||
# A simple networking test
|
||||
|
||||
Just wanted to see how Godot's networking works!
|
||||
|
||||
<video controls width="900">
|
||||
<source src="./Media/Demo.webm" type="video/webm" />
|
||||
<source src="./Media/Demo.mp4" type="video/mp4" />
|
||||
</Video>
|
7
default_env.tres
Normal file
7
default_env.tres
Normal file
|
@ -0,0 +1,7 @@
|
|||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
background_sky = SubResource(1)
|
BIN
icon.png
Normal file
BIN
icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
34
icon.png.import
Normal file
34
icon.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dx8554neu14mk"
|
||||
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.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
|
48
main.gd
Normal file
48
main.gd
Normal file
|
@ -0,0 +1,48 @@
|
|||
extends Control
|
||||
|
||||
@onready var start_server_button: Button = %StartServerButton
|
||||
@onready var join_server_button: Button = %JoinServerButton
|
||||
@onready var send_message_button: Button = %SendMessageButton
|
||||
@onready var console_log: CodeEdit = %Log
|
||||
@onready var msg_box: LineEdit = %MSGBox
|
||||
|
||||
var peer: ENetMultiplayerPeer
|
||||
|
||||
@onready var server_ip_box: LineEdit = %ServerIPBox
|
||||
@onready var server_port_box: LineEdit = %ServerPortBox
|
||||
const SERVER_MAX_CLIENTS: int = 16
|
||||
|
||||
func _ready() -> void:
|
||||
start_server_button.pressed.connect(_start_server)
|
||||
join_server_button.pressed.connect(_join_server)
|
||||
send_message_button.pressed.connect(_send_msg)
|
||||
pass
|
||||
|
||||
func _start_server() -> void:
|
||||
peer = ENetMultiplayerPeer.new()
|
||||
peer.create_server(int(server_port_box.text), SERVER_MAX_CLIENTS)
|
||||
multiplayer.multiplayer_peer = peer
|
||||
console_log.insert_line_at(0, "New server started on " + server_ip_box.text + ":" + server_port_box.text)
|
||||
#log.text =
|
||||
|
||||
func _join_server() -> void:
|
||||
peer = ENetMultiplayerPeer.new()
|
||||
peer.create_client(server_ip_box.text, int(server_port_box.text))
|
||||
multiplayer.multiplayer_peer = peer
|
||||
console_log.insert_line_at(0, "Attempting to connect to " + server_ip_box.text + ":" + server_port_box.text + "...")
|
||||
await get_tree().create_timer(5).timeout
|
||||
if peer.get_connection_status() == 2:
|
||||
console_log.insert_line_at(0, "Connected to saerver at " + server_ip_box.text + ":" + server_port_box.text + " with unique id: " + str(peer.get_unique_id()))
|
||||
|
||||
print(str(peer.get_connection_status()))
|
||||
|
||||
func _send_msg() -> void:
|
||||
if !msg_box.text.is_empty():
|
||||
message_recieved.rpc(msg_box.text)
|
||||
else:
|
||||
message_recieved.rpc("Empty Message")
|
||||
|
||||
|
||||
@rpc("any_peer", "call_local")
|
||||
func message_recieved(msg: String) -> void:
|
||||
console_log.insert_line_at(0, "New Message: " + msg)
|
1
main.gd.uid
Normal file
1
main.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cqtqx7hb57hss
|
24
project.godot
Normal file
24
project.godot
Normal file
|
@ -0,0 +1,24 @@
|
|||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="NetworkingTest"
|
||||
config/description="Enter an interesting project description here!"
|
||||
run/main_scene="uid://dokpuags3k7nh"
|
||||
config/features=PackedStringArray("4.4")
|
||||
run/low_processor_mode=true
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1600
|
||||
window/size/viewport_height=900
|
||||
window/stretch/mode="canvas_items"
|
Loading…
Add table
Add a link
Reference in a new issue