C
C#•8mo ago
Barrow

Wpf Game Launcher

Hi guys! I'm fairly new to C# coding yet i decided to try and give it a crack. I have been trying to create a Game Launcher for our private game me and some buddies play. I have gotten multiple function to work, such as a Play Button that launches the games .exe, removing the cache as Play is clicked. Website/Discord/Donate button that opens up an Url. But now comes the tricky part... We push out our game updates via Patch files that get stored inside the Data folder of the game. I need to somehow/someway be able to make the Game Launcher check if you have the most recent and updated patches, if not it will download and replace the patches in your Datafolder. I have been cracking my head for a few hours now trying to come up with a way on how to do this, but i'm not skilled enough to accomplish that. Is there anyone that has done this before or can give me pointer on how i should approach it? Best Regards, and sorry if i'm asking an absolute rookie question.
14 Replies
Anchy
Anchy•8mo ago
I assume you are talking about a World of Warcraft private server based off the description. Look at creating a checksum for each of your patch files and then comparing those checksums against the checksums of the patches you keep in the cloud. If they don't match then you can continue with patching
Barrow
BarrowOP•8mo ago
Hmmm i figured it would be something like that. But how would i store the patches or would i upload them to google drive or another downloading service? I figured y'all would figure the WoW part out fairly quickly lol
Anchy
Anchy•8mo ago
If you want to keep it simple, serve them as a static file on your website, then also serve a json file which has metadata about your patch files.
{
"patch-a": {
"checksum": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"
},
"patch-b": {
"checksum": "04d13fd0aa6f0197cf2c999019a607c36c81eb9f"
}
}
{
"patch-a": {
"checksum": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"
},
"patch-b": {
"checksum": "04d13fd0aa6f0197cf2c999019a607c36c81eb9f"
}
}
this is just an example, but you would store this as a static file on your website and then deserialize that into your wpf application obviously this file would need to be regenerated everytime your patch files change so the client can detect the checksum has changed
Barrow
BarrowOP•8mo ago
So in a sense i could approach it like this, ( my bad if this sounds very noobish lmao) I could put a JSON file on my google drive that contains a format like that but maybe with a download link also attached to it. Let the launcher check that file on my drive and use the links if the Checksum doesn't match up? Or is that impossible
Anchy
Anchy•8mo ago
or you could build a minimal api which has a couple of endpoints to serve metadata and serve the files why not use your website where you users register?
Barrow
BarrowOP•8mo ago
Well the website is very simple and we lost our Website developer, so we kind of are stuck with a website we can't manage or acces the files off :/
Anchy
Anchy•8mo ago
you should probably solve that problem, if you can't access the files to your own site yikes
Barrow
BarrowOP•8mo ago
Heh, we're working on it. But nowadays almost everything goes through Discord to be honest. Our last Webdeveloper did leave a little patch panel inside the Website, i could possibly use that and attach a JSON file to it i guess.. So that would be the easiest approach in your opinion?
Anchy
Anchy•8mo ago
yes its very simple and straight forward
Barrow
BarrowOP•8mo ago
Alright, i'll look into that Checksum thing and try to come up with something. Time for some good ol' trial and error time. Thanks alot for the reply and help! @Anchy
Anchy
Anchy•8mo ago
np, you can message me directly if you want more advice in the area you are talking about as I have a little bit of experience
Buddy
Buddy•8mo ago
Note that wow private servers arent legal. Hence why we generally cannot help with it.
Barrow
BarrowOP•8mo ago
Hence why i just mentioned a private project 🙂 if it's not allowed i'll delete the post
Anchy
Anchy•8mo ago
ah rip
Want results from more Discord servers?
Add your server