Game file patch program...

This is a discussion on Game file patch program... within the Game Programming forums, part of the General Programming Boards category; A big problem at LAN parties is the fact that we have all these custom maps/files that we have and ...

  1. #1
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331

    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?

  2. #2
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704

    HRm.

    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.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  3. #3
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    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?
    Last edited by RoD; 01-26-2003 at 01:41 PM.

  4. #4
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    That calls for serious piece of knowledge on Win32 Sockets!

  5. #5
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    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...

  6. #6
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    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.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  7. #7
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    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.

  8. #8
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    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) (1n or 0ff). 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.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  9. #9
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    hmm ok so how would i go about starting to create this, what is involved what do i need etc.

  10. #10
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640
    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

  11. #11
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    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?

  12. #12
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    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
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  13. #13
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    i'll take a look. Is there any specific part of this i should learn?

  14. #14
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  3. sequential file program
    By needhelpbad in forum C Programming
    Replies: 80
    Last Post: 06-08-2008, 01:04 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21