Godot Iroh currently supports exports for the following platforms:
- Windows
- macOS
- Linux
- Android
Web export support (for browsers) is currently not supported. More information can be found in this issue.
The addon is accessible on the Godot Asset Library here.
- Download the latest release from releases.
- Extract the archive in your Godot project folder.
- That's it! You're all set!
This plugin allows you to establish peer-to-peer multiplayer connections in Godot without relying on a centralized server, leveraging the power of Iroh.
To start a server and set it as the multiplayer peer:
var server := IrohServer.start()
multiplayer.multiplayer_peer = server
You can retrieve the connection string (used to connect to this server) using:
server.connection_string()
After initializing the peer, you can use the High-level multiplayer of Godot as normal.
To connect to an existing server using the connection string:
var client = IrohClient.connect("CONNECTION_STRING")
multiplayer.multiplayer_peer = client
Replace "CONNECTION_STRING"
with the string provided by the client acting as the server.
After initializing the peer, you can use the High-level multiplayer as normal.
To handle connection failures on the client side, you can connect to the connection_failed signal and get the error message with the connection_error
function:
multiplayer.connection_failed.connect(func():
print("Connection error: ", client.connection_error()))
This allows you to gracefully handle cases where the client cannot connect to the server.
For more examples, see the examples folder in this repository.
Contributions are very welcome! If you find any issues, have ideas for improvements, or want to add new features, please feel free to open an issue or submit a pull request.
I would be delighted to review and merge your contributions to help make Godot Iroh even better. Whether it's bug fixes, documentation improvements, or new functionality, your help is greatly appreciated!
Thank you for helping to grow this project!