playMaker

Author Topic: What’s best practice to create a one time in-game tutorial?  (Read 1686 times)

bazzajunior

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
    • Molber Games
What’s best practice to create a one time in-game tutorial?
« on: August 16, 2019, 07:17:07 AM »
Good afternoon all,

I have a game on the Google Play Store which has been somewhat successful but appreciate that its lacking an in-game tutorial to show how the vehicle movement works. It’s a very simple touch and drag to move setup (vehicle follows the players finger) but I’m aware that some players simply tap the screen expecting the vehicle to move or try and swipe it (the game is aimed to younger players).

If I’m looking at implementing a one-time video tutorial, or something similar, what’s the best option to look at with regards to the player seeing the tutorial once, but never again once they’re happy how to play?

Should I be looking at using playerprefs or is there a better route to take for this?

Doing a Google search is fruitless as all attempts to search up in-game tutorials or first run instructions for Unity just ends up with me getting tips on how to create my ‘first unity game’  >:(

Any advice would be very much appreciated.


Barry

Broken Stylus

  • Sr. Member
  • ****
  • Posts: 462
    • View Profile
Re: What’s best practice to create a one time in-game tutorial?
« Reply #1 on: August 16, 2019, 07:53:24 AM »
PlayerPrefs would be the way to go, but remember this obscure game Temple Run 2?
The tutorial is ran at the beginning of every single game because they force the player into specific and intuitive situations that leave no other choice but to do what the game expects from the player.
So maybe depending on the way your game plays, just provide typical introductory situation that forces the player to try each of the inputs once.

bazzajunior

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
    • Molber Games
Re: What’s best practice to create a one time in-game tutorial?
« Reply #2 on: August 17, 2019, 01:33:38 AM »
Thanks for confirming that playerprefs is the way forward. My game is (currently) simple enough that one quick tutorial with how to move and how to fire the toy tank's cannon should be sufficient. I may seek to expand the game to include further levels so another set of tutorials may be required  :)
« Last Edit: August 17, 2019, 03:01:19 AM by bazzajunior »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5546
    • View Profile
    • jinxtergames
Re: What’s best practice to create a one time in-game tutorial?
« Reply #3 on: August 18, 2019, 05:30:25 AM »
Hi.
playerprefs is good for something like this, but you should not use playerprefs to save other data like currency for example as playerprefs is very easy to hack.

Another way that i used on an older games is setting up a tutorial scene and a how to play button.

you can see it here :
http://www.jinxtergames.com/web-games/balloonacy/

Broken Stylus

  • Sr. Member
  • ****
  • Posts: 462
    • View Profile
Re: What’s best practice to create a one time in-game tutorial?
« Reply #4 on: August 18, 2019, 11:20:47 AM »
Thanks for confirming that playerprefs is the way forward. My game is (currently) simple enough that one quick tutorial with how to move and how to fire the toy tank's cannon should be sufficient. I may seek to expand the game to include further levels so another set of tutorials may be required  :)

If it is that simple, then you don't even need to save anything to playerPrefs because you can actually afford to play the tutorial at the beginning of each game. That's what they do in Temple Run 2. Try it and you'll see.
Their "tutorial" is nothing more than a mere indicator (an arrow) that tells you the expected input the first time a case of each typical input is required. It's quite elegant but not suited for all games. Obviously works for very simple mobile/casual games.

bazzajunior

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
    • Molber Games
Re: What’s best practice to create a one time in-game tutorial?
« Reply #5 on: August 19, 2019, 04:39:46 AM »
Ah ha! After a number of attempts, I had one final look on Unity Answers to see if someone had presented the same query as me and actually found one - https://answers.unity.com/questions/1112787/how-to-save-prefab-that-indicates-if-the-scene-sho.html

I like the idea of using the button on the front of my game for a reminder on how to play, but as the targeted player is generally under 8, it’s probably easier for them to see a quick “this is how you play it” and then leave them to it.

Now I just need to figure out for the code translates from C# to PlayMaker  ;)

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5546
    • View Profile
    • jinxtergames
Re: What’s best practice to create a one time in-game tutorial?
« Reply #6 on: August 19, 2019, 06:54:25 AM »
Hi.
You can simply use 'PlayerPrefs Has Key'
if there is no key yet (no key set yet) play tutorial and on end of tutorial use any 'Player Prefs Set' action.

The 'Key' a reference.
Similar to a variable

daniellogin

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: What’s best practice to create a one time in-game tutorial?
« Reply #7 on: August 20, 2019, 09:25:31 PM »
Hi.
You can simply use 'PlayerPrefs Has Key'
if there is no key yet (no key set yet) play tutorial and on end of tutorial use any 'Player Prefs Set' action.

The 'Key' a reference.
Similar to a variable
I've been curiuos about the key and exactly what it is. I have only just stated using the PlayerPrefs for some basic highscore and settings storage. Yes I know it can be easily hacked, but hey, if I worked in a trophy shop I would let people buy the 'greatest at everything ever' trophy there too if that's what they wanted to do.

OK so for the key, would this be helpful for a sort of profiles situation? Right now my simple game is keeping a high score for everyone, but if I start the game by getting the player to pick profile 1, 2, 3, or 4, and then use that as an INT to insert in to the key part, is that a way to keep separate highscores for up to 4 players? I'm not actually intending to show the scores at the same time even, but just have it so each player can personaly see their previous best when they are playing. I'm going to be using playerprefs to keep track of achievements unlocked too.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5546
    • View Profile
    • jinxtergames
Re: What’s best practice to create a one time in-game tutorial?
« Reply #8 on: August 21, 2019, 04:17:38 AM »
Hi.
I would strongly suggest to use an asset like 'Easy Save'
As you can save all types of variables.(int/float/string/array/bool/vector 2-3/colors/many more)

PlayerPrefs is very limited (only int/float/string)

There are some other assets which also support playmaker, but Easy Save is still the best one out there.
I have been using it for years now and on almost all my projects.

daniellogin

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: What’s best practice to create a one time in-game tutorial?
« Reply #9 on: August 21, 2019, 08:03:23 AM »
Hi.
I would strongly suggest to use an asset like 'Easy Save'
As you can save all types of variables.(int/float/string/array/bool/vector 2-3/colors/many more)

PlayerPrefs is very limited (only int/float/string)

There are some other assets which also support playmaker, but Easy Save is still the best one out there.
I have been using it for years now and on almost all my projects.

Yeah I figure when I do any 'proper' saving I will move on to Easy Save, but for now it's just in my like list on the asset store and I'm going with the free option of the Player Prefs for what I'm currently doing.

I just realised while working on something now I said the wrong thing in my question. I said what does the Key mean, when I meant what is the Count. It defaults as 1. What does that number mean?

At first I was also thinking if it meant using the same key for multiple entries (like different profiles of saves) then I could use a variable as the count and just switch that when loading and saving the prefs. I also just realised now it's not able to be a variable.

So, just briefly, what is Count in the PlayerPrefs? The wiki link for it doesn't say.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5546
    • View Profile
    • jinxtergames
Re: What’s best practice to create a one time in-game tutorial?
« Reply #10 on: August 22, 2019, 06:44:15 AM »
Hi.
If you change count you can save multiple values at the same time.
Try changing count to 3 for example and press enter

Now you will see key and Variable 3x

it the same as you would use the action 3x

Broken Stylus

  • Sr. Member
  • ****
  • Posts: 462
    • View Profile
Re: What’s best practice to create a one time in-game tutorial?
« Reply #11 on: August 23, 2019, 07:08:59 AM »
Hi.
I would strongly suggest to use an asset like 'Easy Save'
As you can save all types of variables.(int/float/string/array/bool/vector 2-3/colors/many more)

I suppose now would be a good time to suggest being careful with the integration of ES and the opening/reading of multiple files.
I recently encountered a typical issue here with ES2 that leaked memory (found it with a deep profiling); so grave that if it reaches beyond the safe level on your device, it will keep eating even more memory for, huh, memory management, even if you pause your app or stop the editor from running.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 5546
    • View Profile
    • jinxtergames
Re: What’s best practice to create a one time in-game tutorial?
« Reply #12 on: August 24, 2019, 05:25:47 AM »
Hi.
@Broken Stylus.

is this on latest ES version?
Did you report this to moodkie?

do you get debug log error : Expected data of type System.Single?

I did not encounter any memory leak yet caused by ES(2 and 3). (i use ES on almost all my projects.)
I did some googling but could not find any memory leak issues mentioned on their forum.

to only post i found about memory was this one :
https://moodkie.com/forum/viewtopic.php?f=5&t=1150

Broken Stylus

  • Sr. Member
  • ****
  • Posts: 462
    • View Profile
Re: What’s best practice to create a one time in-game tutorial?
« Reply #13 on: August 24, 2019, 11:46:57 AM »
Hi.
@Broken Stylus.

is this on latest ES version?

ES2.

Quote
Did you report this to moodkie?

No, I've been working on it and did manage to reduce the memory issue and I'm very cautious not to jump on conclusions because I also know my device isn't very powerful.
The other issue was a spike in CPU usage related to MonoIO.Open() which gratuitously added almost 100 ms of computation at the core of a SaveInt.OnEnter > ES2.Save().

Quote
do you get debug log error : Expected data of type System.Single?

No, it does not produce any error. I went looking on internet too and I wondered if it was possible that using two different ES files in the same project could be causing this. Moodkie said that the read and write procedures are properly cleaned and closed every time, so there's nothing that should be lingering once a write or save method has been completed.
I'm still working on it and still trying to understand why there's a CPU spike. I feel it's going to take time, deactivating as many functions and plugins as possible during the tests to see if there's a cross-issue first.