TheOverfloater / pathos-public

Public release of Pathos Engine
MIT License
38 stars 9 forks source link

Networking #14

Open AnthonyPython opened 5 months ago

AnthonyPython commented 5 months ago

I understand that you said little is done for it but what extent is there actually done for networking and what needs to be done? I seen that you have messages being sent but idk if it's just local atm.

TheOverfloater commented 5 months ago

The networking code only has basic functionality, such as being able to spawn a multiplayer server, being able to connect to that server as a client, and being able to re-aquire a connection in the case of a temporary disruption. There's also some very basic prediction code for the client movement, that's pretty much about it. There's no menu functionality for multiplayer, it can only be activated from the console by using sv_maxplayers 1.

TheOverfloater commented 5 months ago

The message system works in a way so that for SP, it doesn't use any actual network code, the messages are just stored in local buffers as you mentioned. For actual networking it uses enet and the messages are being sent and received using that.

AnthonyPython commented 5 months ago

so you mean all the messages being sent are in fact using enet for networking when max players are above 1 and only the player has basic prediction? else the message is just sent directly to client when at 1 for single player if I understand this.

TheOverfloater commented 5 months ago

Yes exactly. The local player's networking code doesn't use enet still, but any connected clients will use enet to communicate with the server back and forth. Basic prediction is done for all clients also.