diff --git a/networking/multiplayer_bomber/bomb.gd b/networking/multiplayer_bomber/bomb.gd index e9c73869..0e10c8a3 100644 --- a/networking/multiplayer_bomber/bomb.gd +++ b/networking/multiplayer_bomber/bomb.gd @@ -5,17 +5,18 @@ var from_player # Called from the animation. func explode(): - if not is_network_master(): - # Explode only on master. + if not is_multiplayer_authority(): + # Explode only on authority. return for p in in_area: if p.has_method("exploded"): - # Exploded has a master keyword, so it will only be received by the master. - p.rpc("exploded", from_player) + # Exploded can only be called by the authority, but will also be called locally. + p.rpc(&"exploded", from_player) func done(): - queue_free() + if is_multiplayer_authority(): + queue_free() func _on_bomb_body_enter(body): diff --git a/networking/multiplayer_bomber/bomb.tscn b/networking/multiplayer_bomber/bomb.tscn index 18cb24cd..090e45ba 100644 --- a/networking/multiplayer_bomber/bomb.tscn +++ b/networking/multiplayer_bomber/bomb.tscn @@ -1,27 +1,36 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=10 format=3 uid="uid://enwoaqi0rnei"] -[ext_resource path="res://bomb.gd" type="Script" id=1] -[ext_resource path="res://brickfloor.png" type="Texture2D" id=2] -[ext_resource path="res://explosion.png" type="Texture2D" id=3] +[ext_resource type="Script" path="res://bomb.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://bdomqql6y50po" path="res://brickfloor.png" id="2"] +[ext_resource type="Texture2D" uid="uid://drfbkdqmj0gu2" path="res://explosion.png" id="3"] -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2(8, 96) +[sub_resource type="RectangleShape2D" id="1"] +size = Vector2(16, 192) -[sub_resource type="RectangleShape2D" id=2] -extents = Vector2(96, 8) +[sub_resource type="RectangleShape2D" id="2"] +size = Vector2(192, 16) -[sub_resource type="Curve" id=3] +[sub_resource type="Curve" id="3"] max_value = 2.0 _data = [Vector2(0.00150494, 0.398437), 0.0, 0.0, 0, 0, Vector2(0.0152287, 1.42969), 0.0, 0.0, 0, 0, Vector2(0.478607, 1.30078), 0.0, 0.0, 0, 0, Vector2(1, 0.291016), 0.0, 0.0, 0, 0] -[sub_resource type="Animation" id=4] +[sub_resource type="CurveTexture" id="4"] +curve = SubResource( "3" ) + +[sub_resource type="ParticlesMaterial" id="5"] +emission_shape = 2 +emission_sphere_radius = 1.0 +gravity = Vector3(0, 0, 0) +scale_curve = SubResource( "4" ) + +[sub_resource type="Animation" id="6"] length = 4.0 tracks/0/type = "value" -tracks/0/path = NodePath("Sprite2D:self_modulate") -tracks/0/interp = 1 -tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true +tracks/0/path = NodePath("Sprite:self_modulate") +tracks/0/interp = 1 +tracks/0/loop_wrap = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.4, 0.6, 0.8, 1.1, 1.3, 1.5, 1.8, 1.9, 2, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 3), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), @@ -29,28 +38,28 @@ tracks/0/keys = { "values": [Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(8, 8, 8, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(8, 8, 8, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(8, 8, 8, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 1), Color(8, 8, 8, 1), Color(1, 1, 1, 1), Color(8, 8, 8, 1), Color(1, 1, 1, 1), Color(8, 8, 8, 1), Color(1, 1, 1, 1), Color(1, 1, 1, 0)] } tracks/1/type = "method" +tracks/1/imported = false +tracks/1/enabled = true tracks/1/path = NodePath(".") tracks/1/interp = 1 tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true tracks/1/keys = { "times": PackedFloat32Array(2.8, 3.4), "transitions": PackedFloat32Array(1, 1), "values": [{ "args": [], -"method": "explode" +"method": &"explode" }, { "args": [], -"method": "done" +"method": &"done" }] } tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true tracks/2/path = NodePath("Explosion1:emitting") tracks/2/interp = 1 tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true tracks/2/keys = { "times": PackedFloat32Array(0, 2.8), "transitions": PackedFloat32Array(1, 1), @@ -58,11 +67,11 @@ tracks/2/keys = { "values": [false, true] } tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true tracks/3/path = NodePath("Explosion2:emitting") tracks/3/interp = 1 tracks/3/loop_wrap = true -tracks/3/imported = false -tracks/3/enabled = true tracks/3/keys = { "times": PackedFloat32Array(0, 2.8), "transitions": PackedFloat32Array(1, 1), @@ -71,52 +80,40 @@ tracks/3/keys = { } [node name="Bomb" type="Area2D"] -script = ExtResource( 1 ) +monitorable = false +script = ExtResource( "1" ) -[node name="Sprite2D" type="Sprite2D" parent="."] +[node name="Sprite" type="Sprite2D" parent="."] position = Vector2(-2.92606, -2.92606) -texture = ExtResource( 2 ) +texture = ExtResource( "2" ) region_enabled = true region_rect = Rect2(144, 0, 48, 48) [node name="Shape1" type="CollisionShape2D" parent="."] -shape = SubResource( 1 ) +shape = SubResource( "1" ) [node name="Shape2" type="CollisionShape2D" parent="."] -shape = SubResource( 2 ) +shape = SubResource( "2" ) -[node name="Explosion1" type="CPUParticles2D" parent="."] +[node name="Explosion1" type="GPUParticles2D" parent="."] emitting = false lifetime = 0.5 one_shot = true explosiveness = 0.95 -texture = ExtResource( 3 ) -emission_shape = 2 -emission_rect_extents = Vector2(80, 1) -gravity = Vector2(0, 0) -initial_velocity = 1.0 -angular_velocity = 187.85 -angular_velocity_random = 1.0 -scale_amount_curve = SubResource( 3 ) +process_material = SubResource( "5" ) +texture = ExtResource( "3" ) -[node name="Explosion2" type="CPUParticles2D" parent="."] +[node name="Explosion2" type="GPUParticles2D" parent="."] rotation = 1.57162 -scale = Vector2(1, 1) emitting = false one_shot = true explosiveness = 0.95 -texture = ExtResource( 3 ) -emission_shape = 2 -emission_rect_extents = Vector2(80, 1) -gravity = Vector2(0, 0) -initial_velocity = 1.0 -angular_velocity = 187.85 -angular_velocity_random = 1.0 -scale_amount_curve = SubResource( 3 ) +process_material = SubResource( "5" ) +texture = ExtResource( "3" ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] autoplay = "anim" -anims/anim = SubResource( 4 ) +anims/anim = SubResource( "6" ) [connection signal="body_entered" from="." to="." method="_on_bomb_body_enter"] [connection signal="body_exited" from="." to="." method="_on_bomb_body_exit"] diff --git a/networking/multiplayer_bomber/bomb_spawner.gd b/networking/multiplayer_bomber/bomb_spawner.gd new file mode 100644 index 00000000..dc757c1d --- /dev/null +++ b/networking/multiplayer_bomber/bomb_spawner.gd @@ -0,0 +1,9 @@ +extends MultiplayerSpawner + +func _spawn_custom(data): + if data.size() != 2 or typeof(data[0]) != TYPE_VECTOR2 or typeof(data[1]) != TYPE_INT: + return null + var bomb = preload("res://bomb.tscn").instantiate() + bomb.position = data[0] + bomb.from_player = data[1] + return bomb diff --git a/networking/multiplayer_bomber/brickfloor.png.import b/networking/multiplayer_bomber/brickfloor.png.import index 66101124..30966a33 100644 --- a/networking/multiplayer_bomber/brickfloor.png.import +++ b/networking/multiplayer_bomber/brickfloor.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture2D" -path="res://.godot/imported/brickfloor.png-bab1cbace80ab627972eea565951db9e.stex" +type="CompressedTexture2D" +uid="uid://bdomqql6y50po" +path="res://.godot/imported/brickfloor.png-bab1cbace80ab627972eea565951db9e.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,23 @@ metadata={ [deps] source_file="res://brickfloor.png" -dest_files=["res://.godot/imported/brickfloor.png-bab1cbace80ab627972eea565951db9e.stex"] +dest_files=["res://.godot/imported/brickfloor.png-bab1cbace80ab627972eea565951db9e.ctex"] [params] compress/mode=0 compress/lossy_quality=0.7 -compress/hdr_mode=0 +compress/hdr_compression=1 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +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/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/networking/multiplayer_bomber/charwalk.png.import b/networking/multiplayer_bomber/charwalk.png.import index 9c624bb0..b99c4630 100644 --- a/networking/multiplayer_bomber/charwalk.png.import +++ b/networking/multiplayer_bomber/charwalk.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture2D" -path="res://.godot/imported/charwalk.png-a9f067962a6454cc2f52a6e82832cbc5.stex" +type="CompressedTexture2D" +uid="uid://bsqovikudjr0q" +path="res://.godot/imported/charwalk.png-a9f067962a6454cc2f52a6e82832cbc5.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,23 @@ metadata={ [deps] source_file="res://charwalk.png" -dest_files=["res://.godot/imported/charwalk.png-a9f067962a6454cc2f52a6e82832cbc5.stex"] +dest_files=["res://.godot/imported/charwalk.png-a9f067962a6454cc2f52a6e82832cbc5.ctex"] [params] compress/mode=0 compress/lossy_quality=0.7 -compress/hdr_mode=0 +compress/hdr_compression=1 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +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/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/networking/multiplayer_bomber/explosion.png.import b/networking/multiplayer_bomber/explosion.png.import index 70c1c4be..e5582efa 100644 --- a/networking/multiplayer_bomber/explosion.png.import +++ b/networking/multiplayer_bomber/explosion.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture2D" -path="res://.godot/imported/explosion.png-730076d88b39dbfd5c22ad71f1135b01.stex" +type="CompressedTexture2D" +uid="uid://drfbkdqmj0gu2" +path="res://.godot/imported/explosion.png-730076d88b39dbfd5c22ad71f1135b01.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,23 @@ metadata={ [deps] source_file="res://explosion.png" -dest_files=["res://.godot/imported/explosion.png-730076d88b39dbfd5c22ad71f1135b01.stex"] +dest_files=["res://.godot/imported/explosion.png-730076d88b39dbfd5c22ad71f1135b01.ctex"] [params] compress/mode=0 compress/lossy_quality=0.7 -compress/hdr_mode=0 +compress/hdr_compression=1 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +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/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/networking/multiplayer_bomber/gamestate.gd b/networking/multiplayer_bomber/gamestate.gd index bd3f3388..88e1dfd3 100644 --- a/networking/multiplayer_bomber/gamestate.gd +++ b/networking/multiplayer_bomber/gamestate.gd @@ -27,14 +27,14 @@ signal game_error(what) # Callback from SceneTree. func _player_connected(id): # Registration of a client beings here, tell the connected player that we are here. - rpc_id(id, "register_player", player_name) + rpc_id(id, StringName("register_player"), player_name) # Callback from SceneTree. func _player_disconnected(id): - if has_node("/root/World3D"): # Game is in progress. - if get_tree().is_network_server(): - emit_signal("game_error", "Player " + players[id] + " disconnected") + if has_node("/root/World"): # Game is in progress. + if multiplayer.is_server(): + game_error.emit("Player " + players[id] + " disconnected") end_game() else: # Game is not in progress. # Unregister this player. @@ -44,101 +44,60 @@ func _player_disconnected(id): # Callback from SceneTree, only for clients (not server). func _connected_ok(): # We just connected to a server - emit_signal("connection_succeeded") + connection_succeeded.emit() # Callback from SceneTree, only for clients (not server). func _server_disconnected(): - emit_signal("game_error", "Server disconnected") + game_error.emit("Server disconnected") end_game() # Callback from SceneTree, only for clients (not server). func _connected_fail(): - get_tree().set_network_peer(null) # Remove peer - emit_signal("connection_failed") + multiplayer.set_network_peer(null) # Remove peer + connection_failed.emit() # Lobby management functions. - -remote func register_player(new_player_name): - var id = get_tree().get_rpc_sender_id() - print(id) +@rpc(any_peer) +func register_player(new_player_name): + var id = multiplayer.get_remote_sender_id() players[id] = new_player_name - emit_signal("player_list_changed") + player_list_changed.emit() func unregister_player(id): players.erase(id) - emit_signal("player_list_changed") + player_list_changed.emit() -remote func pre_start_game(spawn_points): +@rpc(call_local) +func load_world(): # Change scene. var world = load("res://world.tscn").instantiate() get_tree().get_root().add_child(world) - - get_tree().get_root().get_node(^"Lobby").hide() - - var player_scene = load("res://player.tscn") - - for p_id in spawn_points: - var spawn_pos = world.get_node(^"SpawnPoints/" + str(spawn_points[p_id])).position - var player = player_scene.instantiate() - - player.set_name(str(p_id)) # Use unique ID as node name. - player.position=spawn_pos - player.set_network_master(p_id) #set unique id as master. - - if p_id == get_tree().get_network_unique_id(): - # If node for this peer id, set name. - player.set_player_name(player_name) - else: - # Otherwise set name from peer. - player.set_player_name(players[p_id]) - - world.get_node(^"Players").add_child(player) + get_tree().get_root().get_node("Lobby").hide() # Set up score. - world.get_node(^"Score").add_player(get_tree().get_network_unique_id(), player_name) + world.get_node("Score").add_player(multiplayer.get_unique_id(), player_name) for pn in players: - world.get_node(^"Score").add_player(pn, players[pn]) - - if not get_tree().is_network_server(): - # Tell server we are ready to start. - rpc_id(1, "ready_to_start", get_tree().get_network_unique_id()) - elif players.size() == 0: - post_start_game() - - -remote func post_start_game(): + world.get_node("Score").add_player(pn, players[pn]) get_tree().set_pause(false) # Unpause and unleash the game! -remote func ready_to_start(id): - assert(get_tree().is_network_server()) - - if not id in players_ready: - players_ready.append(id) - - if players_ready.size() == players.size(): - for p in players: - rpc_id(p, "post_start_game") - post_start_game() - - func host_game(new_player_name): player_name = new_player_name - peer = NetworkedMultiplayerENet.new() + peer = ENetMultiplayerPeer.new() peer.create_server(DEFAULT_PORT, MAX_PEERS) - get_tree().set_network_peer(peer) + multiplayer.set_multiplayer_peer(peer) func join_game(ip, new_player_name): player_name = new_player_name - peer = NetworkedMultiplayerENet.new() + peer = ENetMultiplayerPeer.new() peer.create_client(ip, DEFAULT_PORT) - get_tree().set_network_peer(peer) + multiplayer.set_multiplayer_peer(peer) func get_player_list(): @@ -150,7 +109,11 @@ func get_player_name(): func begin_game(): - assert(get_tree().is_network_server()) + assert(multiplayer.is_server()) + load_world.rpc() + + var world = get_tree().get_root().get_node("World") + var player_scene = load("res://player.tscn") # Create a dictionary with peer id and respective spawn points, could be improved by randomizing. var spawn_points = {} @@ -159,25 +122,28 @@ func begin_game(): for p in players: spawn_points[p] = spawn_point_idx spawn_point_idx += 1 - # Call to pre-start game with the spawn points. - for p in players: - rpc_id(p, "pre_start_game", spawn_points) - pre_start_game(spawn_points) + for p_id in spawn_points: + var spawn_pos = world.get_node("SpawnPoints/" + str(spawn_points[p_id])).position + var player = player_scene.instantiate() + player.synced_position = spawn_pos + player.name = str(p_id) + player.set_player_name(player_name if p_id == multiplayer.get_unique_id() else players[p_id]) + world.get_node("Players").add_child(player) func end_game(): - if has_node("/root/World3D"): # Game is in progress. + if has_node("/root/World"): # Game is in progress. # End it - get_node(^"/root/World3D").queue_free() + get_node("/root/World").queue_free() - emit_signal("game_ended") + game_ended.emit() players.clear() func _ready(): - get_tree().connect(&"network_peer_connected", self._player_connected) - get_tree().connect("network_peer_disconnected", self,"_player_disconnected") - get_tree().connect(&"connected_to_server", self._connected_ok) - get_tree().connect(&"connection_failed", self._connected_fail) - get_tree().connect(&"server_disconnected", self._server_disconnected) + multiplayer.peer_connected.connect(_player_connected) + multiplayer.peer_disconnected.connect(_player_disconnected) + multiplayer.connected_to_server.connect(_connected_ok) + multiplayer.connection_failed.connect(_connected_fail) + multiplayer.server_disconnected.connect(_server_disconnected) diff --git a/networking/multiplayer_bomber/icon.png.import b/networking/multiplayer_bomber/icon.png.import index 889af9df..2997365d 100644 --- a/networking/multiplayer_bomber/icon.png.import +++ b/networking/multiplayer_bomber/icon.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture2D" -path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +type="CompressedTexture2D" +uid="uid://cbby50724oj4c" +path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,23 @@ metadata={ [deps] source_file="res://icon.png" -dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"] +dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"] [params] compress/mode=0 compress/lossy_quality=0.7 -compress/hdr_mode=0 +compress/hdr_compression=1 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +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/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/networking/multiplayer_bomber/lobby.gd b/networking/multiplayer_bomber/lobby.gd index 6b2f63bd..90ed898f 100644 --- a/networking/multiplayer_bomber/lobby.gd +++ b/networking/multiplayer_bomber/lobby.gd @@ -2,11 +2,11 @@ extends Control func _ready(): # Called every time the node is added to the scene. - gamestate.connect(&"connection_failed", self._on_connection_failed) - gamestate.connect(&"connection_succeeded", self._on_connection_success) - gamestate.connect(&"player_list_changed", self.refresh_lobby) - gamestate.connect(&"game_ended", self._on_game_ended) - gamestate.connect(&"game_error", self._on_game_error) + gamestate.connection_failed.connect(_on_connection_failed) + gamestate.connection_succeeded.connect(_on_connection_success) + gamestate.player_list_changed.connect(refresh_lobby) + gamestate.game_ended.connect(_on_game_ended) + gamestate.game_error.connect(_on_game_error) # Set the player name according to the system username. Fallback to the path. if OS.has_environment("USERNAME"): $Connect/Name.text = OS.get_environment("USERNAME") @@ -68,7 +68,7 @@ func _on_game_ended(): func _on_game_error(errtxt): $ErrorDialog.dialog_text = errtxt - $ErrorDialog.popup_centered_clamped() + $ErrorDialog.popup_centered() $Connect/Host.disabled = false $Connect/Join.disabled = false @@ -81,7 +81,7 @@ func refresh_lobby(): for p in players: $Players/List.add_item(p) - $Players/Start.disabled = not get_tree().is_network_server() + $Players/Start.disabled = not multiplayer.is_server() func _on_start_pressed(): diff --git a/networking/multiplayer_bomber/lobby.tscn b/networking/multiplayer_bomber/lobby.tscn index 37723c5b..629ad37b 100644 --- a/networking/multiplayer_bomber/lobby.tscn +++ b/networking/multiplayer_bomber/lobby.tscn @@ -1,16 +1,13 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=2 format=3 uid="uid://jhdlqsokif5o"] -[ext_resource path="res://lobby.gd" type="Script" id=1] +[ext_resource type="Script" path="res://lobby.gd" id="1"] [node name="Lobby" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 2 size_flags_vertical = 2 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +script = ExtResource( "1" ) [node name="Players" type="Panel" parent="."] visible = false @@ -56,11 +53,10 @@ offset_left = -124.0 offset_top = 375.0 offset_right = 128.0 offset_bottom = 429.0 -custom_constants/line_spacing = 6 +theme_override_constants/line_spacing = 6 text = "If you want non-LAN clients to connect, make sure the port 10567 in UDP is forwarded on your router." -align = 1 [node name="FindPublicIP" type="LinkButton" parent="Players"] offset_left = 168.0 @@ -106,6 +102,7 @@ offset_right = 57.0 offset_bottom = 80.0 size_flags_horizontal = 2 size_flags_vertical = 0 +theme_override_font_sizes/font_size = 16 text = "IP:" [node name="IPAddress" type="LineEdit" parent="Connect"] @@ -142,14 +139,9 @@ offset_right = 257.0 offset_bottom = 139.0 size_flags_horizontal = 2 size_flags_vertical = 0 -custom_colors/font_color = Color(0.820312, 0.291595, 0.291595, 1) -align = 1 +theme_override_colors/font_color = Color(0.820312, 0.291595, 0.291595, 1) [node name="ErrorDialog" type="AcceptDialog" parent="."] -offset_right = 55.0 -offset_bottom = 58.0 -size_flags_horizontal = 2 -size_flags_vertical = 2 [connection signal="pressed" from="Players/Start" to="." method="_on_start_pressed"] [connection signal="pressed" from="Players/FindPublicIP" to="." method="_on_find_public_ip_pressed"] diff --git a/networking/multiplayer_bomber/montserrat.otf.import b/networking/multiplayer_bomber/montserrat.otf.import new file mode 100644 index 00000000..f0eb15d7 --- /dev/null +++ b/networking/multiplayer_bomber/montserrat.otf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontData" +uid="uid://dksjmw4cy83s4" +path="res://.godot/imported/montserrat.otf-0d875bde8933edfaf65407b0d9da84e5.fontdata" + +[deps] + +source_file="res://montserrat.otf" +dest_files=["res://.godot/imported/montserrat.otf-0d875bde8933edfaf65407b0d9da84e5.fontdata"] + +[params] + +antialiased=true +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 +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() diff --git a/networking/multiplayer_bomber/player.gd b/networking/multiplayer_bomber/player.gd index 1fc13d4f..f2a9b235 100644 --- a/networking/multiplayer_bomber/player.gd +++ b/networking/multiplayer_bomber/player.gd @@ -1,66 +1,58 @@ extends CharacterBody2D const MOTION_SPEED = 90.0 +const BOMB_RATE = 0.5 -puppet var puppet_pos = Vector2() -puppet var puppet_motion = Vector2() +@export +var synced_position := Vector2() -@export var stunned = false - -# Use sync because it will be called everywhere -remotesync func setup_bomb(bomb_name, pos, by_who): - var bomb = preload("res://bomb.tscn").instantiate() - bomb.set_name(bomb_name) # Ensure unique name for the bomb - bomb.position = pos - bomb.from_player = by_who - # No need to set network master to bomb, will be owned by server by default - get_node(^"../..").add_child(bomb) +@export +var stunned = false +@onready +var inputs = $Inputs +var last_bomb_time = BOMB_RATE var current_anim = "" -var prev_bombing = false -var bomb_index = 0 + +func _ready(): + stunned = false + position = synced_position + if str(name).is_valid_int(): + get_node("Inputs/InputsSync").set_multiplayer_authority(str(name).to_int()) -func _physics_process(_delta): - var motion = Vector2() +func _physics_process(delta): + if multiplayer.multiplayer_peer == null or str(multiplayer.get_unique_id()) == str(name): + # The client which this player represent will update the controls state, and notify it to everyone. + inputs.update() - if is_network_master(): - if Input.is_action_pressed(&"move_left"): - motion += Vector2(-1, 0) - if Input.is_action_pressed(&"move_right"): - motion += Vector2(1, 0) - if Input.is_action_pressed(&"move_up"): - motion += Vector2(0, -1) - if Input.is_action_pressed(&"move_down"): - motion += Vector2(0, 1) - - var bombing = Input.is_action_pressed(&"set_bomb") - - if stunned: - bombing = false - motion = Vector2() - - if bombing and not prev_bombing: - var bomb_name = String(get_name()) + str(bomb_index) - var bomb_pos = position - rpc("setup_bomb", bomb_name, bomb_pos, get_tree().get_network_unique_id()) - - prev_bombing = bombing - - rset("puppet_motion", motion) - rset("puppet_pos", position) + if multiplayer.multiplayer_peer == null or is_multiplayer_authority(): + # The server updates the position that will be notified to the clients. + synced_position = position + # And increase the bomb cooldown spawning one if the client wants to. + last_bomb_time += delta + if not stunned and is_multiplayer_authority() and inputs.bombing and last_bomb_time >= BOMB_RATE: + last_bomb_time = 0.0 + get_node("../../BombSpawner").spawn([position, str(name).to_int()]) else: - position = puppet_pos - motion = puppet_motion + # The client simply updates the position to the last known one. + position = synced_position + if not stunned: + # Everybody runs physics. I.e. clients tries to predict where they will be during the next frame. + velocity = inputs.motion * MOTION_SPEED + move_and_slide() + + # Also update the animation based on the last known player input state var new_anim = "standing" - if motion.y < 0: + + if inputs.motion.y < 0: new_anim = "walk_up" - elif motion.y > 0: + elif inputs.motion.y > 0: new_anim = "walk_down" - elif motion.x < 0: + elif inputs.motion.x < 0: new_anim = "walk_left" - elif motion.x > 0: + elif inputs.motion.x > 0: new_anim = "walk_right" if stunned: @@ -68,30 +60,16 @@ func _physics_process(_delta): if new_anim != current_anim: current_anim = new_anim - get_node(^"anim").play(current_anim) - - # TODO: This information should be set to the CharacterBody properties instead of arguments. - # FIXME: Use move_and_slide - move_and_slide(motion * MOTION_SPEED) - if not is_network_master(): - puppet_pos = position # To avoid jitter + get_node("anim").play(current_anim) -puppet func stun(): - stunned = true +func set_player_name(value): + get_node("label").text = value -master func exploded(_by_who): +@rpc(call_local) +func exploded(_by_who): if stunned: return - rpc("stun") # Stun puppets - stun() # Stun master - could use sync to do both at once - - -func set_player_name(new_name): - get_node(^"label").set_text(new_name) - - -func _ready(): - stunned = false - puppet_pos = position + stunned = true + get_node("anim").play("stunned") diff --git a/networking/multiplayer_bomber/player.tscn b/networking/multiplayer_bomber/player.tscn index c0ccf62f..7ac54634 100644 --- a/networking/multiplayer_bomber/player.tscn +++ b/networking/multiplayer_bomber/player.tscn @@ -1,22 +1,23 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=15 format=3 uid="uid://dviwgv2ty8v6u"] -[ext_resource path="res://player.gd" type="Script" id=1] -[ext_resource path="res://charwalk.png" type="Texture2D" id=2] -[ext_resource path="res://montserrat.otf" type="FontData" id=3] +[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] +[sub_resource type="CircleShape2D" id="1"] radius = 20.0 -[sub_resource type="Animation" id=2] +[sub_resource type="Animation" id="2"] resource_name = "standing" length = 0.8 -loop = true +loop_mode = 1 tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.2, 0.4, 0.6), "transitions": PackedFloat32Array(1, 1, 1, 1), @@ -24,15 +25,15 @@ tracks/0/keys = { "values": [0, 4, 8, 12] } -[sub_resource type="Animation" id=3] +[sub_resource type="Animation" id="3"] resource_name = "stunned" length = 1.2 tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), @@ -40,39 +41,39 @@ tracks/0/keys = { "values": [0] } tracks/1/type = "value" -tracks/1/path = NodePath("sprite:rotation_degrees") -tracks/1/interp = 1 -tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true +tracks/1/path = NodePath(".:stunned") +tracks/1/interp = 1 +tracks/1/loop_wrap = true tracks/1/keys = { -"times": PackedFloat32Array(0, 1, 1.1), -"transitions": PackedFloat32Array(1, 0, 1), -"update": 0, -"values": [0.0, 720.0, 0.0] -} -tracks/2/type = "value" -tracks/2/path = NodePath(".:stunned") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = { "times": PackedFloat32Array(1), "transitions": PackedFloat32Array(1), "update": 1, "values": [false] } +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("sprite:rotation") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 1), +"transitions": PackedFloat32Array(1, 1), +"update": 0, +"values": [-6.28319, 0.0] +} -[sub_resource type="Animation" id=4] +[sub_resource type="Animation" id="4"] length = 0.8 -loop = true +loop_mode = 1 tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.2, 0.4, 0.6), "transitions": PackedFloat32Array(1, 1, 1, 1), @@ -80,16 +81,16 @@ tracks/0/keys = { "values": [0, 4, 8, 12] } -[sub_resource type="Animation" id=5] +[sub_resource type="Animation" id="5"] length = 0.8 -loop = true +loop_mode = 1 step = 0.2 tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.2, 0.4, 0.6), "transitions": PackedFloat32Array(1, 1, 1, 1), @@ -97,16 +98,16 @@ tracks/0/keys = { "values": [1, 5, 9, 13] } -[sub_resource type="Animation" id=6] +[sub_resource type="Animation" id="6"] length = 0.8 -loop = true +loop_mode = 1 step = 0.2 tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.2, 0.4, 0.6), "transitions": PackedFloat32Array(1, 1, 1, 1), @@ -114,16 +115,16 @@ tracks/0/keys = { "values": [3, 7, 11, 15] } -[sub_resource type="Animation" id=7] +[sub_resource type="Animation" id="7"] length = 0.8 -loop = true +loop_mode = 1 step = 0.2 tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true tracks/0/keys = { "times": PackedFloat32Array(0, 0.2, 0.4, 0.6), "transitions": PackedFloat32Array(1, 1, 1, 1), @@ -131,30 +132,47 @@ tracks/0/keys = { "values": [2, 6, 10, 14] } -[sub_resource type="Font" id=8] -size = 14 -font_data = ExtResource( 3 ) +[sub_resource type="Font" id="8"] +data/0 = ExtResource( "3" ) + +[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_xm6wv"] +properties/0/path = NodePath(".:synced_position") +properties/0/spawn = true +properties/0/sync = true +properties/1/path = NodePath("label:text") +properties/1/spawn = true +properties/1/sync = false + +[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_kkxsa"] +properties/0/path = NodePath(".:motion") +properties/0/spawn = true +properties/0/sync = true +properties/1/path = NodePath(".:bombing") +properties/1/spawn = true +properties/1/sync = true [node name="player" type="CharacterBody2D"] -script = ExtResource( 1 ) +motion_mode = 1 +script = ExtResource( "1" ) [node name="sprite" type="Sprite2D" parent="."] position = Vector2(0.0750351, 6.23615) -texture = ExtResource( 2 ) +rotation = -6.28319 +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 ) +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" ) [node name="label" type="Label" parent="."] offset_left = -82.0 @@ -163,6 +181,18 @@ offset_right = 85.0 offset_bottom = -14.0 size_flags_horizontal = 2 size_flags_vertical = 0 -custom_fonts/font = SubResource( 8 ) +theme_override_fonts/font = SubResource( "8" ) +theme_override_font_sizes/font_size = 16 text = "Player 1" -align = 1 +horizontal_alignment = 1 + +[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."] +root_path = NodePath("..") +resource = SubResource( "SceneReplicationConfig_xm6wv" ) + +[node name="Inputs" type="Node" parent="."] +script = ExtResource( "4_k1vfr" ) + +[node name="InputsSync" type="MultiplayerSynchronizer" parent="Inputs"] +root_path = NodePath("..") +resource = SubResource( "SceneReplicationConfig_kkxsa" ) diff --git a/networking/multiplayer_bomber/player_controls.gd b/networking/multiplayer_bomber/player_controls.gd new file mode 100644 index 00000000..85bf4d1e --- /dev/null +++ b/networking/multiplayer_bomber/player_controls.gd @@ -0,0 +1,24 @@ +extends Node + +@export +var motion = Vector2() : + set(value): + # This will be sent by players, make sure values are within limits. + motion = clamp(value, Vector2(-1, -1), Vector2(1, 1)) + +@export +var bombing = false + +func update(): + var m = Vector2() + if Input.is_action_pressed("move_left"): + m += Vector2(-1, 0) + if Input.is_action_pressed("move_right"): + m += Vector2(1, 0) + if Input.is_action_pressed("move_up"): + m += Vector2(0, -1) + if Input.is_action_pressed("move_down"): + m += Vector2(0, 1) + + motion = m + bombing = Input.is_action_pressed("set_bomb") diff --git a/networking/multiplayer_bomber/project.godot b/networking/multiplayer_bomber/project.godot index e9006e4d..d849b956 100644 --- a/networking/multiplayer_bomber/project.godot +++ b/networking/multiplayer_bomber/project.godot @@ -6,7 +6,7 @@ ; [section] ; section goes between [] ; param=value ; assign values to parameters -config_version=4 +config_version=5 [application] @@ -16,6 +16,7 @@ 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") [autoload] @@ -27,10 +28,13 @@ gdscript/warnings/return_value_discarded=false [display] -window/dpi/allow_hidpi=true -window/vsync/use_vsync=false window/stretch/mode="2d" window/stretch/aspect="expand" +window/vsync/use_vsync=false + +[editor_plugins] + +enabled=PackedStringArray() [gdnative] @@ -45,32 +49,32 @@ gen_mipmaps=false move_down={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777234,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777234,"physical_keycode":0,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) ] } move_left={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777231,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777231,"physical_keycode":0,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) ] } move_right={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777233,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777233,"physical_keycode":0,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) ] } move_up={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777232,"physical_keycode":0,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"store_command":true,"alt_pressed":false,"shift_pressed":false,"meta_pressed":false,"command_pressed":false,"pressed":false,"keycode":16777232,"physical_keycode":0,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) ] @@ -87,3 +91,15 @@ set_bomb={ [rendering] quality/driver/driver_name="GLES2" + +[replication] + +config={ +"uid://dviwgv2ty8v6u": { +"replicated": true, +"spawn_properties": [], +"sync_interval": 16, +"sync_properties": [&":stunned", &"sprite:hframes", &"sprite:vframes", &":server_position", &"label:text"], +"synced": false +} +} diff --git a/networking/multiplayer_bomber/rock.gd b/networking/multiplayer_bomber/rock.gd index af2c98ad..2875ec09 100644 --- a/networking/multiplayer_bomber/rock.gd +++ b/networking/multiplayer_bomber/rock.gd @@ -1,12 +1,6 @@ extends CharacterBody2D -# Sent to everyone else -puppet func do_explosion(): +@rpc(call_local) +func exploded(by_who): + $"../../Score".increase_score(by_who) $"AnimationPlayer".play("explode") - - -# Received by owner of the rock -master func exploded(by_who): - rpc("do_explosion") # Re-sent to puppet rocks - $"../../Score".rpc("increase_score", by_who) - do_explosion() diff --git a/networking/multiplayer_bomber/rock.tscn b/networking/multiplayer_bomber/rock.tscn index 17ca0a9b..5433d534 100644 --- a/networking/multiplayer_bomber/rock.tscn +++ b/networking/multiplayer_bomber/rock.tscn @@ -1,33 +1,33 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=5 format=3 uid="uid://bao3yernlglws"] -[ext_resource path="res://rock.gd" type="Script" id=1] -[ext_resource path="res://brickfloor.png" type="Texture2D" id=2] +[ext_resource type="Script" path="res://rock.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://bdomqql6y50po" path="res://brickfloor.png" id="2"] -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2(24, 24) +[sub_resource type="RectangleShape2D" id="1"] +size = Vector2(48, 48) -[sub_resource type="Animation" id=2] +[sub_resource type="Animation" id="2"] resource_name = "explode" tracks/0/type = "method" +tracks/0/imported = false +tracks/0/enabled = true tracks/0/path = NodePath(".") tracks/0/interp = 1 tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true tracks/0/keys = { "times": PackedFloat32Array(1), "transitions": PackedFloat32Array(1), "values": [{ "args": [], -"method": "queue_free" +"method": &"queue_free" }] } tracks/1/type = "value" -tracks/1/path = NodePath("Sprite2D:visible") -tracks/1/interp = 1 -tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true +tracks/1/path = NodePath("Sprite:visible") +tracks/1/interp = 1 +tracks/1/loop_wrap = true tracks/1/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), @@ -36,15 +36,16 @@ tracks/1/keys = { } [node name="Rock" type="CharacterBody2D"] -script = ExtResource( 1 ) +motion_mode = 1 +script = ExtResource( "1" ) -[node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource( 2 ) +[node name="Sprite" type="Sprite2D" parent="."] +texture = ExtResource( "2" ) region_enabled = true region_rect = Rect2(96, 0, 48, 48) -[node name="Shape3D" type="CollisionShape2D" parent="."] -shape = SubResource( 1 ) +[node name="Shape" type="CollisionShape2D" parent="."] +shape = SubResource( "1" ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -anims/explode = SubResource( 2 ) +anims/explode = SubResource( "2" ) diff --git a/networking/multiplayer_bomber/rock_bit.png.import b/networking/multiplayer_bomber/rock_bit.png.import index f2d7ee05..b6177d8f 100644 --- a/networking/multiplayer_bomber/rock_bit.png.import +++ b/networking/multiplayer_bomber/rock_bit.png.import @@ -1,8 +1,9 @@ [remap] importer="texture" -type="StreamTexture2D" -path="res://.godot/imported/rock_bit.png-cd30ec3dce7edf848ee632b29d4d0c95.stex" +type="CompressedTexture2D" +uid="uid://bh4gbjcayios1" +path="res://.godot/imported/rock_bit.png-cd30ec3dce7edf848ee632b29d4d0c95.ctex" metadata={ "vram_texture": false } @@ -10,26 +11,23 @@ metadata={ [deps] source_file="res://rock_bit.png" -dest_files=["res://.godot/imported/rock_bit.png-cd30ec3dce7edf848ee632b29d4d0c95.stex"] +dest_files=["res://.godot/imported/rock_bit.png-cd30ec3dce7edf848ee632b29d4d0c95.ctex"] [params] compress/mode=0 compress/lossy_quality=0.7 -compress/hdr_mode=0 +compress/hdr_compression=1 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 +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/HDR_as_SRGB=false -process/invert_color=false process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 +process/hdr_as_srgb=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/networking/multiplayer_bomber/score.gd b/networking/multiplayer_bomber/score.gd index 62f419d3..f19416d2 100644 --- a/networking/multiplayer_bomber/score.gd +++ b/networking/multiplayer_bomber/score.gd @@ -16,7 +16,7 @@ func _process(_delta): $"../Winner".show() -remotesync func increase_score(for_who): +func increase_score(for_who): assert(for_who in player_labels) var pl = player_labels[for_who] pl.score += 1 @@ -25,13 +25,13 @@ remotesync func increase_score(for_who): func add_player(id, new_player_name): var l = Label.new() - l.set_align(Label.ALIGN_CENTER) + 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.set_size(18) - font.set_font_data(preload("res://montserrat.otf")) - l.add_font_override("font", font) + font.add_data(preload("res://montserrat.otf")) + l.set("custom_fonts/font", font) + l.set("custom_font_size/font_size", 18) add_child(l) player_labels[id] = { name = new_player_name, label = l, score = 0 } diff --git a/networking/multiplayer_bomber/tile_scene.tscn b/networking/multiplayer_bomber/tile_scene.tscn index 35f5963e..18f75c55 100644 --- a/networking/multiplayer_bomber/tile_scene.tscn +++ b/networking/multiplayer_bomber/tile_scene.tscn @@ -1,23 +1,23 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=3 format=3 uid="uid://c5m3rogpaglk1"] -[ext_resource path="res://brickfloor.png" type="Texture2D" id=1] +[ext_resource type="Texture2D" uid="uid://bdomqql6y50po" path="res://brickfloor.png" id="1"] -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2(24, 24) +[sub_resource type="RectangleShape2D" id="1"] +size = Vector2(48, 48) [node name="TileScene" type="Node2D"] [node name="Wall" type="Sprite2D" parent="."] position = Vector2(24, 24) -texture = ExtResource( 1 ) +texture = ExtResource( "1" ) region_rect = Rect2(0, 0, 48, 48) [node name="StaticBody2D" type="StaticBody2D" parent="Wall"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Wall/StaticBody2D"] -shape = SubResource( 1 ) +shape = SubResource( "1" ) [node name="Floor" type="Sprite2D" parent="."] position = Vector2(72, 24) -texture = ExtResource( 1 ) +texture = ExtResource( "1" ) region_rect = Rect2(48, 0, 48, 48) diff --git a/networking/multiplayer_bomber/tileset.tres b/networking/multiplayer_bomber/tileset.tres index d1897076..d692f1fa 100644 --- a/networking/multiplayer_bomber/tileset.tres +++ b/networking/multiplayer_bomber/tileset.tres @@ -1,43 +1,19 @@ -[gd_resource type="TileSet" load_steps=3 format=2] +[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://do2l6lpuotti8"] -[ext_resource path="res://brickfloor.png" type="Texture2D" id=1] +[ext_resource type="Texture2D" uid="uid://bdomqql6y50po" path="res://brickfloor.png" id="1"] -[sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 24, 24 ) +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_qhkfp"] +texture = ExtResource( "1" ) +texture_region_size = Vector2i(48, 48) +0:0/0 = 0 +0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:0/0/physics_layer_0/angular_velocity = 0.0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-24, -24, 24, -24, 24, 24, -24, 24) +1:0/0 = 0 +1:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +1:0/0/physics_layer_0/angular_velocity = 0.0 [resource] -0/name = "wall" -0/texture = ExtResource( 1 ) -0/tex_offset = Vector2( 0, 0 ) -0/modulate = Color( 1, 1, 1, 1 ) -0/region = Rect2( 0, 0, 48, 48 ) -0/tile_mode = 0 -0/occluder_offset = Vector2( 24, 24 ) -0/navigation_offset = Vector2( 24, 24 ) -0/shape_offset = Vector2( 24, 24 ) -0/shape_transform = Transform2D( 1, 0, 0, 1, 24, 24 ) -0/shape = SubResource( 1 ) -0/shape_one_way = false -0/shape_one_way_margin = 1.0 -0/shapes = [ { -"autotile_coord": Vector2( 0, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 1 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 24, 24 ) -} ] -0/z_index = 0 -1/name = "floor" -1/texture = ExtResource( 1 ) -1/tex_offset = Vector2( 0, 0 ) -1/modulate = Color( 1, 1, 1, 1 ) -1/region = Rect2( 48, 0, 48, 48 ) -1/tile_mode = 0 -1/occluder_offset = Vector2( 24, 24 ) -1/navigation_offset = Vector2( 24, 24 ) -1/shape_offset = Vector2( 0, 0 ) -1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -1/shape_one_way = false -1/shape_one_way_margin = 0.0 -1/shapes = [ ] -1/z_index = 0 +tile_size = Vector2i(48, 48) +physics_layer_0/collision_layer = 1 +sources/0 = SubResource( "TileSetAtlasSource_qhkfp" ) diff --git a/networking/multiplayer_bomber/world.tscn b/networking/multiplayer_bomber/world.tscn index 94dd007c..98f4b554 100644 --- a/networking/multiplayer_bomber/world.tscn +++ b/networking/multiplayer_bomber/world.tscn @@ -1,24 +1,22 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=8 format=3 uid="uid://by3f5o7dyoqx4"] -[ext_resource path="res://tileset.tres" type="TileSet" id=1] -[ext_resource path="res://rock.tscn" type="PackedScene" id=2] -[ext_resource path="res://score.gd" type="Script" id=3] -[ext_resource path="res://montserrat.otf" type="FontData" id=4] +[ext_resource type="TileSet" uid="uid://do2l6lpuotti8" path="res://tileset.tres" id="1"] +[ext_resource type="PackedScene" uid="uid://bao3yernlglws" path="res://rock.tscn" id="2"] +[ext_resource type="Script" path="res://score.gd" id="3"] +[ext_resource type="FontData" uid="uid://dksjmw4cy83s4" path="res://montserrat.otf" id="4"] +[ext_resource type="PackedScene" uid="uid://dviwgv2ty8v6u" path="res://player.tscn" id="5_yef4r"] +[ext_resource type="Script" path="res://bomb_spawner.gd" id="6_ac5ja"] -[sub_resource type="Font" id=1] -size = 44 -font_data = ExtResource( 4 ) +[sub_resource type="Font" id="1"] +data/0 = ExtResource( "4" ) -[node name="World3D" type="Node2D"] +[node name="World" type="Node2D"] [node name="TileMap" type="TileMap" parent="."] -tile_set = ExtResource( 1 ) -cell_size = Vector2(48, 48) -format = 1 -tile_data = PackedInt32Array(-524297, 0, 0, -524296, 0, 0, -524295, 0, 0, -524294, 0, 0, -524293, 0, 0, -524292, 0, 0, -524291, 0, 0, -524290, 0, 0, -524289, 0, 0, -589824, 0, 0, -589823, 0, 0, -589822, 0, 0, -589821, 0, 0, -589820, 0, 0, -589819, 0, 0, -589818, 0, 0, -589817, 0, 0, -589816, 0, 0, -589815, 0, 0, -589814, 0, 0, -589813, 0, 0, -589812, 0, 0, -589811, 0, 0, -589810, 0, 0, -589809, 0, 0, -589808, 0, 0, -589807, 0, 0, -589806, 0, 0, -589805, 0, 0, -589804, 0, 0, -589803, 0, 0, -589802, 0, 0, -589801, 0, 0, -589800, 0, 0, -589799, 0, 0, -589798, 0, 0, -589797, 0, 0, -589796, 0, 0, -589795, 0, 0, -589794, 0, 0, -458761, 0, 0, -458760, 0, 0, -458759, 0, 0, -458758, 0, 0, -458757, 0, 0, -458756, 0, 0, -458755, 0, 0, -458754, 0, 0, -458753, 0, 0, -524288, 0, 0, -524287, 0, 0, -524286, 0, 0, -524285, 0, 0, -524284, 0, 0, -524283, 0, 0, -524282, 0, 0, -524281, 0, 0, -524280, 0, 0, -524279, 0, 0, -524278, 0, 0, -524277, 0, 0, -524276, 0, 0, -524275, 0, 0, -524274, 0, 0, -524273, 0, 0, -524272, 0, 0, -524271, 0, 0, -524270, 0, 0, -524269, 0, 0, -524268, 0, 0, -524267, 0, 0, -524266, 0, 0, -524265, 0, 0, -524264, 0, 0, -524263, 0, 0, -524262, 0, 0, -524261, 0, 0, -524260, 0, 0, -524259, 0, 0, -524258, 0, 0, -393225, 0, 0, -393224, 0, 0, -393223, 0, 0, -393222, 0, 0, -393221, 0, 0, -393220, 0, 0, -393219, 0, 0, -393218, 0, 0, -393217, 0, 0, -458752, 0, 0, -458751, 0, 0, -458750, 0, 0, -458749, 0, 0, -458748, 0, 0, -458747, 0, 0, -458746, 0, 0, -458745, 0, 0, -458744, 0, 0, -458743, 0, 0, -458742, 0, 0, -458741, 0, 0, -458740, 0, 0, -458739, 0, 0, -458738, 0, 0, -458737, 0, 0, -458736, 0, 0, -458735, 0, 0, -458734, 0, 0, -458733, 0, 0, -458732, 0, 0, -458731, 0, 0, -458730, 0, 0, -458729, 0, 0, -458728, 0, 0, -458727, 0, 0, -458726, 0, 0, -458725, 0, 0, -458724, 0, 0, -458723, 0, 0, -458722, 0, 0, -327689, 0, 0, -327688, 0, 0, -327687, 0, 0, -327686, 0, 0, -327685, 0, 0, -327684, 0, 0, -327683, 0, 0, -327682, 0, 0, -327681, 0, 0, -393216, 0, 0, -393215, 0, 0, -393214, 0, 0, -393213, 0, 0, -393212, 0, 0, -393211, 0, 0, -393210, 0, 0, -393209, 0, 0, -393208, 0, 0, -393207, 0, 0, -393206, 0, 0, -393205, 0, 0, -393204, 0, 0, -393203, 0, 0, -393202, 0, 0, -393201, 0, 0, -393200, 0, 0, -393199, 0, 0, -393198, 0, 0, -393197, 0, 0, -393196, 0, 0, -393195, 0, 0, -393194, 0, 0, -393193, 0, 0, -393192, 0, 0, -393191, 0, 0, -393190, 0, 0, -393189, 0, 0, -393188, 0, 0, -393187, 0, 0, -393186, 0, 0, -262153, 0, 0, -262152, 0, 0, -262151, 0, 0, -262150, 0, 0, -262149, 0, 0, -262148, 0, 0, -262147, 0, 0, -262146, 0, 0, -262145, 0, 0, -327680, 0, 0, -327679, 0, 0, -327678, 0, 0, -327677, 0, 0, -327676, 0, 0, -327675, 0, 0, -327674, 0, 0, -327673, 0, 0, -327672, 0, 0, -327671, 0, 0, -327670, 0, 0, -327669, 0, 0, -327668, 0, 0, -327667, 0, 0, -327666, 0, 0, -327665, 0, 0, -327664, 0, 0, -327663, 0, 0, -327662, 0, 0, -327661, 0, 0, -327660, 0, 0, -327659, 0, 0, -327658, 0, 0, -327657, 0, 0, -327656, 0, 0, -327655, 0, 0, -327654, 0, 0, -327653, 0, 0, -327652, 0, 0, -327651, 0, 0, -327650, 0, 0, -196617, 0, 0, -196616, 0, 0, -196615, 0, 0, -196614, 0, 0, -196613, 0, 0, -196612, 0, 0, -196611, 0, 0, -196610, 0, 0, -196609, 0, 0, -262144, 0, 0, -262143, 0, 0, -262142, 0, 0, -262141, 0, 0, -262140, 0, 0, -262139, 0, 0, -262138, 0, 0, -262137, 0, 0, -262136, 0, 0, -262135, 0, 0, -262134, 0, 0, -262133, 0, 0, -262132, 0, 0, -262131, 0, 0, -262130, 0, 0, -262129, 0, 0, -262128, 0, 0, -262127, 0, 0, -262126, 0, 0, -262125, 0, 0, -262124, 0, 0, -262123, 0, 0, -262122, 0, 0, -262121, 0, 0, -262120, 0, 0, -262119, 0, 0, -262118, 0, 0, -262117, 0, 0, -262116, 0, 0, -262115, 0, 0, -262114, 0, 0, -131081, 0, 0, -131080, 0, 0, -131079, 0, 0, -131078, 0, 0, -131077, 0, 0, -131076, 0, 0, -131075, 0, 0, -131074, 0, 0, -131073, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -196601, 0, 0, -196600, 0, 0, -196599, 0, 0, -196598, 0, 0, -196597, 0, 0, -196596, 0, 0, -196595, 0, 0, -196594, 0, 0, -196593, 0, 0, -196592, 0, 0, -196591, 0, 0, -196590, 0, 0, -196589, 0, 0, -196588, 0, 0, -196587, 0, 0, -196586, 0, 0, -196585, 0, 0, -196584, 0, 0, -196583, 0, 0, -196582, 0, 0, -196581, 0, 0, -196580, 0, 0, -196579, 0, 0, -196578, 0, 0, -65545, 0, 0, -65544, 0, 0, -65543, 0, 0, -65542, 0, 0, -65541, 0, 0, -65540, 0, 0, -65539, 0, 0, -65538, 0, 0, -65537, 0, 0, -131072, 0, 0, -131071, 0, 0, -131070, 0, 0, -131069, 0, 0, -131068, 0, 0, -131067, 0, 0, -131066, 0, 0, -131065, 0, 0, -131064, 0, 0, -131063, 0, 0, -131062, 0, 0, -131061, 0, 0, -131060, 0, 0, -131059, 0, 0, -131058, 0, 0, -131057, 0, 0, -131056, 0, 0, -131055, 0, 0, -131054, 0, 0, -131053, 0, 0, -131052, 0, 0, -131051, 0, 0, -131050, 0, 0, -131049, 0, 0, -131048, 0, 0, -131047, 0, 0, -131046, 0, 0, -131045, 0, 0, -131044, 0, 0, -131043, 0, 0, -131042, 0, 0, -9, 0, 0, -8, 0, 0, -7, 0, 0, -6, 0, 0, -5, 0, 0, -4, 0, 0, -3, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65533, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, 0, -65528, 0, 0, -65527, 0, 0, -65526, 0, 0, -65525, 0, 0, -65524, 0, 0, -65523, 0, 0, -65522, 0, 0, -65521, 0, 0, -65520, 0, 0, -65519, 0, 0, -65518, 0, 0, -65517, 0, 0, -65516, 0, 0, -65515, 0, 0, -65514, 0, 0, -65513, 0, 0, -65512, 0, 0, -65511, 0, 0, -65510, 0, 0, -65509, 0, 0, -65508, 0, 0, -65507, 0, 0, -65506, 0, 0, 65527, 0, 0, 65528, 0, 0, 65529, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, 0, 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 21, 0, 0, 22, 0, 0, 23, 0, 0, 24, 0, 0, 25, 0, 0, 26, 0, 0, 27, 0, 0, 28, 0, 0, 29, 0, 0, 30, 0, 0, 131063, 0, 0, 131064, 0, 0, 131065, 0, 0, 131066, 0, 0, 131067, 0, 0, 131068, 0, 0, 131069, 0, 0, 131070, 0, 0, 131071, 0, 0, 65536, 0, 0, 65537, 1, 0, 65538, 1, 0, 65539, 1, 0, 65540, 1, 0, 65541, 1, 0, 65542, 1, 0, 65543, 1, 0, 65544, 1, 0, 65545, 1, 0, 65546, 1, 0, 65547, 1, 0, 65548, 1, 0, 65549, 1, 0, 65550, 1, 0, 65551, 1, 0, 65552, 1, 0, 65553, 1, 0, 65554, 1, 0, 65555, 1, 0, 65556, 0, 0, 65557, 0, 0, 65558, 0, 0, 65559, 0, 0, 65560, 0, 0, 65561, 0, 0, 65562, 0, 0, 65563, 0, 0, 65564, 0, 0, 65565, 0, 0, 65566, 0, 0, 196599, 0, 0, 196600, 0, 0, 196601, 0, 0, 196602, 0, 0, 196603, 0, 0, 196604, 0, 0, 196605, 0, 0, 196606, 0, 0, 196607, 0, 0, 131072, 0, 0, 131073, 1, 0, 131074, 0, 0, 131075, 1, 0, 131076, 0, 0, 131077, 1, 0, 131078, 0, 0, 131079, 1, 0, 131080, 0, 0, 131081, 1, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 1, 0, 131088, 0, 0, 131089, 1, 0, 131090, 0, 0, 131091, 1, 0, 131092, 0, 0, 131093, 0, 0, 131094, 0, 0, 131095, 0, 0, 131096, 0, 0, 131097, 0, 0, 131098, 0, 0, 131099, 0, 0, 131100, 0, 0, 131101, 0, 0, 131102, 0, 0, 262135, 0, 0, 262136, 0, 0, 262137, 0, 0, 262138, 0, 0, 262139, 0, 0, 262140, 0, 0, 262141, 0, 0, 262142, 0, 0, 262143, 0, 0, 196608, 0, 0, 196609, 1, 0, 196610, 1, 0, 196611, 1, 0, 196612, 0, 0, 196613, 1, 0, 196614, 1, 0, 196615, 1, 0, 196616, 1, 0, 196617, 1, 0, 196618, 0, 0, 196619, 1, 0, 196620, 1, 0, 196621, 1, 0, 196622, 1, 0, 196623, 1, 0, 196624, 1, 0, 196625, 1, 0, 196626, 1, 0, 196627, 1, 0, 196628, 0, 0, 196629, 0, 0, 196630, 0, 0, 196631, 0, 0, 196632, 0, 0, 196633, 0, 0, 196634, 0, 0, 196635, 0, 0, 196636, 0, 0, 196637, 0, 0, 196638, 0, 0, 327671, 0, 0, 327672, 0, 0, 327673, 0, 0, 327674, 0, 0, 327675, 0, 0, 327676, 0, 0, 327677, 0, 0, 327678, 0, 0, 327679, 0, 0, 262144, 0, 0, 262145, 1, 0, 262146, 0, 0, 262147, 1, 0, 262148, 0, 0, 262149, 1, 0, 262150, 0, 0, 262151, 1, 0, 262152, 0, 0, 262153, 1, 0, 262154, 0, 0, 262155, 1, 0, 262156, 0, 0, 262157, 1, 0, 262158, 0, 0, 262159, 1, 0, 262160, 0, 0, 262161, 1, 0, 262162, 0, 0, 262163, 1, 0, 262164, 0, 0, 262165, 0, 0, 262166, 0, 0, 262167, 0, 0, 262168, 0, 0, 262169, 0, 0, 262170, 0, 0, 262171, 0, 0, 262172, 0, 0, 262173, 0, 0, 262174, 0, 0, 393207, 0, 0, 393208, 0, 0, 393209, 0, 0, 393210, 0, 0, 393211, 0, 0, 393212, 0, 0, 393213, 0, 0, 393214, 0, 0, 393215, 0, 0, 327680, 0, 0, 327681, 1, 0, 327682, 1, 0, 327683, 1, 0, 327684, 1, 0, 327685, 1, 0, 327686, 0, 0, 327687, 1, 0, 327688, 1, 0, 327689, 1, 0, 327690, 1, 0, 327691, 1, 0, 327692, 1, 0, 327693, 1, 0, 327694, 1, 0, 327695, 1, 0, 327696, 1, 0, 327697, 1, 0, 327698, 0, 0, 327699, 1, 0, 327700, 0, 0, 327701, 0, 0, 327702, 0, 0, 327703, 0, 0, 327704, 0, 0, 327705, 0, 0, 327706, 0, 0, 327707, 0, 0, 327708, 0, 0, 327709, 0, 0, 327710, 0, 0, 458743, 0, 0, 458744, 0, 0, 458745, 0, 0, 458746, 0, 0, 458747, 0, 0, 458748, 0, 0, 458749, 0, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 0, 393217, 1, 0, 393218, 0, 0, 393219, 1, 0, 393220, 0, 0, 393221, 1, 0, 393222, 0, 0, 393223, 1, 0, 393224, 0, 0, 393225, 1, 0, 393226, 0, 0, 393227, 1, 0, 393228, 0, 0, 393229, 0, 0, 393230, 0, 0, 393231, 0, 0, 393232, 0, 0, 393233, 1, 0, 393234, 0, 0, 393235, 1, 0, 393236, 0, 0, 393237, 0, 0, 393238, 0, 0, 393239, 0, 0, 393240, 0, 0, 393241, 0, 0, 393242, 0, 0, 393243, 0, 0, 393244, 0, 0, 393245, 0, 0, 393246, 0, 0, 524279, 0, 0, 524280, 0, 0, 524281, 0, 0, 524282, 0, 0, 524283, 0, 0, 524284, 0, 0, 524285, 0, 0, 524286, 0, 0, 524287, 0, 0, 458752, 0, 0, 458753, 1, 0, 458754, 1, 0, 458755, 1, 0, 458756, 1, 0, 458757, 1, 0, 458758, 1, 0, 458759, 1, 0, 458760, 1, 0, 458761, 1, 0, 458762, 1, 0, 458763, 1, 0, 458764, 1, 0, 458765, 1, 0, 458766, 1, 0, 458767, 1, 0, 458768, 1, 0, 458769, 1, 0, 458770, 1, 0, 458771, 1, 0, 458772, 0, 0, 458773, 0, 0, 458774, 0, 0, 458775, 0, 0, 458776, 0, 0, 458777, 0, 0, 458778, 0, 0, 458779, 0, 0, 458780, 0, 0, 458781, 0, 0, 458782, 0, 0, 589815, 0, 0, 589816, 0, 0, 589817, 0, 0, 589818, 0, 0, 589819, 0, 0, 589820, 0, 0, 589821, 0, 0, 589822, 0, 0, 589823, 0, 0, 524288, 0, 0, 524289, 1, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 1, 0, 524294, 0, 0, 524295, 1, 0, 524296, 0, 0, 524297, 1, 0, 524298, 0, 0, 524299, 1, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 1, 0, 524304, 0, 0, 524305, 1, 0, 524306, 0, 0, 524307, 1, 0, 524308, 0, 0, 524309, 0, 0, 524310, 0, 0, 524311, 0, 0, 524312, 0, 0, 524313, 0, 0, 524314, 0, 0, 524315, 0, 0, 524316, 0, 0, 524317, 0, 0, 524318, 0, 0, 655351, 0, 0, 655352, 0, 0, 655353, 0, 0, 655354, 0, 0, 655355, 0, 0, 655356, 0, 0, 655357, 0, 0, 655358, 0, 0, 655359, 0, 0, 589824, 0, 0, 589825, 1, 0, 589826, 1, 0, 589827, 1, 0, 589828, 1, 0, 589829, 1, 0, 589830, 1, 0, 589831, 1, 0, 589832, 0, 0, 589833, 1, 0, 589834, 1, 0, 589835, 1, 0, 589836, 0, 0, 589837, 1, 0, 589838, 1, 0, 589839, 1, 0, 589840, 1, 0, 589841, 1, 0, 589842, 1, 0, 589843, 1, 0, 589844, 0, 0, 589845, 0, 0, 589846, 0, 0, 589847, 0, 0, 589848, 0, 0, 589849, 0, 0, 589850, 0, 0, 589851, 0, 0, 589852, 0, 0, 589853, 0, 0, 589854, 0, 0, 720887, 0, 0, 720888, 0, 0, 720889, 0, 0, 720890, 0, 0, 720891, 0, 0, 720892, 0, 0, 720893, 0, 0, 720894, 0, 0, 720895, 0, 0, 655360, 0, 0, 655361, 1, 0, 655362, 0, 0, 655363, 1, 0, 655364, 0, 0, 655365, 1, 0, 655366, 0, 0, 655367, 1, 0, 655368, 0, 0, 655369, 1, 0, 655370, 0, 0, 655371, 1, 0, 655372, 0, 0, 655373, 1, 0, 655374, 0, 0, 655375, 1, 0, 655376, 0, 0, 655377, 1, 0, 655378, 0, 0, 655379, 1, 0, 655380, 0, 0, 655381, 0, 0, 655382, 0, 0, 655383, 0, 0, 655384, 0, 0, 655385, 0, 0, 655386, 0, 0, 655387, 0, 0, 655388, 0, 0, 655389, 0, 0, 655390, 0, 0, 786423, 0, 0, 786424, 0, 0, 786425, 0, 0, 786426, 0, 0, 786427, 0, 0, 786428, 0, 0, 786429, 0, 0, 786430, 0, 0, 786431, 0, 0, 720896, 0, 0, 720897, 1, 0, 720898, 1, 0, 720899, 1, 0, 720900, 1, 0, 720901, 1, 0, 720902, 1, 0, 720903, 1, 0, 720904, 1, 0, 720905, 1, 0, 720906, 1, 0, 720907, 1, 0, 720908, 1, 0, 720909, 1, 0, 720910, 1, 0, 720911, 1, 0, 720912, 1, 0, 720913, 1, 0, 720914, 1, 0, 720915, 1, 0, 720916, 0, 0, 720917, 0, 0, 720918, 0, 0, 720919, 0, 0, 720920, 0, 0, 720921, 0, 0, 720922, 0, 0, 720923, 0, 0, 720924, 0, 0, 720925, 0, 0, 720926, 0, 0, 851959, 0, 0, 851960, 0, 0, 851961, 0, 0, 851962, 0, 0, 851963, 0, 0, 851964, 0, 0, 851965, 0, 0, 851966, 0, 0, 851967, 0, 0, 786432, 0, 0, 786433, 0, 0, 786434, 0, 0, 786435, 0, 0, 786436, 0, 0, 786437, 0, 0, 786438, 0, 0, 786439, 0, 0, 786440, 0, 0, 786441, 0, 0, 786442, 0, 0, 786443, 0, 0, 786444, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786448, 0, 0, 786449, 0, 0, 786450, 0, 0, 786451, 0, 0, 786452, 0, 0, 786453, 0, 0, 786454, 0, 0, 786455, 0, 0, 786456, 0, 0, 786457, 0, 0, 786458, 0, 0, 786459, 0, 0, 786460, 0, 0, 786461, 0, 0, 786462, 0, 0, 917495, 0, 0, 917496, 0, 0, 917497, 0, 0, 917498, 0, 0, 917499, 0, 0, 917500, 0, 0, 917501, 0, 0, 917502, 0, 0, 917503, 0, 0, 851968, 0, 0, 851969, 0, 0, 851970, 0, 0, 851971, 0, 0, 851972, 0, 0, 851973, 0, 0, 851974, 0, 0, 851975, 0, 0, 851976, 0, 0, 851977, 0, 0, 851978, 0, 0, 851979, 0, 0, 851980, 0, 0, 851981, 0, 0, 851982, 0, 0, 851983, 0, 0, 851984, 0, 0, 851985, 0, 0, 851986, 0, 0, 851987, 0, 0, 851988, 0, 0, 851989, 0, 0, 851990, 0, 0, 851991, 0, 0, 851992, 0, 0, 851993, 0, 0, 851994, 0, 0, 851995, 0, 0, 851996, 0, 0, 851997, 0, 0, 851998, 0, 0, 983031, 0, 0, 983032, 0, 0, 983033, 0, 0, 983034, 0, 0, 983035, 0, 0, 983036, 0, 0, 983037, 0, 0, 983038, 0, 0, 983039, 0, 0, 917504, 0, 0, 917505, 0, 0, 917506, 0, 0, 917507, 0, 0, 917508, 0, 0, 917509, 0, 0, 917510, 0, 0, 917511, 0, 0, 917512, 0, 0, 917513, 0, 0, 917514, 0, 0, 917515, 0, 0, 917516, 0, 0, 917517, 0, 0, 917518, 0, 0, 917519, 0, 0, 917520, 0, 0, 917521, 0, 0, 917522, 0, 0, 917523, 0, 0, 917524, 0, 0, 917525, 0, 0, 917526, 0, 0, 917527, 0, 0, 917528, 0, 0, 917529, 0, 0, 917530, 0, 0, 917531, 0, 0, 917532, 0, 0, 917533, 0, 0, 917534, 0, 0, 1048567, 0, 0, 1048568, 0, 0, 1048569, 0, 0, 1048570, 0, 0, 1048571, 0, 0, 1048572, 0, 0, 1048573, 0, 0, 1048574, 0, 0, 1048575, 0, 0, 983040, 0, 0, 983041, 0, 0, 983042, 0, 0, 983043, 0, 0, 983044, 0, 0, 983045, 0, 0, 983046, 0, 0, 983047, 0, 0, 983048, 0, 0, 983049, 0, 0, 983050, 0, 0, 983051, 0, 0, 983052, 0, 0, 983053, 0, 0, 983054, 0, 0, 983055, 0, 0, 983056, 0, 0, 983057, 0, 0, 983058, 0, 0, 983059, 0, 0, 983060, 0, 0, 983061, 0, 0, 983062, 0, 0, 983063, 0, 0, 983064, 0, 0, 983065, 0, 0, 983066, 0, 0, 983067, 0, 0, 983068, 0, 0, 983069, 0, 0, 983070, 0, 0, 1114103, 0, 0, 1114104, 0, 0, 1114105, 0, 0, 1114106, 0, 0, 1114107, 0, 0, 1114108, 0, 0, 1114109, 0, 0, 1114110, 0, 0, 1114111, 0, 0, 1048576, 0, 0, 1048577, 0, 0, 1048578, 0, 0, 1048579, 0, 0, 1048580, 0, 0, 1048581, 0, 0, 1048582, 0, 0, 1048583, 0, 0, 1048584, 0, 0, 1048585, 0, 0, 1048586, 0, 0, 1048587, 0, 0, 1048588, 0, 0, 1048589, 0, 0, 1048590, 0, 0, 1048591, 0, 0, 1048592, 0, 0, 1048593, 0, 0, 1048594, 0, 0, 1048595, 0, 0, 1048596, 0, 0, 1048597, 0, 0, 1048598, 0, 0, 1048599, 0, 0, 1048600, 0, 0, 1048601, 0, 0, 1048602, 0, 0, 1048603, 0, 0, 1048604, 0, 0, 1048605, 0, 0, 1048606, 0, 0, 1179639, 0, 0, 1179640, 0, 0, 1179641, 0, 0, 1179642, 0, 0, 1179643, 0, 0, 1179644, 0, 0, 1179645, 0, 0, 1179646, 0, 0, 1179647, 0, 0, 1114112, 0, 0, 1114113, 0, 0, 1114114, 0, 0, 1114115, 0, 0, 1114116, 0, 0, 1114117, 0, 0, 1114118, 0, 0, 1114119, 0, 0, 1114120, 0, 0, 1114121, 0, 0, 1114122, 0, 0, 1114123, 0, 0, 1114124, 0, 0, 1114125, 0, 0, 1114126, 0, 0, 1114127, 0, 0, 1114128, 0, 0, 1114129, 0, 0, 1114130, 0, 0, 1114131, 0, 0, 1114132, 0, 0, 1114133, 0, 0, 1114134, 0, 0, 1114135, 0, 0, 1114136, 0, 0, 1114137, 0, 0, 1114138, 0, 0, 1114139, 0, 0, 1114140, 0, 0, 1114141, 0, 0, 1114142, 0, 0, 1245175, 0, 0, 1245176, 0, 0, 1245177, 0, 0, 1245178, 0, 0, 1245179, 0, 0, 1245180, 0, 0, 1245181, 0, 0, 1245182, 0, 0, 1245183, 0, 0, 1179648, 0, 0, 1179649, 0, 0, 1179650, 0, 0, 1179651, 0, 0, 1179652, 0, 0, 1179653, 0, 0, 1179654, 0, 0, 1179655, 0, 0, 1179656, 0, 0, 1179657, 0, 0, 1179658, 0, 0, 1179659, 0, 0, 1179660, 0, 0, 1179661, 0, 0, 1179662, 0, 0, 1179663, 0, 0, 1179664, 0, 0, 1179665, 0, 0, 1179666, 0, 0, 1179667, 0, 0, 1179668, 0, 0, 1179669, 0, 0, 1179670, 0, 0, 1179671, 0, 0, 1179672, 0, 0, 1179673, 0, 0, 1179674, 0, 0, 1179675, 0, 0, 1179676, 0, 0, 1179677, 0, 0, 1179678, 0, 0, 1310711, 0, 0, 1310712, 0, 0, 1310713, 0, 0, 1310714, 0, 0, 1310715, 0, 0, 1310716, 0, 0, 1310717, 0, 0, 1310718, 0, 0, 1310719, 0, 0, 1245184, 0, 0, 1245185, 0, 0, 1245186, 0, 0, 1245187, 0, 0, 1245188, 0, 0, 1245189, 0, 0, 1245190, 0, 0, 1245191, 0, 0, 1245192, 0, 0, 1245193, 0, 0, 1245194, 0, 0, 1245195, 0, 0, 1245196, 0, 0, 1245197, 0, 0, 1245198, 0, 0, 1245199, 0, 0, 1245200, 0, 0, 1245201, 0, 0, 1245202, 0, 0, 1245203, 0, 0, 1245204, 0, 0, 1245205, 0, 0, 1245206, 0, 0, 1245207, 0, 0, 1245208, 0, 0, 1245209, 0, 0, 1245210, 0, 0, 1245211, 0, 0, 1245212, 0, 0, 1245213, 0, 0, 1245214, 0, 0, 1376247, 0, 0, 1376248, 0, 0, 1376249, 0, 0, 1376250, 0, 0, 1376251, 0, 0, 1376252, 0, 0, 1376253, 0, 0, 1376254, 0, 0, 1376255, 0, 0, 1310720, 0, 0, 1310721, 0, 0, 1310722, 0, 0, 1310723, 0, 0, 1310724, 0, 0, 1310725, 0, 0, 1310726, 0, 0, 1310727, 0, 0, 1310728, 0, 0, 1310729, 0, 0, 1310730, 0, 0, 1310731, 0, 0, 1310732, 0, 0, 1310733, 0, 0, 1310734, 0, 0, 1310735, 0, 0, 1310736, 0, 0, 1310737, 0, 0, 1310738, 0, 0, 1310739, 0, 0, 1310740, 0, 0, 1310741, 0, 0, 1310742, 0, 0, 1310743, 0, 0, 1310744, 0, 0, 1310745, 0, 0, 1310746, 0, 0, 1310747, 0, 0, 1310748, 0, 0, 1310749, 0, 0, 1310750, 0, 0, 1441783, 0, 0, 1441784, 0, 0, 1441785, 0, 0, 1441786, 0, 0, 1441787, 0, 0, 1441788, 0, 0, 1441789, 0, 0, 1441790, 0, 0, 1441791, 0, 0, 1376256, 0, 0, 1376257, 0, 0, 1376258, 0, 0, 1376259, 0, 0, 1376260, 0, 0, 1376261, 0, 0, 1376262, 0, 0, 1376263, 0, 0, 1376264, 0, 0, 1376265, 0, 0, 1376266, 0, 0, 1376267, 0, 0, 1376268, 0, 0, 1376269, 0, 0, 1376270, 0, 0, 1376271, 0, 0, 1376272, 0, 0, 1376273, 0, 0, 1376274, 0, 0, 1376275, 0, 0, 1376276, 0, 0, 1376277, 0, 0, 1376278, 0, 0, 1376279, 0, 0, 1376280, 0, 0, 1376281, 0, 0, 1376282, 0, 0, 1376283, 0, 0, 1376284, 0, 0, 1376285, 0, 0, 1376286, 0, 0) -__meta__ = { -"_edit_lock_": true -} +tile_set = ExtResource( "1" ) +cell_quadrant_size = 48 +format = 2 +layer_0/tile_data = PackedInt32Array(196598, 0, 0, 0, 0, 0, 65536, 0, 0, 131072, 0, 0, 196608, 0, 0, 262144, 0, 0, 327680, 0, 0, 393216, 0, 0, 458752, 0, 0, 524288, 0, 0, 589824, 0, 0, 655360, 0, 0, 720896, 0, 0, 786432, 0, 0, 1, 0, 0, 65537, 65536, 0, 131073, 65536, 0, 196609, 65536, 0, 262145, 65536, 0, 327681, 65536, 0, 393217, 65536, 0, 458753, 65536, 0, 524289, 65536, 0, 589825, 65536, 0, 655361, 65536, 0, 720897, 65536, 0, 786433, 0, 0, 2, 0, 0, 65538, 65536, 0, 131074, 0, 0, 196610, 65536, 0, 262146, 0, 0, 327682, 65536, 0, 393218, 0, 0, 458754, 65536, 0, 524290, 0, 0, 589826, 65536, 0, 655362, 0, 0, 720898, 65536, 0, 786434, 0, 0, 3, 0, 0, 65539, 65536, 0, 131075, 65536, 0, 196611, 65536, 0, 262147, 65536, 0, 327683, 65536, 0, 393219, 65536, 0, 458755, 65536, 0, 524291, 0, 0, 589827, 65536, 0, 655363, 65536, 0, 720899, 65536, 0, 786435, 0, 0, 4, 0, 0, 65540, 65536, 0, 131076, 0, 0, 196612, 0, 0, 262148, 0, 0, 327684, 65536, 0, 393220, 0, 0, 458756, 65536, 0, 524292, 0, 0, 589828, 65536, 0, 655364, 0, 0, 720900, 65536, 0, 786436, 0, 0, 5, 0, 0, 65541, 65536, 0, 131077, 65536, 0, 196613, 65536, 0, 262149, 65536, 0, 327685, 65536, 0, 393221, 65536, 0, 458757, 65536, 0, 524293, 65536, 0, 589829, 65536, 0, 655365, 65536, 0, 720901, 65536, 0, 786437, 0, 0, 6, 0, 0, 65542, 65536, 0, 131078, 0, 0, 196614, 65536, 0, 262150, 0, 0, 327686, 0, 0, 393222, 0, 0, 458758, 65536, 0, 524294, 0, 0, 589830, 65536, 0, 655366, 0, 0, 720902, 65536, 0, 786438, 0, 0, 7, 0, 0, 65543, 65536, 0, 131079, 65536, 0, 196615, 65536, 0, 262151, 65536, 0, 327687, 65536, 0, 393223, 65536, 0, 458759, 65536, 0, 524295, 65536, 0, 589831, 65536, 0, 655367, 65536, 0, 720903, 65536, 0, 786439, 0, 0, 8, 0, 0, 65544, 65536, 0, 131080, 0, 0, 196616, 65536, 0, 262152, 0, 0, 327688, 65536, 0, 393224, 0, 0, 458760, 65536, 0, 524296, 0, 0, 589832, 65536, 0, 655368, 0, 0, 720904, 65536, 0, 786440, 0, 0, 9, 0, 0, 65545, 65536, 0, 131081, 65536, 0, 196617, 65536, 0, 262153, 65536, 0, 327689, 65536, 0, 393225, 65536, 0, 458761, 65536, 0, 524297, 65536, 0, 589833, 65536, 0, 655369, 65536, 0, 720905, 65536, 0, 786441, 0, 0, 10, 0, 0, 65546, 65536, 0, 131082, 0, 0, 196618, 0, 0, 262154, 0, 0, 327690, 65536, 0, 393226, 0, 0, 458762, 65536, 0, 524298, 0, 0, 589834, 65536, 0, 655370, 0, 0, 720906, 65536, 0, 786442, 0, 0, 11, 0, 0, 65547, 65536, 0, 131083, 0, 0, 196619, 65536, 0, 262155, 65536, 0, 327691, 65536, 0, 393227, 65536, 0, 458763, 65536, 0, 524299, 65536, 0, 589835, 65536, 0, 655371, 65536, 0, 720907, 65536, 0, 786443, 0, 0, 12, 0, 0, 65548, 65536, 0, 131084, 0, 0, 196620, 65536, 0, 262156, 0, 0, 327692, 65536, 0, 393228, 0, 0, 458764, 65536, 0, 524300, 0, 0, 589836, 65536, 0, 655372, 0, 0, 720908, 65536, 0, 786444, 0, 0, 13, 0, 0, 65549, 65536, 0, 131085, 0, 0, 196621, 65536, 0, 262157, 65536, 0, 327693, 65536, 0, 393229, 0, 0, 458765, 65536, 0, 524301, 0, 0, 589837, 65536, 0, 655373, 65536, 0, 720909, 65536, 0, 786445, 0, 0, 14, 0, 0, 65550, 65536, 0, 131086, 0, 0, 196622, 65536, 0, 262158, 0, 0, 327694, 65536, 0, 393230, 0, 0, 458766, 65536, 0, 524302, 0, 0, 589838, 65536, 0, 655374, 0, 0, 720910, 65536, 0, 786446, 0, 0, 15, 0, 0, 65551, 65536, 0, 131087, 65536, 0, 196623, 65536, 0, 262159, 65536, 0, 327695, 65536, 0, 393231, 0, 0, 458767, 65536, 0, 524303, 65536, 0, 589839, 65536, 0, 655375, 65536, 0, 720911, 65536, 0, 786447, 0, 0, 16, 0, 0, 65552, 65536, 0, 131088, 0, 0, 196624, 65536, 0, 262160, 0, 0, 327696, 65536, 0, 393232, 0, 0, 458768, 65536, 0, 524304, 0, 0, 589840, 65536, 0, 655376, 0, 0, 720912, 65536, 0, 786448, 0, 0, 17, 0, 0, 65553, 65536, 0, 131089, 65536, 0, 196625, 65536, 0, 262161, 65536, 0, 327697, 65536, 0, 393233, 65536, 0, 458769, 65536, 0, 524305, 65536, 0, 589841, 65536, 0, 655377, 65536, 0, 720913, 65536, 0, 786449, 0, 0, 18, 0, 0, 65554, 65536, 0, 131090, 0, 0, 196626, 65536, 0, 262162, 0, 0, 327698, 0, 0, 393234, 0, 0, 458770, 65536, 0, 524306, 0, 0, 589842, 65536, 0, 655378, 0, 0, 720914, 65536, 0, 786450, 0, 0, 19, 0, 0, 65555, 65536, 0, 131091, 65536, 0, 196627, 65536, 0, 262163, 65536, 0, 327699, 65536, 0, 393235, 65536, 0, 458771, 65536, 0, 524307, 65536, 0, 589843, 65536, 0, 655379, 65536, 0, 720915, 65536, 0, 786451, 0, 0, 20, 0, 0, 65556, 0, 0, 131092, 0, 0, 196628, 0, 0, 262164, 0, 0, 327700, 0, 0, 393236, 0, 0, 458772, 0, 0, 524308, 0, 0, 589844, 0, 0, 655380, 0, 0, 720916, 0, 0, 786452, 0, 0, 21, 0, 0, 65557, 0, 0, 131093, 0, 0, 196629, 0, 0, 262165, 0, 0, 327701, 0, 0, 393237, 0, 0, 458773, 0, 0, 524309, 0, 0, 589845, 0, 0, 655381, 0, 0, 720917, 0, 0, 786453, 0, 0) [node name="SpawnPoints" type="Node2D" parent="."] @@ -60,214 +58,214 @@ position = Vector2(936, 72) [node name="Rocks" type="Node2D" parent="."] -[node name="Rock0" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock0" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(120, 72) -[node name="Rock1" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock1" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(264, 168) -[node name="Rock2" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock2" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(264, 120) -[node name="Rock3" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock3" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(216, 72) -[node name="Rock4" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock4" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(264, 72) -[node name="Rock5" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock5" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(312, 72) -[node name="Rock6" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock6" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(552, 168) -[node name="Rock7" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock7" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(600, 168) -[node name="Rock8" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock8" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(552, 216) -[node name="Rock9" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock9" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(264, 312) -[node name="Rock10" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock10" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(120, 360) -[node name="Rock11" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock11" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(168, 360) -[node name="Rock12" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock12" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(216, 360) -[node name="Rock13" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock13" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(120, 264) -[node name="Rock14" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock14" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(168, 216) -[node name="Rock15" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock15" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(72, 360) -[node name="Rock16" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock16" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(72, 312) -[node name="Rock17" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock17" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(72, 264) -[node name="Rock18" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock18" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(360, 360) -[node name="Rock19" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock19" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(408, 360) -[node name="Rock20" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock20" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(504, 360) -[node name="Rock21" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock21" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(600, 360) -[node name="Rock22" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock22" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(648, 360) -[node name="Rock23" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock23" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(504, 456) -[node name="Rock24" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock24" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(552, 456) -[node name="Rock25" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock25" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(552, 408) -[node name="Rock26" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock26" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(360, 456) -[node name="Rock27" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock27" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(360, 504) -[node name="Rock28" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock28" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(264, 504) -[node name="Rock29" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock29" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(264, 552) -[node name="Rock30" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock30" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(168, 456) -[node name="Rock31" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock31" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(168, 504) -[node name="Rock32" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock32" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(72, 552) -[node name="Rock33" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock33" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(120, 552) -[node name="Rock34" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock34" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(504, 552) -[node name="Rock35" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock35" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(600, 552) -[node name="Rock36" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock36" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(648, 552) -[node name="Rock37" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock37" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(648, 504) -[node name="Rock38" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock38" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(456, 216) -[node name="Rock39" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock39" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(360, 216) -[node name="Rock40" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock40" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(360, 168) -[node name="Rock41" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock41" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(456, 120) -[node name="Rock42" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock42" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(456, 408) -[node name="Rock43" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock43" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(456, 456) -[node name="Rock44" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock44" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(456, 504) -[node name="Rock45" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock45" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(600, 264) -[node name="Rock46" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock46" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(600, 72) -[node name="Rock47" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock47" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(408, 72) -[node name="Rock48" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock48" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(792, 168) -[node name="Rock49" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock49" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(744, 168) -[node name="Rock50" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock50" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(744, 264) -[node name="Rock51" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock51" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(792, 264) -[node name="Rock52" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock52" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(744, 360) -[node name="Rock53" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock53" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(744, 408) -[node name="Rock54" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock54" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(792, 552) -[node name="Rock55" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock55" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(840, 552) -[node name="Rock56" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock56" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(840, 504) -[node name="Rock57" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock57" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(840, 312) -[node name="Rock58" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock58" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(840, 264) -[node name="Rock59" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock59" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(840, 216) -[node name="Rock60" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock60" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(840, 120) -[node name="Rock61" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock61" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(792, 72) -[node name="Rock62" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock62" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(840, 72) -[node name="Rock63" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock63" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(936, 216) -[node name="Rock64" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock64" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(936, 264) -[node name="Rock65" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock65" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(936, 408) -[node name="Rock66" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock66" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(888, 456) -[node name="Rock67" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock67" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(936, 456) -[node name="Rock68" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock68" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(792, 456) -[node name="Rock69" parent="Rocks" instance=ExtResource( 2 )] +[node name="Rock69" parent="Rocks" instance=ExtResource( "2" )] position = Vector2(840, 456) [node name="Players" type="Node2D" parent="."] @@ -277,25 +275,19 @@ offset_right = 1024.0 offset_bottom = 40.0 size_flags_horizontal = 2 size_flags_vertical = 2 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} +script = ExtResource( "3" ) [node name="Winner" type="Label" parent="."] +visible = false offset_right = 1031.0 offset_bottom = 617.0 size_flags_horizontal = 2 size_flags_vertical = 0 -custom_colors/font_color_shadow = Color(0, 0, 0, 1) -custom_constants/shadow_offset_x = 2 -custom_constants/shadow_offset_y = 2 -custom_constants/shadow_as_outline = 1 -custom_fonts/font = SubResource( 1 ) +theme_override_constants/shadow_offset_x = 2 +theme_override_constants/shadow_offset_y = 2 +theme_override_fonts/font = SubResource( "1" ) text = "THE WINNER IS: YOU" -align = 1 -valign = 1 [node name="ExitGame" type="Button" parent="Winner"] offset_left = 384.0 @@ -304,14 +296,20 @@ offset_right = 649.0 offset_bottom = 469.0 size_flags_horizontal = 2 size_flags_vertical = 2 -custom_fonts/font = SubResource( 1 ) +theme_override_fonts/font = SubResource( "1" ) text = "EXIT GAME" -__meta__ = { -"_edit_use_anchors_": false -} [node name="Camera2D" type="Camera2D" parent="."] offset = Vector2(512, 300) current = true +[node name="PlayerSpawner" type="MultiplayerSpawner" parent="."] +replication = [ExtResource( "5_yef4r" )] +spawn_path = NodePath("../Players") +auto_spawn = true + +[node name="BombSpawner" type="MultiplayerSpawner" parent="."] +spawn_path = NodePath("..") +script = ExtResource( "6_ac5ja" ) + [connection signal="pressed" from="Winner/ExitGame" to="Score" method="_on_exit_game_pressed"]