[AUTO UPDATE]IS IT POSSIBLE IN AGS ?

Started by Nishuthan, Sun 22/10/2017 08:05:22

Previous topic - Next topic

Nishuthan

HI

I WOULD REALY LIKE TO INCLUDE A AUTOUPDATE FUNCTION FOR MY GAME IS THERE ANY WAY TO DO THIS ? OR ANY SOFTWARE AVAILABLE TO DO THIS ? OR IS IT IMPOSSIBLE ?


THANK YOU

Slasher

Well, for one: you do not need to SHOUT (known as flaming I believe)...

What exactly is it you are looking to update?


Nishuthan

The whole Game. Like the New Things i included



eri0o

The distribution platform you are making your game available can usually handle this, but you are probably going to need to implement your own save module since the save game as is usually breaks when you update an existing room.

Nishuthan

#4
Quote from: eri0o on Sun 22/10/2017 14:01:24
The distribution platform you are making your game available can usually handle this, but you are probably going to need to implement your own save module since the save game as is usually breaks when you update an existing room.

How do i do it any link i can refer to ?

eri0o

For which part, the save or the distrbution platform? If you are going for Steam as distribution platform read the Steam Developer documentation. For the save part I advise you to ask around since I haven't tried it myself.

Monsieur OUXX

#6
Allow me to reprhase the answer : It is close to impossible. (if you want the player to continue using his/her previous saved games without starting the entire game again)
When I write "close", I mean "unless you can program in C++ and are able to dig deeply into the game's engine code".

Here is why :
- Let's suppose you overcome the non-neglectible difficulty of creating an online repository for updates, managing versions, etc. It wouldn't be too hard if you did an external download tool (like a game launcher) written in C# for example, that would download any new version of the game that you would put in your online repository, and install it in place of the current game version. If you're a pro you can even push this solution further by making patches available -- which would save the trouble of re-downloading the entire game. Side note: it's probably impossible to implement that directly in your AGS game, because even if you managed to download the update material (using the Sockets plugin for example), then the game still could not overwrite its own files I believe.

- But then another terrible problem would arise : all the saved games would be lost. Indeed, downloading a new complied version of the game makes all the previous saved games incompatible. So the player would have to start over the entire game. You might consider this a minor issue, or a major one. This is the reason why eri0o said "you need to implement your own save module". He makes it sound like it's totally casual. Maybe it is for him, but from my perspecive it's an unbelievably complex task.
 

Cassiebsg

Quote from: Monsieur OUXX on Mon 23/10/2017 10:18:16
all the saved games would be lost. Indeed, downloading a new complied version of the game makes all the previous saved games incompatible.

This is not 100% true.
If you just do some "minor" changes in code, it won't break the savegames. However if you add/delete any assets like variables, sprites, objects, rooms, characters, etc. It will break the savegame. You can though take some precautions to avoid it breaking if you add dummy assets to your game, that you can use later on in case of an update.
There are those who believe that life here began out there...

Monsieur OUXX

Quote from: Cassiebsg on Mon 23/10/2017 16:55:49
If you just do some "minor" changes in code, it won't break the savegames. However if you add/delete any assets like variables, sprites, objects, rooms, characters, etc. It will break the savegame. You can though take some precautions to avoid it breaking if you add dummy assets to your game, that you can use later on in case of an update.

Good to know! What are the "minor" changes? Is it if you only modify modules scripts? When you said "variables" did you only mean AGS built-in "global" variables?
 

Crimson Wizard

#9
Quote from: Monsieur OUXX on Tue 24/10/2017 00:06:32
Quote from: Cassiebsg on Mon 23/10/2017 16:55:49
If you just do some "minor" changes in code, it won't break the savegames. However if you add/delete any assets like variables, sprites, objects, rooms, characters, etc. It will break the savegame. You can though take some precautions to avoid it breaking if you add dummy assets to your game, that you can use later on in case of an update.

Good to know! What are the "minor" changes? Is it if you only modify modules scripts? When you said "variables" did you only mean AGS built-in "global" variables?


Any variables, except local function variables, because latter not saved (you cannot save while script function is run).

One of the ways to give you some leeway here is to put an array of, say, 1000 ints in your script, then you will have 4000 bytes of data you can later replace with something meaningful if you need to patch your game without breaking saves.
But even order of variables is important here, so new variables must precede or follow this dummy array as you decrease its size.

Dave Gilbert

#10
If your game is on Steam than your game will update automatically, yes. GOG does the same thing, I believe. But as others have said, it is risky. The save game issue is, sadly, a thing.

Some things to keep in mind when updating your game after launch:

  • Changes to script are usually safe (unless you add a global variable), most changes to the editor will break the game.

  • One thing I usually do is create 10 dummy global variables of each commonly used type (for me personally: ints, strings, booleans, and Audiochannels). That way if I need any of them after launch, I can use them relatively safely.

  • If you need to change or add art assets after launch, the only way to do it safely is to read the files from the hard-drive, which can get messy.

  • Updating your game to a newer version of AGS will completely break your save files. There is no way around this. It's the one reason I haven't updated a lot of our games yet.
The save issue can be really difficult, but not totally insurmountable (aside from the last one). Anyway, good luck!

-Dave

Crimson Wizard

Quote from: Dave Gilbert on Wed 25/10/2017 14:35:29
Updating your game to a newer version of AGS will completely break your save files. It's the one reason I haven't updated a lot of our games yet.

That depends, for example AGS 3.4.1 can still read saves from AGS 3.2.1. (Unless we broke it by mistake, but no one reported anything in past few years)

Dave Gilbert

It... can? 8-0 What about later versions? Most of our games were written in 3.3x.

Crimson Wizard

#13
Quote from: Dave Gilbert on Wed 25/10/2017 14:55:28
It... can? 8-0 What about later versions? Most of our games were written in 3.3x.
Saves from 3.2.1 to 3.4.1 are generally of same format and supposed to be read by higher versions. When savegame is parsed, engine checks for original game version to know which data to skip (if it only appeared in later versions).
There were certain mistakes during the course of 3.3 development, but I believe they were long fixed.

eri0o

@Monsieur OUXX, I have no idea of how hard this is, I just stated that for updating the game (without taking all the cares listed in this thread), the only way around I saw was to implement something.

I started a discussion thread with some code here, maybe someone who has done this can shed a light.

SMF spam blocked by CleanTalk