Easy Network Question

Blitz3D Forums/Blitz3D Beginners Area/Easy Network Question

BLaBZ(Posted 2009) [#1]
I'm in the process of developing an RTS game with many units.

There locations each need to sent to their host, im wondering the best way to do this, fastest, accurate efficient etc.

do you send data constantly updating each units position?

or would the client check to see if unit data has changed, then send it?

or would you submit just the client interaction(such as the client choose to move here, the server can figure the rest out)?

thanks!!


Matty(Posted 2009) [#2]
What I would do, and there are many ways of doing this:

Let the server simulate all the action as normal. Only send to the clients the information about units they could expect to see, on a fairly regular basis - say every 50 milliseconds, otherwise 'predict' where/what the client's units are doing.

Secondly, the client only needs to tell the server what units have been given an order, and what that order was.

There are other methods but that is what I would as it is possibly the easiest of them.


chrisnorris007(Posted 2009) [#3]
I agree completely. I have a 3d mmorpg engine i am working on and I have developed an entire "language: as you would have it..

a simple message looks like this

1,3,1,-3.43,32,23,0,32,0,chris

that would be 1=movement 3=entitynumber the rest is, in order x,y,z,xr,yr,zr,name

a message for chatting would be

4,3,this is a test for a global message

its always nice to layout what you are trying to do network wise (what codes mean what)

I use a splitdata function to split the comma delimited data if you would like that function, I can provide it to you, as I took it from someone on here as well :)

any other way I can help, let me know

Chris


Blitzplotter(Posted 2009) [#4]
I agree with Matty & Chris, Chris I like the format of your data structure - very well thought out.

I developed some of Wings code a while back to allow communication between up to 20 clients & a server. Used a data packet of about 512 bytes, I updated the clients every 150 msecs or so. Networking can be done effectively within BLitz3d code.