Initial Data Transfer

Hello

I am currenntly using the darkstar server for my small game. The message system seems to be designed for text based messages from client to server, based upon pre defined actions. But what about data-transfer, where I want to transfer the current game state. I cant seem to find an easy way todo it, how is it supported in darkstar, only through byte arrays?

Hi

You can put anything you want in byte arrays. Most of my data is not text, including my initial state data. There is a size limit on messages in SGS of 64k bytes, if you want to shift more, you either need to break the message down, or use some other transport, like http. An example someone mentioned was map/heightfield for a game area. It’s static data shipped from the server to the client. This came to more than 64k, and the suggestion was to serve it up from a normal web server, and just send the url from darkstar.

HTH

Endolf

Endolf’s right,

For static content think about using a webserver to serve up content. They are designed for this and are very fast at delivering static data quickly and efficiently.

If you are talking about synchronizing user and world state data between the client and server, Darkstar provides the tools to aid you in this but that is it.

You’ll find that the way games replicate data between client and server can be very game specific. You have some games that may replicate an exact copy of server data on the client. Others may treat the client more as a dumb terminal and only send it commands to update the visual state, keeping all of the real details on the server. Then other games may be the exact oposite. The server acts as a match maker but once the clients know about each other, they leave the server out of the equation and talk directly.

With Darkstar you can build any one of these forms of games but you have to put all the pieces together yourself. It’s more concerned with the more complex piece of the game puzzle, core server technology. Think of it as the Application server of the game world, and you get to write the browser.

I see, thankyou for your replies

The guys said it all 8)

God your getting so good soon you won’t need me.

To fix a misconception though, the API is actually designed for pushing generic data.

If it were designed for text, we’d have used Strings 8)