Game Development Community

Using a TNL server with a TGB client

by Chenebit Francois · in Torque Game Builder · 12/13/2008 (4:03 am) · 1 replies

Hello everyone.

I'm sorry if i ask a question already solved, but i couldn't find an answer. Also, I plead you to forgive my bad english.

My problem is i want to make a game with TGB, that will be in 2 different processes. One will be the player interface, and will be done using TGB. The other will be the game engine, used to manage all game logic and AI. I've already made a part of it in C++. I want to interface both of them, on the same computer or through internet.

As far is I know, there are network functions inside TGB, but there are supposed to connect 2 process made in TGB : a TGB client and a TGB server. I first thought to use SDL_Net on server and use these functions on client side. As I own a TGB Pro license, I hoped to understand the TGB network protocol, and to build the corresponding server part in C++, as i supposed the everything is based on BSD sockets.

But with further reading, I found some TNL documentation. As far as I understand, the TNL was the netwok library of the TGE that has been externalized. TGB is in part based on this library, but because of implementation problems on TGB objects, there are some differences.

As my communication between server and client could be made with just standard C type (int, double or char*), I suppose I can get with TNL, and that it will be easier, as the 2 products are supposed to be quit close.

My question is how to do this : how to build using TNL a server side of a TGB client, is there a tutorial or an article somewhere that can help me ? Whiche part of TNL has been included inside TGB ? Will it be easier to get along with SDL_Net, or will TNL spare me some difficulties.

Thank you in advance.

Regards.

PS : i'm not trying to do real networking inside TGB. I precise because it seems to be a common interrogation when talking about TNL.Hello everyone.

#1
12/29/2008 (3:02 pm)
Hello again

As I don't get any answer to my preceding question, I tried by myself to get a TGN client to work with a TNL server. Nothing seems to work and i don't succeed to make even a connection.

So i try another things : extract from the TGB engine code the network part, to use it inside my own server. But I don't succeed either. TGB engine code is very difficult to read, and each time I include a file in my project, it seems it needs some more file to get anywhere.

I'm a bit lost now, and don't really now how to get what i want.

Is there a way to have my TGB game to communicate with another programs ?

Thanks in advance.

Regards