Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Game Launcher


Ertzel
 Share

Recommended Posts

_**Game Launcher**_

**Developed By: Ertze**l

_**Overview**_

This program can be used by anyone to automatically update files from a webhost to a computer.

_**Info**_

Everything related to this launcher is coded in C# and was done by me for an engine I am working on. I decided to make the Launcher something that I could post on here for other people to use on their own Eclpse or non-Eclipse projects.

The way this launcher works is: You upload a checksum file to your webhost that holds the data to all of your files also on the webhost you wish to update (This file is created by the Checksum Builder included with the launcher). You then simple upload all of your files you wish to download to your host. (Files that go in a folder on the computer are to go in their own subdirectory with that folder name)

When the user first starts up the launcher it will download that checksum file you put online and will use it to check if your client has all of those files or not. If they do it will mark the status of that file as "Pending…" and if they don't it will be marked as "Missing..." When the user clicks on the Update button it will scan through the list of files from that checksum file and if the file is marked as Missing it will automatically download it to the appropriate folder on your computer (It will create the folder if the path is missing). If the file is marked as Pending, it will then check the checksum value of that file from the checksum file compared against the value of the file the client already has. If the values match up it will be marked as Up To Date! and be skipped. If they do not match up it will replace the clients program with the one on your host.

_**How To Use**_

To use this launcher you will need access to a C# compiler as there are certain things you need to change. You will need to go to the frmMain.cs file in the Launcher solution and edit a few variables.

First change the downloadPath value to the full url of your host.

Next change the webNews.Url valye to the url of the webpage you will be using to display your news.

After that change client value to your clients name (and directory if its not in the base directory).

Then if you do not save your checksum file as Eclipse.checksum, you will need to change that anywhere where you see it in the source.

Finally any custom changes you want to make (like the layout or graphics).

Once you have done all of that, compile it and your ready to start using it.

To update you will want to create a folder (something like "Updates") and place all of your files/folders into it. Then launch the Checksum Builder program and select that folder and click on Build Checksum (again, if you don't name it Eclipse.checksum you will need to change that in the Launcher's source). Once you have that file upload it and everything from your Updates folder onto your host. When you make any new updates just replace the current file with the new one in your host and replace the checksum file with the updated one.

Then send out your updater to your clients and they can begin using it! (if you didn't include certain files needed to run your program into the updates then make sure you send them with the updater).

Example of a checksum file: [http://pastebin.com/VBQqV8D7](http://pastebin.com/VBQqV8D7)

_**Screen Shots**_

>! News
>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/598486549fd70ac5d5108ef5e2f3f7fd.png)
>! On Load
>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/d28498324a942ff5d718054ad1caa225.png)
>! Finished Updating
>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/d7777b4480e860674d7bebacef22d891.png)
>! Checksum Builder
>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/31b52c998a96e52c180b6bac871d8cec.png)
>! **Download:** **(Coming soon…)**
Link to comment
Share on other sites

> Btw shouldnt this be in Resources?

Good point, moved it.

> Good stuff.
>
> A lot of ppl will request a compiled version with an editable .ini file.

Ya, when I started making it, I was basing it off of my own engine so I didn't bother with .ini shit. I'll probably end up changing those variables to be loaded through a .ini or some sort of file before I release the download link though so people can do it without C#. It's an easy change once I get around to doing it.
Link to comment
Share on other sites

Although I made it in Visual Studio 2012, you just need anything that can compile C# code to make the changes…

I will work on making certain things stored in an Ini and also editable graphics files for the background and buttons for those people who are to lazy to edit the source or are too nubby to follow basic instructions (Although if you can't figure out how to edit those things you probably will duck up the Checksum and uploading of the files).
Link to comment
Share on other sites

Okay, so after a few failed attempts at trying to save/edit the changeable data by using the launcher's settings file via a SettingsEditor program I made, I gave in and made a data file that stores the info.

Although I still didn't make it just a shitty ini file. Now you use the Settings Editor to edit your news url, upload url, client name (the program launched when the user presses play) and your checksum file name. You then click Save Settings and it will create a data.config file that holds all your settings but they are encrypted (because plain text is lame).

You then ship this file with your launcher and it reads from it to set up those variables. I'm still looking into a way of not needing this data file, but for now this will do.

Example of the settings Editor:
>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/53eee1414a7c81347e3b105742360d9f.png)
Link to comment
Share on other sites

Ya, I just kind of ignored that… But thanks for posting so I don't have to double-post!

Another quick update. You can now customize the background, player button, update button and icon images. I have default ones stored in a graphics file that will come with the launcher, you just edit those images and they are loaded into the launcher when you run it.

I fail at graphics and also purposely made them shitty looking so people will use their own and not stay with the default ones (and if you do, your only making your game look bad with them)

Here is the new look:
>! ![](http://www.freemmorpgmaker.com/files/imagehost/pics/21b7bca10a5b8b0844f434125433cc9c.png)

I also added another textbox to the Settings Editor that allows you to change the text displayed at the top of the Launcher (by default it says Eclipse Launcher)
Link to comment
Share on other sites

I think it would be better to not make INIs, you should make another separate configuration where you type the websites, names and blah blah blah, and that would make sort of an INI, but one "codified") like instead of

website=example.com

it would be sort of

$*+4 ¿_ @#¡‰

but the launcher should still be able to read it, by decoding it.

Ups, i meant separate configuration program, that only the administrator of the game would have.
Link to comment
Share on other sites

Which is exactly what I did and posted about in the post 3 above yours…

I made a Settings Editor that is used to create a config file thats encrypted. The admins uses this editor to create the file that is send with the launcher.
Link to comment
Share on other sites

It's now setup so if you know basic C# you can edit the settings file and delete the data.config file. if the data.config file is not present the Launcher will load its data out of the settings.

Also fixed a few small bugs with file placement and making it so it doesn't matter what folder your config file or checksum file is in, as long as its in a folder thats part of the main path of the launcher.

Another small change is the launcher goes through and deletes any programs/files/folders that are not in the checksum file (so its not part of the launcher or game). That way you can delete old files by simply removing them from the checksum on your next update patch.
Link to comment
Share on other sites

Sometime next week most likely. I need to fix a bug with downloading .exe programs and then do some testing with large downloads to make sure everything is working.

Then I need to go over the code and clean it all up and reduce anything I can as I was learning how to do all this as I went and the code is very messy and unorganized right now…
Link to comment
Share on other sites

Another little update. I'm trying to make this as nub-friendly as posable so I am expanding the Settings Editor. You can still edit all of the settings as before, but there is also now a UI editor as part of it. The UI editor mimics the default look of the Launcher and has options to:

- change the size of the whole launcher form

- Change the X/Y location and Width/Height of the main Panel (holding the news/update windows), Update text box, progress bar, play button and update button.

This editor will then save that data to the same place the general settings are saved to and your launcher will load off of them to have your custom look. This way people can edit the look of their whole launcher without needing to touch any code if they don't know how to do it properly.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...