Jump to content
MakeWebGames

Simple game tutorial for new players


dnenb

Recommended Posts

I made a tutorial for my game yesterday, and I thought I'd share it. It's a very simple beginner guide showing new players a few pages in your game. Easily customized to yours.

How it works

When a new player logs in for the first time, the only thing he or she usually sees is the userstats page. With this mod what's visible is:

[ATTACH=CONFIG]1246[/ATTACH]

And what it does is basically show the player a selection of pages in your game along with some text to explain. A couple of other screens:

[ATTACH=CONFIG]1247[/ATTACH][ATTACH=CONFIG]1248[/ATTACH]

How to install

First you need another field in the users table called `tutorial_step` with default value 1. Then create a file called tutorial.php and add this:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then you just include tutorial.php somewhere in your header, and you're good to go! Hope you like this :)

screen1.PNG.1d762314b69eb21b086132965a9f6ae8.PNG

screen2.PNG.84028ee73b28d1b54a9b702efe1c0bb0.PNG

screen3.PNG.17f766d93cf186b7f8f5e9b8d1259745.PNG

Link to comment
Share on other sites

  • 1 month later...
This is a little old but could you save using another column in the users table by setting a $_SESSION variable instead, as it's likely they'll only use it once?

Sure. I guess you could set a session variable when they register, and check if that exists when they log in. Or you could just check if "lastactive" has been set previously, and set a session variable for the tutorial if lastactive=0. Too many options :) But I like the way I did it, as it's easy to add a new tutorial step if there's a new feature in the game.

Link to comment
Share on other sites

  • 9 months later...

This works fine, but the tutorial doesn't disappear when the last link is done. I have to manually go in and enter a 0 in the database to clear it.

G7470 gave me this fix to set the user in the data base to the next number signifying that the tutourial was finished and it disappears with the next click.

Original code

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

add this into your last case:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

This is an example of what I did in mine

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Edited by Tangled
Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...