Game Development Community

Clients sending files to each other

by Nick "Dig" Koirala · in Torque Game Engine · 06/21/2003 (7:57 pm) · 3 replies

Any functions already included that would help with this:

I was thinking of letting clients choose 'avatars' which they could make themselves, or be photos of themselves that are used in various ways in the game, they'll only be small bitmaps (like the GarageGames profile pics) but how can I get them distributed to everyone in the game?

I think artwork isn't automatically sent over the network when you connect, or am I confused here?

Any ideas?

Cheers,
Nick

#1
06/21/2003 (8:11 pm)
I was going to do this, except for player skin downloading. Basically the functionality I came up with is this: (keep in mind this is just rough)

The server machine maintains two queues:
1) a send queue
2) a download queue

The server then iterates through the send queue and for each client
in the queue it creates a connection between that client and the
next client in line on the download queue.

The sending client is then responsible for uploading its file to the
recieving client. Once the file is finished uploading to that client
the sending client sends an event to the server noting this. The server
should then destroy the connection between the clients and establish a
new connection from the sending client to the next client in the download
queue.

Once that sending client has sent to everyone in the download queue the server
iterates to the next client in the send queue and rebuilds the client download
queue for that client. The process then continues as illustrated above.

If a new client joins a game in progress then the process is done as illustrated
above except for only this client.

The reason I'm using this three tierd structure is for security reasons. The server
always maintains a list of clients, not the clients themselves, and using this three
layered process prevents a client from having access to other client objects.

Using this method you could also adapt the httpObject class for establishing and
maintaining the connection between the clients. I would also throttle the send packets
as to not interupt the game play.
#2
11/14/2005 (6:09 am)
Did anything ever come out of this? I think I would be able to use this.
#3
06/21/2006 (11:54 am)
I would also be interested in this. In my game, a client sets a picture as part of his/her profile. I would like the other clients to be able to see this picture. How do I get the image file from client to server to all clients?