Add this tutorial to Minetest.
HOWEVER, it is not so straight-forward as you may think. I want this thread to focus on the neccessary integration work which needs to be done in order to include the tutorial as cleanly as possible. If you want to discuss about the tutorial itself, please write in the tutorial thread above.
The simplest solution would be to simply drop the tutorial and the subgame into Minetest and that’s it. It would work, but not really well.
For the tutorial to work, the following conditions have to be met:
- Singleplayer mode
- Damage is on
- Creative mode is off
- Delete Tutorial World
- Start tutorial in multiplayer mode
- Start it with damage off
- Start it with creative mode on
- Accidentally activate mods
Here are my ideas on how to change the main menu in a newbie-friendly way:
- Hide Tutorial World from the list of worlds
- Hide the tutorial subgame from all subgame lists
- Add a new tab “tutorial”:
- It should be the selected tab on the very first start of Minetest
- It has a very short description of the purpose of the tutorial
- Initially it has a button “Start tutorial”
- If the tutorial has been started earlier, instead there are two buttons “Continue tutorial” and “Reset tutorial”
- “Tutorial World” shall be made a reserved name. The GUI shall forbid to name any world “Tutorial World” manually
In a fresh Minetest installation, the subgame and the world are installed in fixed locations, not in the user dir (like “.minetest” under Unix-like systems). The system-wide world should never be directly available to Minetest nor should it be changed by Minetest, it only is there to be copied. Maybe it shall be called “Tutorial World Original” there, to avoid confusion for those who like to jump around directories. ;-)
When the user clicks “Start tutorial”, Minetest shall create a complete copy of Tutorial World Original and put it into the world directory in the Minetest user directory and name it “Tutorial World”. Minetest then will apply the settings “damage on” and “creative mode off” and start Tutorial World (that is, the local copy of Tutorial World Original) in singleplayer mode. Now the player can go through the tutorial like in any normal game and from this point on, Minetest treats the world as any other world. When the player leaves, the world is retained.
Now the tutorial tab has changed. There are now two buttons “Continue tutorial” and “Reset tutorial”. If the player clicks on “Continue tutorial”, the local copy of Tutorial World is loaded again, like a normal world (under the same settings as before, of course). If the player clicks on “Reset tutorial”, Minetest deletes the local copy of Tutorial World and updates the main menu formspec and returns to the initial state. Clicking the reset button should also open up the obligatory Y/N question.
How does Minetest know wheather the tutorial is resetted or not? Easy: Just check the user’s world dir: If it contains “Tutorial World”, the formspec should be in the “load/reset” stage, otherwise it is in the “start” stage.
However, hiding the game and tutorial world may be bad if someone want to edit things for fun. To cater to these needs, I suggest a minetest.conf setting “hide_tutorial” which is true by default. If “hide_tutorial” is false, both Tutorial World (local copy) and the subgame are now exposed by Minetest.
With Minetest and the main menu modified like this, we have achieved the following:
- Really easy way to directly start the tutorial: Just need to click “Start tutorial”
- Easy way to reset the tutorial for other people on the same computer
- No chance for newbies to mess up vital files
If I think about it, all that really needs to changed in Minetest for optimal integration (IMO) is basically just the main menu. And some files need to be copied and removed and that’s it.