Game Development Community

This just in! Automatic mission downloading...

by Mark Frohnmayer · in Torque Game Engine · 04/01/2002 (10:30 pm) · 23 replies

Hey all,

Just did a checkin that allows the server to download mission specific data (terrains, interiors, textures, etc) to the client on connect.

For a long time we thought getting this to work in Torque was going to be a real pain, but it turned out to be easier, if hackier, than we thought... today's version only supports resource downloading of ghost object resources (ie - not datablocks), but tomorrow I'm going to try to get downloading of datablock resources in.

The basics of how it works... when the server ghosts the "Ghost Always" objects to the client - which includes the terrain and interiors, the client generates a list of resources that failed to load. It then sends this list back to the server and the server downloads files it has that the client doesn't have. It then restarts the ghost always phase and tries again. It is possible because of the hierarchy of file dependencies that the ghosting process will be reset multiple times.

One very lame thing about this process is that the search procedure for textures on the client generates a huge number of missing files, since for any texture it will search for base name, .jpg, .png, etc, down the full path to the shape. For this reason, the client will actually send up to 32 file names per event to the server, which the bitstream then compresses way down (deltas off the previous string) - it's a hack, but it works out well because of the way the bitstream compresses sequentially sent strings.

This code hasn't been well tested (just me on my machine), so if anyone wants to really bang on it, give it a try.
Page«First 1 2 Next»
#21
04/03/2002 (11:29 am)
Ok got it down to 1 problem. The netDownload.cc file or it's association. I went so far as to reinstall VC6, re SP5 it, and setup batch dos env variables for VC. Also made sure nasw.exe was present and accounted for.

I am compiling head in c:\programming\main\torque.
I have the file netDownload.cc in c:\programming\main\torque\engine\sim.
Looks like the latest head placed it there. I didn't have to.

Also checked c:\programming\mail\torque\engine\targets.torque.mk make
file

And the following line was present in source.sim=\ section.

sim/netDownload.cc \

Randy...
#22
04/03/2002 (11:44 am)
Ok SiW helped me figure this out. I had to put the file into VC.

Thanks everyone.
#23
04/03/2002 (2:59 pm)
ok, so I compiled, cool, then i deleted some dif files from my client, started a server and bang:

onFileChunkReceived: Unknown command.

is this the echo back to the console for a successful download?
Page«First 1 2 Next»