1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Windows Game Auto Updating System!

Discussion in 'Tutorials' started by HanProgramer2000, Nov 27, 2016.

  1. Game Updater System 1.0
    GM Version: studio 1.99.0+
    Target Platform: WINDOWS
    Download: DOWNLOAD
    Links: n/a.

    Screenshots: n/a


    this tutorial will teach you guys to make an auto updater app for your game! using dropbox as your game database.

    Game normally will update every times, each new updates means more features! so, today im gonna teach you guys how to make a cool self updating games!

    the main function we're going to use is the
    http_get_file(url, destination)
    With this function, you can connect to the specified URL in order to retrieve information in the form of a file. As this is an asynchronous function, GameMaker: Studio will not block while waiting for a reply, but will keep on running unless it gets callback information. This information will be in the form of a string and will trigger an Async Event in any instance that has one defined in their object properties.

    This event will generate a "call back" which is picked up by any HTTP Events, in which case it will generate a ds_map (more commonly known as a "dictionary") that is exclusive to this event and is stored in the special variable async_load. This ds_map will contain different values depending on the data being returned, ie: the event will trigger multiple times as each packet of data is received so that you can show a progress bar, for example.

    Simple Description:
    this function will download stuff to the 'destination' argument
    http_get_file(dl.dropbox.com, "\download\game.ini") ; //must be "dl." and not "www. "

    so, the idea is:
    download a file from the dl.dropbox.com/****** and just read the files a.k.a the ini_read_real(section, key, default_value) and if the current version, which is created when you launch the game is < update_version than it cause an update.

    hope it'll help you guys:).
  2. gnysek

    gnysek Member

    Jun 20, 2016
    First: there's no GMS 1.99 version
    Second: this won't replace current game, just download installer
    Third: if you read right after http_get_file, file may be yet not downloaded
    Fourth: you can do this with http_get and ASYNC event, then you don't need to download anything.
  3. Bingdom

    Bingdom Googledom

    Jul 1, 2016
    Wrong! :p
  4. Seabass (The Human)

    Seabass (The Human) Member

    Jun 20, 2016
    There is no version 1.99, there is 1.99.xx
  5. gm 1.99 is do exist! its early access version
    and i've set an example so, the example is do the readeing after alarm[0]
    and http_get_file is to download the installer

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice