FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Automatic updating

 


Battle_Off
This is probably way, way out of my league, but on my game, 'Battle Off'

You have to download the game and play it offline, if I release an update, you will have to download the update again and again, and it will get annoying,

Is there a way to, automatically download the update?

what I would like eventually, is a 'Check Version' Button with in the game, then the game will communicate with the website, http://www.battleoff.frih.org , and check the most recent version, if there is a newer version, there would be an option to update the version that the user has.

Then the game would only download the 'necessary' bits of code that have been changed, and any new images etc.

The game language is Pascal, and I am using Delphi.

Like I said before, it may be way too complicated for my capabilities, I am relatively amateur and new to HTML. it could also be beyond the capabilities of Delphi,

Appreciate any help.
Peterssidan
I don't think html has anything to do with this. If you have a file on the server only containing the version of the game. (battleoff.frih.org/version.txt or whatever you want) The game can then check this file to see if it's up to date. If not, the game downloads the files needed (how does it know which files? You have to solve this in some way).
I don't know anything about Pascal and Delph so I can't help you with that. I don't know if it is possible either.
Battle_Off
Thanks for the assist, I didn't think of just having a separate file called version.txt or something like that.
When my game is up on the site, I will implement this file check, but until I discover how to make it automatically download, I will just have a pop up saying,
'there is a more recent version of Battle Off, click here to be redirected to the site etc'
SonLight
Battle_Off wrote:
Thanks for the assist, I didn't think of just having a separate file called version.txt or something like that.
When my game is up on the site, I will implement this file check, but until I discover how to make it automatically download, I will just have a pop up saying,
'there is a more recent version of Battle Off, click here to be redirected to the site etc'


Sounds like a good method. It is very problematic to update only part of an executable program, so I recommend you don't ever attempt that. The easiest thing to do is clearly to just download the whole application whenever you want to update, and you may be able to automate that. Remember, though, that you are attempting to update a program that is currently being run. You would probably want to activate a simple script -- batch file or whatever -- to do the actual updating, and then you could probably have it restart the main program again.

If a lot of the game logic is in separate files, it might someday be worth while to check the version of each file and update them separately. Unless it is a huge download, I probably would not bother to do that.
Battle_Off
Thanks, Ill keep the batch file thing in mind, it will help eventually.

The game isn't huge at the moment, about 5 MB, so it is tiny, and It wont get much bigger either, everything is linked to it, The application (.exe file) calls other .dat and .tx files located within the folder
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.