A vision: Bevy interactive tutorial #4759
Replies: 3 comments 9 replies
-
This would be a massive undertaking, so it's probably not feasible for us. But I think it would be very valuable and a distinguishing feature compared to other engines. One can dream! |
Beta Was this translation helpful? Give feedback.
-
I also had a similar idea of having interactive tutorials. The major difference though is that they are not web based, but they are extensions for the (future) Bevy editor. There may be a couple of built-in tutorials, but you can also import community-made custom ones. Tutorial sessions are projects including all the assets that need to be used in the tutorial. The user can load the tutorial session from the editor project launcher. Once loaded, a “virtual teacher” pops up (see it like MS Clippy — ʷᵉ'ˡˡ ⁿᵉᵛᵉʳ ᵍᵉᵗ ʳᶦᵈ ᵒᶠ ᵗʰᵉᵐ) and guides the user through all the editor and coding actions (maybe we'll need to include a simple text editor) that must be performed to accomplish the goal. While the tutorial is active, unneded editor actions are dynamically disabled to keep everything on rails and ensure the user doesn't mess up things. UI elements that trigger the actions that must be performed are highlighted. Once the tutorial is finished, the user is free to do whatever they want with their creation. This approach is very compatible with the tutorial quadrant of the Diátaxis framework we are striving to follow. In particular:
I just realized that Unity has their own interactive tutorials. |
Beta Was this translation helpful? Give feedback.
-
#4700 shows a path that we could use to get here. If you're comfortable, reviews there would be much appreciated. |
Beta Was this translation helpful? Give feedback.
-
I have a vision...
You keep hearing about this Bevy thing on r/rust and decide to finally try it out. You click the link to the website and quickly find a tutorial section in the top bar. After opening it, your view splits into two sections: A code editor on the left and a task description on the right.
You read through the initial description, which welcomes you and starts off with an easy example. Apparently, all you have to add to do is to add
App::new().run();
! In your editor, a code template is already included for you, with an empty main function. You include the new line, but it's underlined in red: Duh, you forgot to adduse bevy::prelude::*;
at the top. It said that in the description and there's a TODO comment as a placeholder, but you got a little bit too excited.Satisfied, you press a "Check" button that is located at the bottom of the task description. You wait for a bit and a green check mark appears! You are given the option to compare your code to a version written by a Bevy expert, but because this task was you simple you press the "Next" button to move on to the next task.
The first task was cool, but it didn't really do anything. How lame. Fortunately, this one seems more promising: You get to implement your first system! You don't really know what that means and are too lazy to read through all of the explanation provided to you, but you fill out the template code as instructed and apparently it's supposed to print stuff now.
Again you press the "Check" button. You get a red cross! Why?? You didn't even get any compile errors! The error message explains it: Because you didn't read the task properly, you forgot to add the function as a system to your app. Whoops. They must have run some static analysis to catch that mistake, cool! You try to check your task again and it opens a console window and indeed, it says "hello world"! This time you choose to compare your code, but the diff doesn't show any major differences between your solution and the expert one. Time to move on!
In the next task, you finally get to make some cool GUI things with
DefaultPlugins
. You are surprised to see that the game window opens up directly in your browser view, next to the code editor. Well, they did say that you could make browser games in Bevy! You follow some more tasks and are able to write a tiny game in the tutorial, seeing the changes directly in the browser.You were able to test out this cool game engine without even installing the dependencies, or messing around with weird compiling configurations. You also learned about Bevy's most important features. Because you interacted with them directly, it's easier for you to remember the important bits. Cool! You decide that you are going to use Bevy for your that cool Stardew Valley clone idea you had which is totally gonna take off. Soon after, this project is dumped on your steaming pile of unfinished programming projects.
Prior Art / Resources
Beta Was this translation helpful? Give feedback.
All reactions