Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiplayer-bomber example. #910

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Yarwin
Copy link
Contributor

@Yarwin Yarwin commented Oct 2, 2024

closes: #903
A demo adapted from: https://github.com/godotengine/godot-demo-projects/tree/master/networking/multiplayer_bomber

I took few liberties, mostly related to caching references to nodes in the scene tree by using OnReady, using signals instead of parsing tree in process, and declaring gamestate autoload as engine singleton.

@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-910

@Yarwin Yarwin force-pushed the add_bomberman_multiplayer_example branch from f2a0b02 to d24ad70 Compare October 2, 2024 10:32
@ValorZard
Copy link

ValorZard commented Oct 5, 2024

Still getting this error on this pull request:

  <C++ Error>    Condition "true" is true. Continuing.
  <C++ Source>   modules/multiplayer/scene_replication_interface.cpp:782 @ on_delta_receive()

Additionally, for some reason the tile map isn't showing up properly

E 0:00:21:0723   create_tile: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
  <C++ Error>    Condition "!room_for_tile" is true.
  <C++ Source>   scene/resources/2d/tile_set.cpp:4963 @ create_tile()

image

On further testing, this additional error popped up, which is probably a typo

E 0:00:10:0292   get_state: Property '.:player_idx' not found.
  <C++ Error>    Condition "!valid" is true. Returning: ERR_INVALID_DATA
  <C++ Source>   modules/multiplayer/multiplayer_synchronizer.cpp:167 @ get_state()

@Yarwin
Copy link
Contributor Author

Yarwin commented Oct 5, 2024

ah, my bad – I forget to update property in the editor in the gdext project (done it only on a copy outside the repo 😬)

output.mp4

@ValorZard
Copy link

ValorZard commented Oct 6, 2024

Update: everything works now, but the missing tilemap issue is still there
image

- fix players list
- disconnect players on game end
@Yarwin Yarwin force-pushed the add_bomberman_multiplayer_example branch from 3c3293e to 68a6ff1 Compare October 6, 2024 20:55
@Bromeon Bromeon added feature Adds functionality to the library c: examples Code specific to examples changed (not just follow-up from API updates) labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: examples Code specific to examples changed (not just follow-up from API updates) feature Adds functionality to the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add example on how to use Godot Rust with godot's multiplayer API
4 participants