How to Make a Game Launcher and an Auto Updater With WPF | C# Game Launcher Tutorial

39
3



In this launcher tutorial you’ll learn how to make a game launcher and an auto updater for your Unity (or other) games.
If you get stuck or have questions, ask them on my Discord server:

⮞ Source code:
⮞ Google Drive link converter:

⮞ Support me on Ko-fi:
⮞ Website:
⮞ Instagram:
⮞ GitHub:

In this game launcher tutorial, we set up a launcher that can also automatically install updates for players. When I created a launcher and auto updater for my Unity multiplayer game in one of my devlogs, I got a lot of comments asking for a tutorial on how to do this, so here it is!

By the end of this tutorial, you’ll know how to make a launcher and game updater for your Unity games. You can also use it to automatically update games built with other engines—even regular applications will work!

#UnityTutorial #GameLauncher #Unity3D #AutoUpdater #GameDev

Nguồn: https://uwallpaperhd.com/

Xem thêm bài viết khác: https://uwallpaperhd.com/game/

39 COMMENTS

  1. Here's the source code: https://github.com/tom-weiland/csharp-game-launcher

    If you've run into issues with the zip file not extracting properly, it may be caused by Google Drive sometimes showing a confirmation page when downloading files. This prevents the zip file from downloading properly, which in turn means that it can't be unzipped. Unfortunately I never ran into this problem myself when building my launcher, so I wasn't able to account for it in this video, but here's a StackOverflow answer that mentions a GitHub repo which you should be able to use to circumvent the popup: https://stackoverflow.com/a/44402826
    From my research it sounds like the confirmation only pops up if the file is larger than a certain size, although I'm not sure what that threshold is. The SO answer claims that it's 50mb (my zipped folder was 20mb), but others have apparently gotten the popup with files under 30mb.

    This error should only occur when using Google Drive (or any other storage services that may prompt you to confirm a download), so if you aren't using that to host your files you won't run into this. For testing purposes you can also use a file path on your computer as the download link!

  2. How do I change the directory where it installs? I want my game to create a folder on the first-time install, in C:eLlama StudiosGameFolder. And every time after that, I want it to remove the old version and install the new version.
    Thanks!

  3. I have a error in the Code:

    CS0103 The name version text does not exist in the current context. 2x
    ) expected 1x

    Can you please help me? I just copied the code from github. i dunno if i missed anything, but then, can you tell me in what a line? (I mean the error with the Version Text)

    But i dont understand the second error. I should be checking it.

  4. i had an Error but i dont know why
    https://prnt.sc/st4bf8
    i dont know why but it works since i deleted empty lines and i think i installed .Net core v.5

  5. For me the update is always missing (error finishing download: system.io.infaltedDataExpanshion) and other errors. what should i do?
    PS: I have to write it down because I cannot copy and I am taken for the spelling that I am bad in English
    Edit: i have screen shot the error you can look the error at here: https://drive.google.com/file/d/1tAFNgAAUSfbOg_R2qicBL1mFBAekI_nu/view?usp=sharing

  6. Would this also work to retrieve the game files from a github repository? Or do I need to use a service that can host a .zip file like Google Drive?

  7. Very good and useful tutorial, my problem is that my users are now complaining about the fact that they have to install the .NET core framework.
    Already tried to converting the entire code to .NET but somehow it doesn't do anything on start up, in .NET Core everything works perfectly fine.

  8. At 4:20 / 12:04 The .Content is red marked to me. How to fix? (Edit i made it a window form application instead still possible?)

  9. Amazing tutorial, very helpful! Anyone else try to type in the direct download link to try and get the game lmao

  10. hey dude can you please work on that game i would love another pirate game there arent much good ones arround that are new

  11. Hi im doing the launcher and in the DownloadingGameCompleteCallback there is a error with : ZipFile.ExtractToDirectory(gameZip, rootPath, true);

    Can someone pls help

  12. Eh i suggest you reedit the video because you put a missing warning out.
    Google Drive and other things actually start to block files or even block accounts if your links get to much traffic. (Google just blocks the file for a longer time)
    Some are big but most of them are actually quite small.
    So I would not suggest to simply host it anywhere and forget it.

  13. Hm weird I can only open that project with VS 2019 not 2017 or 2015 🤔
    It doesnt matter but I just wonder why it is like that^^

    Thanks again for the GitHub and all of ur Vids <3

  14. If your gonna make a launcher for multiple platforms you will need to use something like Electron or QT creator

  15. EWW!
    Why would you make one in C#, you could just make one using something like electron rather than C#. Then you don't have to struggle with porting the launcher.

  16. ima take thiis and us this for all my games so you only need to have the launcher and you can choose what game you want

  17. Did you spend the time coding this previously then copied off that code, or does everything just naturally go well for you?

  18. Tutorial is excellent, as always! I'd add more specific error trapping to give the user more info on how to solve problems. Also I would write an Equals/Hash pair for the version number struct.

    Loving the tutorials, tho, they're great!

    Like the new end screen, forgotten that I'd appear on it.

  19. Hey, awesome tutorial im just getting this one error. my zip folder only downloads to 39 kb then I get the error: System.IO.InvalidDataException:End of Central Directory record could not be found. any help would be awesome cheers!

  20. Can you make a tutorial for multiplayer about walking animations? Edit: "And also: Thanks for your good tutorials :D"

  21. I think I'm gonna try this out! It will be very useful when developing a game because it is updating frequently. This will make it much easier for testers to get the constant new updates. Also nice end screen. You just need to fit in the subscribe card somewhere…

  22. As a tip if you're using a high resolution picture (in my case 10929 by 5553)and get wierd artifacts use the <Image.Source> and <BitmapImage> elements and set the DecodePixel-Height/Width of the BitmapImage to the desired resolution that fixed it for me.
    For example:

    <Image Stretch="UniformToFill">

    <Image.Source>

    <BitmapImage DecodePixelWidth="1920" DecodePixelHeight="1080" UriSource="{Binding MainImage}"/>

    </Image.Source>

    </Image>

LEAVE A REPLY

Please enter your comment!
Please enter your name here