View Full Version : Game file patch program...
A big problem at LAN parties is the fact that we have all these custom maps/files that we have and no one else does, for half-life. This means we spend an hour transferring all over the network, and its hectic. I want to take all of these files in one big swoop, and write a program that when run on a client machine, takes all these files and patches them in. So the exe is on our server, we run it from our pc, and it patches us up-to-date with each other.
Is this possible? If so what am i looking at to do it?
Jeremy G
01-26-2003, 01:07 PM
Perhaps you could write a program that has a list of the servers game folder. The list would be of all the .zip or pak files (ie: q3 = .pk3) when the people get connected through the lan, they run the exe that then searches the clients game folder. Any missing zips are then copied to his folder automaticly. You could also add an update function, where people can send the server new zips, and the directory list is updated.
hmm not bad of an idea, but i would rather it moved actual files to the correct direcotrs as opposed to a zip. I want it to be fully auto once the db click the exe they shouldn't have to do anything else but load HL after it finishes.
I do like the check-files idea tho. The program could check to see which files are missing, if they are, put em there. a quick algo might be
Lan Connected
Check for files on client pcs that aren't on server in HL folders
Upload these files to update folder on server
If not found, move on
When all clients checked
Prompt clients to upgrade HL
If yes check client pcs for missing files
install files
if no exit
When done tell user
end
This way no one has to click any exe, it all happens at once. In the background all files the server doens't yet have it will have, then everyone is prompted to upgrade and brough to same level, possible?
Travis Dane
01-26-2003, 02:51 PM
That calls for serious piece of knowledge on Win32 Sockets!
which i don't have.....hmm i wouldn't know where to begin with this, but i have a few good weeks. Till like end of feb/march...
Jeremy G
01-26-2003, 03:43 PM
I said zip and pak becuase generally (from the games i play) game files are usual paks, wads etc. so yeh, just check for the game files and send them auto maticaly.
Also, I dont see a problem if the lan-ees have to click an exe to start the process. I mean clicking the exe once to get updated to all the needed paks and then being able to launch the game and join right in is MUCH easier then the general file swapping that usualy goes on at lans.
just keep the exe in the shared folder so as soon as your connected you open up the servers folder, click click, and your ready to play in a few minutes.
should i have the server program grab files it doens't have when a user clicks the exe or while the computers login, because if it has to grap on exe execute then someones update may be outdated soon as someone else runs it.
Jeremy G
01-26-2003, 04:41 PM
Well, since the computers are lanned, instead of ending the program after it updates the client, set it to idle in the background. Now, you can add a new feature to the program.
1.) The server can keep the options.cfg in his half life directory. in the .cfg theres "Auto_Update_Clients 1) (1:on or 0:off). IF set to one, when ever a new person connects to a lan, and executes the updater, it uploads all his files the server doesnt have. When he is done, the server goes through the listed of users (that have the program idle in backgroudn while they play) and sends them the game files while they play. This will probably lag the clients one at a time for a few minutes while they download, so when your doing tournaments, set auto update to 0, and when your just goofing around set it to 1.
hmm ok so how would i go about starting to create this, what is involved what do i need etc.
Travis Dane
01-26-2003, 05:25 PM
Just a question about network programming in between:
Is it possible to just use normal <fstream> when reading
files over a network that are shared?
like: \\testcomputer\\temp\\afile.txt
Originally posted by Travis Dane
Just a question about network programming in between:
Is it possible to just use normal <fstream> when reading
files over a network that are shared?
like: \\testcomputer\\temp\\afile.txt
i think it is, don't quote me :P
I have no idea where to start with this, any ideas?
Jeremy G
01-27-2003, 02:15 PM
Start with winsock. I've done some basic stuff with it. Its not too difficult to use.
http://iradis.free.fr/winsocktutorial/
http://www.code-world.de/c/tutorials/index.php
i'll take a look. Is there any specific part of this i should learn?
Jeremy G
01-28-2003, 10:44 AM
Well, since you intend to be sending data (game files) (needed game files) your going to have to come up with a nice package that can be sent through the connection. And your going to need to know how to convert that package into a bite array i think (from vb experiance, may be easier with c++) Basicaly just start reading examples and tutorials.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.