Reusing freeorion protocol in custom client

For topics that do not fit in another sub-forum.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
afwbkbc
Pupating Mass
Posts: 96
Joined: Tue Mar 14, 2017 10:47 am

Reusing freeorion protocol in custom client

#1 Post by afwbkbc »

Hi, I'm thinking of implementing alternative freeorion client.
Either UE4 or SDL2/OpenGL, with 3d models, combat animations, nvidia 3d vision support amd stuff.
I want it to be compatible with freeorion server, so this client can be used in multiplayer with other players on native clients.
So,
1) how to include freeorion's network protocol? Just copy relevant classes from freeorion or is there more elegant way (i.e. including as dll)?
2) is there any logic that is performed on client in multiplayer game? Or does server performs all necessary logic? I assume files in default/ contain some scripts that client reads directly instead of receiving from server?
3) any other compatibility challenges I may encounter?

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Reusing freeorion protocol in custom client

#2 Post by Geoff the Medio »

afwbkbc wrote:1) how to include freeorion's network protocol? Just copy relevant classes from freeorion or is there more elegant way (i.e. including as dll)?
Right now, you'd probably need to include the relevant classes. Some of the relevant code is probably also in the common library, but on Windows, I believe that still builds only as a static library, not a DLL. The AI clients can / should be able to do all the same player-order-issuing and diplomacy interactions with the server as the human client, so the stuff you'd need to copy again is probably mostly just what's present in both client builds.
2) is there any logic that is performed on client in multiplayer game? Or does server performs all necessary logic?
A few things, such as ordering a fleet to explore, are implemented client-side, in that there's no game-mechanic for a fleet exploring, but rather the client just automatically orders the fleet to move around when the player asks it to. The actual game mechanics / rules are all evaluated each turn on the server, and anything the client / player does other than issue orders and manipulate diplomacy are irrelevant to what happens on the server / what other players see / what the player gets back the next turn from the server.
I assume files in default/ contain some scripts that client reads directly instead of receiving from server?
yes.
3) any other compatibility challenges I may encounter?
probably.

Post Reply