Game Development Community

Simple question about TNL

by Anthony Wall · in Torque Game Engine · 03/01/2005 (2:12 am) · 1 replies

Hi,

I was just wondering how most people would use TNL.

You have an object created on the server that gets ghosted to the clients. Is there a special way to send what the client input is? Or do you just keep track of the client input and send it all with the next packet to get interpreted by the server and used on the server object?

Basically, do you make the client edit the object the client can control? Or do you send what commands the client is issuing and have the server apply them to the clients object?

I think Zap does the latter, is that right?

And the latter aproach allows for prediction and means you don't need to have an RPC for each button the client can press.

I suppose I have answered my own question, just wanted to check.

And, i havent checked the newest source yet, but is there a simple way to send files without having to chop it and send it through? I'm very lazy.

I basically wanted something like this http://www.rakkarsoft.com/raknet/manual/detailedimplementation.html, I can't find a page like this in the docs.

About the author


#1
03/01/2005 (8:50 am)
To answer your questions,

1. Yes, Zap sends the actual Move commands to the server, which then applies them to the client's Control Object. This makes sure that the client isn't cheating (ie. sending position packets that are not possible for that client to reach, etc.)

2. Right now all the RPCs are limited by the maximum size of a packet. So you'd have to break the file up into chunks and send each one seperately... which would still be pretty easy - just send ByteBufferPtrs as guaranteed RPCs and then append them on the remote host.

3. There is a simple "Hello, World!" tutorial in the TNL docs: opentnl.sourceforge.net/doxydocs/simpletutorial.html