first time opening the game detection

Hi Friends

i have doubt in developing a game, i want to determine when user opens the game for the first time. I wanted to keep feature of tutorial to person who opens the game for the first time. Can any one suggest me the way how can i do it?
Regards
Varun [import]uid: 130269 topic_id: 34455 reply_id: 334455[/import]

Write a file to storage and insert a variable (like FirstTime). Check to see if the file exists or not. If the file variable does not exist run the tutorial, otherwise if it does exist skip the tutorial. [import]uid: 132483 topic_id: 34455 reply_id: 136984[/import]

I’d save a variable for how many times the app was opened, and then if it’s == 1 do your tutorial. For saving, this is my favorite library, by Satheesh:

http://developer.coronalabs.com/code/save-data-files-tablesnumbersstringsboolean

By doing this, you can also keep it for later, in case you want to do something like a rating popup on the 10th time they open the app. [import]uid: 147322 topic_id: 34455 reply_id: 136983[/import]

In my main.lua I load my settings file, which is a big table of settings, music On/Off, soundOn/Off etc.

If I try and load my settings file and I can’t because it doesn’t exist yet, I create a default settings file and save it. I set a firstRun to true. If I can successfully load that file, its no longer the firstRun, so set firstRun to false and away you go.
[import]uid: 199310 topic_id: 34455 reply_id: 137030[/import]

Hello Guys

Thanks for your wonderful ideas, they all are really good idea and i can implement them with ease.

Again thanks a lot.

Regards
Varun [import]uid: 130269 topic_id: 34455 reply_id: 137070[/import]

Write a file to storage and insert a variable (like FirstTime). Check to see if the file exists or not. If the file variable does not exist run the tutorial, otherwise if it does exist skip the tutorial. [import]uid: 132483 topic_id: 34455 reply_id: 136984[/import]

I’d save a variable for how many times the app was opened, and then if it’s == 1 do your tutorial. For saving, this is my favorite library, by Satheesh:

http://developer.coronalabs.com/code/save-data-files-tablesnumbersstringsboolean

By doing this, you can also keep it for later, in case you want to do something like a rating popup on the 10th time they open the app. [import]uid: 147322 topic_id: 34455 reply_id: 136983[/import]

In my main.lua I load my settings file, which is a big table of settings, music On/Off, soundOn/Off etc.

If I try and load my settings file and I can’t because it doesn’t exist yet, I create a default settings file and save it. I set a firstRun to true. If I can successfully load that file, its no longer the firstRun, so set firstRun to false and away you go.
[import]uid: 199310 topic_id: 34455 reply_id: 137030[/import]

Hello Guys

Thanks for your wonderful ideas, they all are really good idea and i can implement them with ease.

Again thanks a lot.

Regards
Varun [import]uid: 130269 topic_id: 34455 reply_id: 137070[/import]