Skip to content

Commit

Permalink
update multiplayer bomber
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Franke committed Jul 28, 2022
1 parent 044afe7 commit b3a01bc
Show file tree
Hide file tree
Showing 12 changed files with 115 additions and 121 deletions.
1 change: 1 addition & 0 deletions networking/multiplayer_bomber/brickfloor.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ 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
1 change: 1 addition & 0 deletions networking/multiplayer_bomber/charwalk.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ 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
1 change: 1 addition & 0 deletions networking/multiplayer_bomber/explosion.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ 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
1 change: 1 addition & 0 deletions networking/multiplayer_bomber/icon.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ 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
2 changes: 1 addition & 1 deletion networking/multiplayer_bomber/lobby.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 2
size_flags_vertical = 2
script = ExtResource( "1" )
script = ExtResource("1")

[node name="Players" type="Panel" parent="."]
visible = false
Expand Down
23 changes: 11 additions & 12 deletions networking/multiplayer_bomber/montserrat.otf.import
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[remap]

importer="font_data_dynamic"
type="FontData"
uid="uid://dksjmw4cy83s4"
type="FontFile"
uid="uid://ivi1vf3p5jqn"
path="res://.godot/imported/montserrat.otf-0d875bde8933edfaf65407b0d9da84e5.fontdata"

[deps]
Expand All @@ -12,22 +12,21 @@ dest_files=["res://.godot/imported/montserrat.otf-0d875bde8933edfaf65407b0d9da84

[params]

Rendering=null
antialiased=true
generate_mipmaps=false
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
force_autohinter=false
hinting=1
subpixel_positioning=1
embolden=0.0
transform=Transform2D(1, 0, 0, 1, 0, 0)
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
opentype_feature_overrides={}
preload/char_ranges=PackedStringArray()
preload/glyph_ranges=PackedStringArray()
preload/configurations=PackedStringArray()
support_overrides/language_enabled=PackedStringArray()
support_overrides/language_disabled=PackedStringArray()
support_overrides/script_enabled=PackedStringArray()
support_overrides/script_disabled=PackedStringArray()
preload=[]
language_support={}
script_support={}
opentype_features={}
38 changes: 19 additions & 19 deletions networking/multiplayer_bomber/player.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[gd_scene load_steps=15 format=3 uid="uid://dviwgv2ty8v6u"]
[gd_scene load_steps=14 format=3 uid="uid://dviwgv2ty8v6u"]

[ext_resource type="Script" path="res://player.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://bsqovikudjr0q" path="res://charwalk.png" id="2"]
[ext_resource type="FontData" uid="uid://dksjmw4cy83s4" path="res://montserrat.otf" id="3"]
[ext_resource type="Script" path="res://player_controls.gd" id="4_k1vfr"]

[sub_resource type="CircleShape2D" id="1"]
Expand Down Expand Up @@ -132,8 +131,15 @@ tracks/0/keys = {
"values": [2, 6, 10, 14]
}

[sub_resource type="Font" id="8"]
data/0 = ExtResource( "3" )
[sub_resource type="AnimationLibrary" id="AnimationLibrary_3ti7y"]
_data = {
"standing": SubResource("2"),
"stunned": SubResource("3"),
"walk_down": SubResource("4"),
"walk_left": SubResource("5"),
"walk_right": SubResource("6"),
"walk_up": SubResource("7")
}

[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_xm6wv"]
properties/0/path = NodePath(".:synced_position")
Expand All @@ -153,26 +159,23 @@ properties/1/sync = true

[node name="player" type="CharacterBody2D"]
motion_mode = 1
script = ExtResource( "1" )
script = ExtResource("1")

[node name="sprite" type="Sprite2D" parent="."]
position = Vector2(0.0750351, 6.23615)
rotation = -6.28319
texture = ExtResource( "2" )
texture = ExtResource("2")
offset = Vector2(-0.0750351, -6.23615)
hframes = 4
vframes = 4

[node name="shape" type="CollisionShape2D" parent="."]
shape = SubResource( "1" )
shape = SubResource("1")

[node name="anim" type="AnimationPlayer" parent="."]
anims/standing = SubResource( "2" )
anims/stunned = SubResource( "3" )
anims/walk_down = SubResource( "4" )
anims/walk_left = SubResource( "5" )
anims/walk_right = SubResource( "6" )
anims/walk_up = SubResource( "7" )
libraries = {
"": SubResource("AnimationLibrary_3ti7y")
}

[node name="label" type="Label" parent="."]
offset_left = -82.0
Expand All @@ -181,18 +184,15 @@ offset_right = 85.0
offset_bottom = -14.0
size_flags_horizontal = 2
size_flags_vertical = 0
theme_override_fonts/font = SubResource( "8" )
theme_override_font_sizes/font_size = 16
text = "Player 1"
horizontal_alignment = 1

[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
root_path = NodePath("..")
resource = SubResource( "SceneReplicationConfig_xm6wv" )
replication_config = SubResource("SceneReplicationConfig_xm6wv")

[node name="Inputs" type="Node" parent="."]
script = ExtResource( "4_k1vfr" )
script = ExtResource("4_k1vfr")

[node name="InputsSync" type="MultiplayerSynchronizer" parent="Inputs"]
root_path = NodePath("..")
resource = SubResource( "SceneReplicationConfig_kkxsa" )
replication_config = SubResource("SceneReplicationConfig_kkxsa")
2 changes: 1 addition & 1 deletion networking/multiplayer_bomber/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ config/description="A multiplayer implementation of the classical bomberman game
One of the players should press 'host', while the other
should type in his address and press 'play'."
run/main_scene="res://lobby.tscn"
config/icon="res://icon.png"
config/features=PackedStringArray("4.0")
config/icon="res://icon.png"

[autoload]

Expand Down
1 change: 1 addition & 0 deletions networking/multiplayer_bomber/rock_bit.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ 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
4 changes: 1 addition & 3 deletions networking/multiplayer_bomber/score.gd
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ func add_player(id, new_player_name):
l.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
l.set_text(new_player_name + "\n" + "0")
l.set_h_size_flags(SIZE_EXPAND_FILL)
var font = Font.new()
font.add_data(preload("res://montserrat.otf"))
l.set("custom_fonts/font", font)
l.set("custom_fonts/font", preload("res://montserrat.otf"))
l.set("custom_font_size/font_size", 18)
add_child(l)

Expand Down
4 changes: 2 additions & 2 deletions networking/multiplayer_bomber/tileset.tres
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[ext_resource type="Texture2D" uid="uid://bdomqql6y50po" path="res://brickfloor.png" id="1"]

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_qhkfp"]
texture = ExtResource( "1" )
texture = ExtResource("1")
texture_region_size = Vector2i(48, 48)
0:0/0 = 0
0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0)
Expand All @@ -16,4 +16,4 @@ texture_region_size = Vector2i(48, 48)
[resource]
tile_size = Vector2i(48, 48)
physics_layer_0/collision_layer = 1
sources/0 = SubResource( "TileSetAtlasSource_qhkfp" )
sources/0 = SubResource("TileSetAtlasSource_qhkfp")
Loading

0 comments on commit b3a01bc

Please sign in to comment.