TGE Server, TGEA clients with TCPObject connection
by Guimo · in Torque Game Engine · 02/26/2008 (3:52 pm) · 1 replies
Hi all,
My game works using a client/server archiecture using TGEA. I was previoulsy using my own engine but now Im moving it to Torque. Some shots: (http://www.spritekin.com/warscale/screenshots.html)
The game does not use an standar TGE architecture so the clients connect to the master and shard servers using a TCPObject and pass messages back and forth coordinating the players (in this case a dedicated server does not satisfy my requirements because there may be many games running in the same server and they can be started and stoppend by the clients at any time, thats why I'm implementing the game like this).
Each client runs a simulation in its own desktop but the server validates every move in order to make sure nobody cheats.
My question is, As I'm using only a TCPObject as communication. Is it possible to run a TGE server and TGEA clients without problem?
The answer should be positive but theres come a catch. Will it work if the TGE server is running in a Linux (or Mac) box while the clients run in Windows? Will there be endianness problems? (yes, I'm passing binary information in the packets like S32 values).
The question comes because I have just noticed that I'm in fact only connecting with TCP and that means that in theory it should be possible to implement many versions of the clients (in TGE, TGEA, TGB, TorqueX, TorqueWii) and make them connect to the servers in fact allowing for multiplatform support.
If someone may comment on this Im all ears.
Luck!
Guimo
My game works using a client/server archiecture using TGEA. I was previoulsy using my own engine but now Im moving it to Torque. Some shots: (http://www.spritekin.com/warscale/screenshots.html)
The game does not use an standar TGE architecture so the clients connect to the master and shard servers using a TCPObject and pass messages back and forth coordinating the players (in this case a dedicated server does not satisfy my requirements because there may be many games running in the same server and they can be started and stoppend by the clients at any time, thats why I'm implementing the game like this).
Each client runs a simulation in its own desktop but the server validates every move in order to make sure nobody cheats.
My question is, As I'm using only a TCPObject as communication. Is it possible to run a TGE server and TGEA clients without problem?
The answer should be positive but theres come a catch. Will it work if the TGE server is running in a Linux (or Mac) box while the clients run in Windows? Will there be endianness problems? (yes, I'm passing binary information in the packets like S32 values).
The question comes because I have just noticed that I'm in fact only connecting with TCP and that means that in theory it should be possible to implement many versions of the clients (in TGE, TGEA, TGB, TorqueX, TorqueWii) and make them connect to the servers in fact allowing for multiplatform support.
If someone may comment on this Im all ears.
Luck!
Guimo
About the author
Torque Owner Stefan Lundmark
You'll possibly run into problems with the Windows timer in regards to the platform code in Torque, but it'll be minor if you get it. Perhaps they even fixed it in 1.5, I know Clark was working on it.