Coder discussion - Modding & Client <-> Server Communication
Posted: Fri Mar 29, 2013 9:12 pm
Something we had to deal with while making VoxelAuth (most of the practical stuff was figured out by UnrealIncident, because he's a sexy fuck) was client<->server communication. This got me thinking about adding some other stuff (either in VoxelAuth or as a separate mod) that would allow servers to have a little more control over clients. There have also been other posts, that mention similar ideas, so I figured we should have a proper discussion on this, instead of either no-one working on it, or everyone making their own.
Related posts:
http://www.buildandshoot.com/viewtopic. ... 734#p20030
http://www.buildandshoot.com/viewtopic. ... =50#p19654
(Note: I call this thing a "mod" for lack of a better word)
Ideally, a client without the mod should be able to connect to a server with it, and vice versa (unless the server chooses to require a mod), so my proposed way of doing this would be for the client to notify the server that it is running the mod by sending a chat command. If the server isn't running the mod, nothing happens. If the client isn't running the mod, the server obviously does nothing. If the server is running the mod, all other comms can happen using custom packet IDs that aren't used by the default game (this should be easy enough to do in the client, and easy in the server (although requires a recompile of certain parts, so a simple plugin wouldn't be enough)). How it works from that point on will require some thought, so discussion would be good.
I'm also curious at what point models are loaded, as if that happens right at the start, server-decided models would require either more modding of the client, loading new models after the originals are loaded (not sure how easy that would be), or for there to be some wrapper to the game that gets this information from the server before the game itself is started.
Anyway, yes, I don't know as much about the game's internals as I'd like to, but I know some others here do.
Also, I'd prefer if people who didn't know what they were talking about didn't comment in this thread.
Related posts:
http://www.buildandshoot.com/viewtopic. ... 734#p20030
http://www.buildandshoot.com/viewtopic. ... =50#p19654
(Note: I call this thing a "mod" for lack of a better word)
Ideally, a client without the mod should be able to connect to a server with it, and vice versa (unless the server chooses to require a mod), so my proposed way of doing this would be for the client to notify the server that it is running the mod by sending a chat command. If the server isn't running the mod, nothing happens. If the client isn't running the mod, the server obviously does nothing. If the server is running the mod, all other comms can happen using custom packet IDs that aren't used by the default game (this should be easy enough to do in the client, and easy in the server (although requires a recompile of certain parts, so a simple plugin wouldn't be enough)). How it works from that point on will require some thought, so discussion would be good.
I'm also curious at what point models are loaded, as if that happens right at the start, server-decided models would require either more modding of the client, loading new models after the originals are loaded (not sure how easy that would be), or for there to be some wrapper to the game that gets this information from the server before the game itself is started.
Anyway, yes, I don't know as much about the game's internals as I'd like to, but I know some others here do.
Also, I'd prefer if people who didn't know what they were talking about didn't comment in this thread.