Tutorial Implementation

I am trying to implement a tutorial into my game that will be called the first time the player tries to play the game. Basically, if the game is going to be played the first time, the scene will switch to the tutorial scene instead and if the game has already been played before, the scene will just switch right to the game. How would you go about doing this? Thanks.

Note: I’m using the director class to handle my scene transitions.

When you say ‘the first time’, do you mean the first time ever, or the first time since it has been run. If the former, you will have to store some sort of flag in storage. 

It is simpler to use a global flag (and a reasonable use of globals !). One idea which I tried and worked quite well, I think, was to have the tutorial on each new run of the game but make it go away easily.

Or even simpler, have a ‘tutorial’ button :slight_smile:

I thought globals flags only worked if it’s for the first time since it has been run. 

I do need the former, but I was thinking of using simple data files like the one used in beebegames.lua. The problem is it doesn’t work for me and I can’t figure out why. If global flags will work for the former, how would you use them? Thanks.

Never mind, I figured out how to do it. I created and stored a value in a data file I created in the scene before and then used if statements to check whether or not I activate the tutorial.

When you say ‘the first time’, do you mean the first time ever, or the first time since it has been run. If the former, you will have to store some sort of flag in storage. 

It is simpler to use a global flag (and a reasonable use of globals !). One idea which I tried and worked quite well, I think, was to have the tutorial on each new run of the game but make it go away easily.

Or even simpler, have a ‘tutorial’ button :slight_smile:

I thought globals flags only worked if it’s for the first time since it has been run. 

I do need the former, but I was thinking of using simple data files like the one used in beebegames.lua. The problem is it doesn’t work for me and I can’t figure out why. If global flags will work for the former, how would you use them? Thanks.

Never mind, I figured out how to do it. I created and stored a value in a data file I created in the scene before and then used if statements to check whether or not I activate the tutorial.