Splitting Binaries Client/Server
by Andrew Alexander · in Torque Game Engine · 06/16/2004 (6:06 pm) · 9 replies
I'm trying to devise a way to split torque into a few seperate binaries. Mostly having a seperate client and server binary. (Tho looking at it, it seems like editing would have to be seperate as well it seems, or tied in to both).
Does anyone have any suggestions on how to tackle this? Has anyone gone through the code enough to know which files/groups I'd need to move to each side? Or where overlaps would occur?
Does anyone have any suggestions on how to tackle this? Has anyone gone through the code enough to know which files/groups I'd need to move to each side? Or where overlaps would occur?
About the author
#2
Plus, project requirements dictate seperate binaries.
06/17/2004 (8:13 am)
Yes, I'm walking through the network system slowly now. I'm not sure what you mean by your statements, because playing a network game with a remote server would indicate that the two binaries are acting seperately anyhow.Plus, project requirements dictate seperate binaries.
#3
06/17/2004 (8:22 am)
I hope you know that the torque binary executable can start as a dedicated server with an argument... so the same binary functions as both a client and a dedicated server, depending on what arguments you pass. If you _really_ want to make separate binaries, it's going to be quite a big headache. Ben knows what he's talking about. Of course, if a quick hack will do, you can find where arguments are parsed, then hard-code "-dedicated" into the arguments passed in. Make that your dedicated binary. Then you can remove the code that deals with the "-dedicated" argument in the client binary, and structure your game so they can only join a game, rather than start their own server. Quick and simple, but it's still a hack.
#4
The issue basically comes down to getting class IDs to match up perfectly between executables. Having different codebases will give you a lot of trouble in that regard. It's possible (since everything is :), it's just not the best way to work with Torque. You might want to consider a hack along John's lines.
06/17/2004 (8:31 am)
Andrew,The issue basically comes down to getting class IDs to match up perfectly between executables. Having different codebases will give you a lot of trouble in that regard. It's possible (since everything is :), it's just not the best way to work with Torque. You might want to consider a hack along John's lines.
#5
Yes, I'm thinking that there would definately need to be a 'shared' or 'common' set of files between the two binaries to maintain consistancy.
I'm hoping to get the client to be as lightweight as possible. Its not for a game, but it will be very much like a 'dummy' terminal. Kind of like a webbrowser that accepts streamed content.
06/17/2004 (10:31 am)
Ah, I understand what you mean now.Yes, I'm thinking that there would definately need to be a 'shared' or 'common' set of files between the two binaries to maintain consistancy.
I'm hoping to get the client to be as lightweight as possible. Its not for a game, but it will be very much like a 'dummy' terminal. Kind of like a webbrowser that accepts streamed content.
#6
Three binaries. The 1st is without editors and the ability to create servers.
The 2nd is without sound, gui, editors and alot of other stuff.
The 3rd is with mostly the editors, but that one truly is a hack and you could surpass it with the example given above.
06/17/2004 (11:11 am)
We did the hack kinda thing I think, but we removed some code too.Three binaries. The 1st is without editors and the ability to create servers.
The 2nd is without sound, gui, editors and alot of other stuff.
The 3rd is with mostly the editors, but that one truly is a hack and you could surpass it with the example given above.
#7
06/17/2004 (11:33 am)
The script pieces of the application require a good deal of splitting as well. However, there is so little code there in relationship to the app itself that it should be mostly trivial.
#8
06/17/2004 (3:47 pm)
Have you looked at TNL? www.opentnl.org - if you're not going for a game, then Torque might be overkill. :)
#9
06/17/2004 (5:13 pm)
Sure have. Torque has the rendering, physics, collision detection and map system that I'm looking for.
Associate Kyle Carter