Skip to content

Commit d24ad70

Browse files
committed
Add multiplayer-bomber example.
1 parent 8ad9cb0 commit d24ad70

30 files changed

+1955
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ members = [
1414
"itest/repo-tweak",
1515
"examples/dodge-the-creeps/rust",
1616
"examples/hot-reload/rust",
17+
"examples/multiplayer-bomber/rust",
1718
]
1819

1920
# Note about Jetbrains IDEs: "IDE Sync" (Refresh Cargo projects) may cause static analysis errors such as
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
res://rust.gdextension
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Multiplayer Bomber Example
2+
3+
A multiplayer implementation of the classic bomberman game.
4+
One of the players should press **Host**, while other player(s)
5+
should type in the host's IP address and press **Join**.
6+
7+
Based on: https://github.com/godotengine/godot-demo-projects/tree/master/networking/multiplayer_bomber
8+
9+
Language: Rust
10+
11+
Renderer: Compatibility
12+
13+
## Controls
14+
15+
WSAD to move
16+
CTRL to plant bomb
Loading
Loading
Loading
Binary file not shown.
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
; Engine configuration file.
2+
; It's best edited using the editor UI and not directly,
3+
; since the parameters that go here are not all obvious.
4+
;
5+
; Format:
6+
; [section] ; section goes between []
7+
; param=value ; assign values to parameters
8+
9+
config_version=5
10+
11+
[application]
12+
13+
config/name="GodotRustMultiplayerExample"
14+
run/main_scene="res://src/game/lobby.tscn"
15+
config/features=PackedStringArray("4.3", "GL Compatibility")
16+
config/icon="res://icon.svg"
17+
18+
[autoload]
19+
20+
gamestate="*res://src/game/gamestate.tscn"
21+
22+
[input]
23+
24+
Fire={
25+
"deadzone": 0.5,
26+
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
27+
]
28+
}
29+
move_left={
30+
"deadzone": 0.5,
31+
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
32+
]
33+
}
34+
move_right={
35+
"deadzone": 0.5,
36+
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
37+
]
38+
}
39+
jump={
40+
"deadzone": 0.5,
41+
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
42+
]
43+
}
44+
move_up={
45+
"deadzone": 0.5,
46+
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
47+
]
48+
}
49+
move_down={
50+
"deadzone": 0.5,
51+
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
52+
]
53+
}
54+
set_bomb={
55+
"deadzone": 0.5,
56+
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194326,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
57+
]
58+
}
59+
60+
[layer_names]
61+
62+
2d_physics/layer_1="collisions"
63+
2d_physics/layer_2="explodable"
64+
65+
[rendering]
66+
67+
renderer/rendering_method="gl_compatibility"
68+
renderer/rendering_method.mobile="gl_compatibility"

0 commit comments

Comments
 (0)