Does anyone know how to create a client updater using panda3D? Like the one on MMORPG games that check if the client is updated and if not, download the said updates and overwrite the old files. I’m thinking of creating a seperate program for the client patcher and the actual client-side game to overwrite the game files easily.
Any ideas or suggestions will be very helpful. Thanks!
(Also, has anyone used httpbackup.exe on the bin folder of panda3d?)
One way you could do it is set a file inside your game for “verisons” on the client side, have a it read the file, if file doesnt = file on server side, see where it its at.
client file versions : 22.214.171.124
server file versions: 126.96.36.199 <–this being the big jump
small jump verisons:
- If client file doesnt = server file read client file versions “188.8.131.52”.
- Check for verisons that go between or just download the big jump.
Note: If you do the big jump, it may have programs in size, order, lost files, or not have the right files to do with it.
The download file can have a program wrap around the texts files and have it change out the code inside by simply reading it and copying in the new code.
As for a .exe, I remember just googling and found a .exe updater one time. It check the old .exe and compared it to the new .exe and it made the new changes into its own .exe so all you have to do it click and run it.
The game resources can be distributed as multifiles (look under panda/bin/multify.exe -h) which are loaded with VirtualFilesystem. These can be diffed and patched with bin/apply_patch and bin/build_patch. You can get the sources for these and integrate them into your patcher program.
As for game code, it depends how you distribute it. If you build it into an exe you could have your updater program patch the exe. Bare .py/.pyc would be a different matter, probably easiest to just download those with python and over write your original files.
I was looking for a way to put your code files inside multi files, but so far I have not accomplished this. Stay tuned.
Thanks for the replies. I was planning to use multify.exe and patch using the apply_patch.exe. I was only wondering if build_patch.exe also takes into consideration the newly added files in the updated multifile. Has anyone ever tried using build_patch.exe?
As far as build_patch is concerned, a newly-added component file is just an additional bitstream in the middle of the multifile, so it handles it properly.