Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4120342
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:12:34+00:00 2026-05-20T23:12:34+00:00

Title. It’s only allowed to save to a certain directory, but is there a

  • 0

Title. It’s only allowed to save to a certain directory, but is there a way of making an executable made with it update itself? I’ve got the code to check if it’s out of date (HttpGet), but not sure how to intall the newer update.

Main reason is people are complaining about having to repeatedly redownload my RPG. Would it be easier to package it with a C# auto-Updater they can run?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:12:35+00:00Added an answer on May 20, 2026 at 11:12 pm

    You can not make the .love file “update itself”. That is not possible, unless you use the operative system’s package manager or something similar (apt-get in Ubuntu, the app store on mac, and whatever microsoft uses, if it has it).

    If you don’t want to do that, then the second best way to make that work would be making your love2d executable a “shell”; an “empty game” that simply downloads stuff from the internet, and later on it executes some function that initializes everything, including the proper game.

    As jpjacobs says, you can download stuff from the web using LuaSocket (which is already included in LÖVE 0.7). For example, this is how you download a png (I’ve copied the code from here):

    if not love.filesystem.exists("expo.png") then
      local http = require("socket.http")
      local b, c, h = http.request("http://love2d.org/w/images/e/e3/Resource-AnalExplosion.png")
      love.filesystem.write("expo.png", b)
    end
    

    There’s also a way to uncompress data using the GNU unzip algorithm using pure lua. It’s implemented by the /AdvTiledLoader/external/gunzip.lua file in Kadoba’s Advanced TileLoader.

    So I guess you can make a game that:

    1. Starts by reading a file called version.lua, and comparing it to a file in your server (http://www.your-server.com/latest-version-number). That file simply contains a number, like “48”.
    2. If no file and server could not be contacted, then error “could not download game”.
    3. If no file, or current version < latest version from the server, download zip file from server (http://www.your-server.com/latest.zip)
    4. If latest.zip downloaded successfully, erase everything inside the /latest directory and uncompress latest.zip on the new latest. Update version.lua with the new version (return 48)
    5. Detect when you are working offline – If could not download latest.zip or version, but there’s already a version.lua and latest folder, give just a warning, not an error.
    6. Require the file that contains the real game; probably something like require 'latest.main'

    Notes:

    • I’m not familiar with luasocket. It is possible that there’s a way to get the ‘last updated’ date from http://www.your-server.com/latest.zip, so you can simply get rid of the latest-version-number stuff.
    • I haven’t used gunzip.lua myself. I don’t know how it handles multiple files, or directories.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Title field is sealed. Any attempts to update the default value resets the value
Title is the entire question. Can someone give me a reason why this happens?
Title says what i'm trying to do. I can successfully generate an assembly if
Title says it mostly. I want to add a simple extension method to the
Title might be a bit confusing, so let me explain. I have a website
Title pretty much sums it up. The external style sheet has the following code:
Title: Eclipse plug-in development Unable to instantiate class due to java.lang.NoClassDefFoundError: Trying to build
Title more or less says it all. Specifically, I've become increasingly annoyed that in
The title should say it all, then I can solidify 2 more ticks on
See title. By lightweight markup I mean something like markdown or wikitext.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.