Skip to content

Commit 5c0c64f

Browse files
committed
Add multiplayer-bomber example
1 parent 877893f commit 5c0c64f

30 files changed

+2217
-0
lines changed

ReadMe.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ We currently feature the following demo projects:
2222
- [**Hot reload**](hot-reload)
2323
Showcases how classes and their state can be hot-reloaded in the Godot editor.
2424

25+
- [**Multiplayer bomber**](hot-reload)
26+
A port of godot's [multiplayer bomber demo](https://github.com/godotengine/godot-demo-projects/tree/master/networking/multiplayer_bomber). Showcases how to use basics of godot's abstraction for multiplayer with godot-rust.
27+
2528

2629
## Engine and library versions
2730

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
res://rust.gdextension

multiplayer-bomber/godot/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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
17+
18+
19+
## Copying
20+
21+
George (`assets/chatwalk`) is an alternate LCP character by [sheep](https://opengameart.org/users/sheep), from [OpenGameArt.org](https://opengameart.org/content/alternate-lpc-character-sprites-george). CC-BY 3.0, CC-BY-SA 3.0, GPL 3.0
22+
23+
Bomb - Matt Hackett of Lost Decade Games, expanded by Cem Kalyoncu; CC-BY 3.0
24+
25+
"[LPC] Rocks" by bluecarrot16, Johann Charlot, Yar, Hyptosis, Evert, Lanea Zimmerman (Sharm), Guillaume Lecollinet, Richard Kettering (Jetrel), Zachariah Husiar (Zabin), Jetrel, Hyptosis, Redshrike, Rayane Félix (RayaneFLX), Michele Bucelli (Buch) <https://opengameart.org/users/buch>
26+
"[LPC] Walls" by bluecarrot16, Lanea Zimmerman (Sharm), Daniel Armstrong (HughSpectrum), William Thompson (William.Thompsonj), Hyptosis, Zabin, Daniel Cook, Guido Bos, SpiderDave, Cougarmint, Stephen Challener (Redshrike), Matthew Nash, Wolthera van Hövell tot Westerflier (TheraHedwig), Reemax, bleutailfly, NaRNeRZz, Sir Spummington, Casper Nilsson, KnoblePersona. CC-BY-SA 3.0.
27+
"[LPC] Floors" by bluecarrot16, Lanea Zimmerman (Sharm), William Thompson (William.Thompsonj), Hyptosis, SpiderDave, Cougarmint, Stephen Challener (Redshrike), Bonsaiheldin, Tyler Olsen (Roots), Jetrel, jestan, The Open Surge team (http://opensnc.sourceforge.net), Gaurav Munjal, Reemax, Silveira Neto, bleutailfly, Casper Nilsson, NaRNeRZz, Buch, keith karnage, Arthur Carvalho, Guilherme Vieira (n2liquid), Chris Hamons (maintainer). CC-BY-SA 4.0
28+
9.82 KB
Loading
1.62 KB
Loading
2.63 KB
Loading
89 Bytes
Loading

multiplayer-bomber/godot/icon.svg

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"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[configuration]
2+
entry_symbol = "gdext_rust_init"
3+
compatibility_minimum = 4.1
4+
5+
[libraries]
6+
linux.debug.x86_64 = "res://../../../target/debug/libmultiplayer_bomber.so"
7+
linux.release.x86_64 = "res://../../../target/release/libmultiplayer_bomber.so"
8+
windows.debug.x86_64 = "res://../../../target/debug/multiplayer_bomber.dll"
9+
windows.release.x86_64 = "res://../../../target/release/multiplayer_bomber.dll"
10+
macos.debug = "res://../../../target/debug/libmultiplayer_bomber.dylib"
11+
macos.release = "res://../../../target/release/libmultiplayer_bomber.dylib"
12+
macos.debug.arm64 = "res://../../../target/debug/libmultiplayer_bomber.dylib"
13+
macos.release.arm64 = "res://../../../target/release/libmultiplayer_bomber.dylib"
14+
web.debug.wasm32 = "res://../../../target/wasm32-unknown-emscripten/debug/multiplayer_bomber.wasm"
15+
web.release.wasm32 = "res://../../../target/wasm32-unknown-emscripten/release/multiplayer_bomber.wasm"

0 commit comments

Comments
 (0)