Does anyone know what is the term called for gameplay guide on opening the game for the first time.
Me and my team wants to implement in our game that feature.
For instance -
suppose anyone starts the game for the first time…
it has a slider to push the crate to show force applied… we want an animation hand to show pointing that push the slider, so that the game is more easy for children
as we are implementing in a school…
and stuffs like that…
as i dont know the term and how to achieve it… ?
does anyone knows how to do it… ??
Do you want things like a hand moving on some object and that object is moving which will help user how exactly he has to play game. Is it what you’re asking for?
If yes, then I don’t know whether there is some separate term other than ‘animation tutorial’. If this is what you want than it can be achieved by Actions on sprites. Change the speed accordingly in order to depict different force effect.
See, I would almost repeat what Te2Ra said.
I still have to learn how to read a file so I can’t give you the code. You may check this in Wiki.
But here is approach.
You actually have to read a flag value from the datafile as true or false or 1 or 0 -whatever you wish.
This thing you need not read just before the beginning of your animation tutorial but in the very beginning when you read data from the datafile. You must keep some flags(variables) which would have default value but if their values are present in dataFile then they should be overwritten and this value you must use throughout the game.
And ofcourse, since you want to keep the value same(which is false for not showing next time) after 1st time, so you need not write your dataFile again and again but your game code will have to check this thing again and again that whether it is 1st time or not
You can use a file, UserDefaults or Sqlite to name a few options.
You just need a flag that is “tutorial complete” So ANY of the above can do this.
Reading from a file, there are several ways to do this:
string STRING;
ifstream infile;
infile.open ("names.txt");
while(!infile.eof) // To get you all the lines.
{
getline(infile,STRING); // Saves the line in STRING.
cout<<STRING; // Prints our STRING.
}
infile.close();
if(showanimation)
{
//show animation whatever you want to show for the first time
UserDefault::sharedUserDefault()->setBoolForKey(“firstTime”,false);
UserDefault::sharedUserDefault()->flush();
}