Character name customisation & Updating game with player keeping all progess

Started by MrNashington, Sun 30/06/2013 11:43:01

Previous topic - Next topic

MrNashington

Hello people of the AGS forums,

I have two advanced questions.

1) How would it be possible for the player to type their name into a box and keep their name stored in a string?

2) Would it be possible to release updates of the game with new locations, characters, items etc for people to download. But the player gets to keep all their progress from the previous update?

Much appreciate any help I can get.

Thanks alot! Charlie

Kitai

Quote from: MrNashington on Sun 30/06/2013 11:43:01
1) How would it be possible for the player to type their name into a box and keep their name stored in a string?
You can create a GUI with a textbox, get what the player typed in with TextBox.Text and store it directly in Character.Name (assuming that you want the character to get the name the player chose). Otherwise just create a global String variable.

Crimson Wizard

Quote from: MrNashington on Sun 30/06/2013 11:43:01
2) Would it be possible to release updates of the game with new locations, characters, items etc for people to download. But the player gets to keep all their progress from the previous update?
No, AGS does not support this.
What people usually do is making separate games and some kind of password with encrypted information about game progress (like first letter A means one choice, letter B - another, etc); btw this is how Ponch made his famous "Barn Runner" series.
If the transferred data is large (or you don't want to encumber players making them remember password) you can save file at the end of the first game and load it at the start of the second game; this way they transferred characters, and sometimes progress, in many RPG games, including Quest for Glory.

MrNashington

Quote from: Kitai on Sun 30/06/2013 12:22:56
Quote from: MrNashington on Sun 30/06/2013 11:43:01
1) How would it be possible for the player to type their name into a box and keep their name stored in a string?
You can create a GUI with a textbox, get what the player typed in with TextBox.Text and store it directly in Character.Name (assuming that you want the character to get the name the player chose). Otherwise just create a global String variable.

Would it be possible to make an external text file which holds the info such as name etc that players can modify?

Crimson Wizard

Quote from: MrNashington on Sun 30/06/2013 16:05:33
Would it be possible to make an external text file which holds the info such as name etc that players can modify?
Yes, ofcourse. You can store any information you want in the file and then reload back, even from other game.
Files in AGS can work with both text and binary data(see File.WriteString and File.ReadStringBack in the manual).

MrNashington

Quote from: Crimson Wizard on Sun 30/06/2013 16:14:32
Quote from: MrNashington on Sun 30/06/2013 16:05:33
Would it be possible to make an external text file which holds the info such as name etc that players can modify?
Yes, ofcourse. You can store any information you want in the file and then reload back, even from other game.
Files in AGS can work with both text and binary data(see File.WriteString and File.ReadStringBack in the manual).

Could I paypal you some money to do it? I am a tad bit stuck :/

Crimson Wizard

Quote from: MrNashington on Sun 30/06/2013 17:31:04
Could I paypal you some money to do it? I am a tad bit stuck :/
Lol, no, those advices are free. :)

What exactly is a problem?

File writing is done simply as:
Code: ags

File *f = File.Open("mydata.dat", eFileWrite);
if (f)
{
   f.WriteString(player.Name);
   f.Close();
}

Reading:
Code: ags

File *f = File.Open("mydata.dat", eFileRead);
if (f)
{
   player.Name = f.ReadStringBack();
   f.Close();
}

Also check manual, there are more examples.

Kitai

If you don't want to embarrass with handling data files, you can take a look at the IniFile module that provides you with a way to store organized data, as well as my DataFile module (developed with AGS 3.2.1, should work with 3.*).

monkey0506

Quote from: Crimson Wizard on Sun 30/06/2013 12:30:31
Quote from: MrNashington on Sun 30/06/2013 11:43:01
2) Would it be possible to release updates of the game with new locations, characters, items etc for people to download. But the player gets to keep all their progress from the previous update?
No, AGS does not support this.

Well hell, that's a bit closed-minded. AGS doesn't have anything built-in, and it would require a LOT of forward thinking and planning, but this type of thing is entirely feasible in AGS. You just have to have and use a brain.
> use brain on computer
You throw your skull violently against the computer, simultaneously reimplementing
and clicking on the "Make my game!" button in AGS. Your game is successfully created,
and you are a huge, multimillion dollar success.
>

Crimson Wizard

Quote from: monkey_05_06 on Tue 02/07/2013 05:19:17
Quote from: Crimson Wizard on Sun 30/06/2013 12:30:31
No, AGS does not support this.

Well hell, that's a bit closed-minded. AGS doesn't have anything built-in,

Isn't this what "doesn't support" stand for? ;)

(Also, do you mean "everything"?)

monkey0506

To me "doesn't support" implies a strong barrier, not just "hard" but "impossible". For example AGS doesn't support pointers to custom struct types.

SMF spam blocked by CleanTalk