This project is meant to provide a working version of using LiteNetLibSystem
with Godot Engine.
The client prediction still doesn't work well due to Godot's MoveAndSlide
method not accepting the parameter delta
. There's an ongoing discussion about bringing this option back in the engine here, but the timeline is uncertain.
Godot 4.4 currently doesn't support simulating physics multiple times at once either. It's unclear when this option will be introduced, but there is a proposal for it: Add ability to simulate physics manually/multiple times at once.
-
Open one of the provided projects.
-
Build the project.
-
Go to Debug in the top menu, then select Customize Run Instances.
-
Enable 3 instances and set the Launch Argument for:
- Instance 1 to
--server
- Instance 2 to
--client
- Instance 3 to
--client
- Instance 1 to
-
Run the game in the editor.
You can use the virtual joystick to move the character, press ESC
to release the mouse capture, and use mouse movement to apply rotation.
The first folder, LiteNetLibSystemExample
, provides the basic version of the game. It contains pure character movement and rotation, nothing more. This way, you can gain an idea of how to use LiteNetLibSystem
with Godot.