You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: addons/block_code/README.md
+35-8
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,12 @@ Our aim is to reduce the learning curve faced by learners who are on the early p
11
11
12
12
With this project, we aim to reduce the height of the mountain that such learners have to climb. Specifically, we aim to eliminate the requirement of learners having to simultaneously learn to code while building their first games. Instead of writing GDScript to implement games, this plugin enables learners use block coding. Tools like [Scratch](https://scratch.mit.edu/), [Blockly](https://developers.google.com/blockly), and [MakeCode](https://www.microsoft.com/en-us/makecode) have demonstrated that block coding can be much more accessible and intuitive to beginners than textual programming—we are bringing those concepts into Godot to help learners become familiar with some aspects of Godot itself while simplifying the creation of their first games.
13
13
14
-
### Constraints
15
-
16
-
In order to be learner-friendly, we have to implement blocks at a suitable level of abstraction. For example, in GDScript you would typically move a sprite around the screen by examining input events and adjusting a sprite's movement vector accordingly—but we do not wish to express this level of detail in blocks. Instead, we lean much more towards the kinds of blocks you can find in MakeCode Arcade, such as having a single block for "move mySprite with buttons".
17
-
18
-
Expressing an appropriate layer of abstraction is perhaps the most challenging aspect of this project, and will likely place limits upon what can be achieved with this tool. We do not aim to express the full power of Godot & GDScript with this block coding plugin, but rather, our objective is to provide a gentler introduction to Godot for learners, such that they can get familiar with other aspects of the Godot Editor and learn programming concepts while creating basic games. We envision that learners would use block coding as a stepping stone and then later progress onto learning GDScript.
14
+
In order to be learner-friendly, we implement blocks at a suitable level of abstraction. For example, we have blocks that allow the user to trivially connect keyboard input to the movement of a particular game element, and to make the score show up on-screen. That abstraction does place limits on what can be achieved with this tool, while still allowing us to provide a gentler introduction to Godot for learners, such that they can get familiar with other aspects of the Godot Editor and learn programming concepts while creating basic games. We envision that learners would use block coding as a stepping stone and then later progress onto learning GDScript.
19
15
20
16
That said, we are in no way opposed to having this project grow to be able to create more complex games, as long as it does not negatively affect the experience for early stage learners.
21
17
18
+
See our [pedagogy and audience documentation](docs/PEDAGOGY.md) for more info.
19
+
22
20
## Getting Started
23
21
24
22
1. Install the plugin through the Godot AssetLib searching for the name
@@ -32,11 +30,11 @@ That said, we are in no way opposed to having this project grow to be able to cr
32
30
33
31
2. Make sure to enable the plugin in **Project** → **Project Settings** → **Plugins**.
34
32
35
-
3. You're ready to get started! Open a scene, and add a **BlockCode**child node to any node in the scene using the **Add Child Node**menu dialog.
33
+
3. You're ready to get started! Open a scene, select a node, and observe that there's a **Block Code**section within the lower central pane of the Godot editor, where you usually find debugging, animation and shader functionality. Click **Block Code** and then use the **Add Block Code**button to create a block canvas.
36
34
37
-
4.The **Block Code** editor will open in a new tab. Drag blocks from the picker and snap them together to create a script. You can switch to other Block Code scripts by selecting the respective BlockCode node in the scene tree.
35
+
4. Drag blocks from the picker and snap them together to create a script. You can switch to other Block Code scripts by selecting the respective node from the scene tree.
38
36
39
-
5.**Run** the scene to see your Block Code scripts in action. Block Code scripts are attached to the BlockCode node's parent, and are saved to the scene.
37
+
5.**Run** the scene to see your Block Code scripts in action. Block Code scripts are saved within the scene.
40
38
41
39
If you clone the plugin's git repository and open it in Godot, you will be presented with a block-built Pong game as an example.
42
40
@@ -50,6 +48,20 @@ We will now seek feedback from learners, educators and game makers, as well as r
50
48
- Should this be a plugin or an extension?
51
49
- Should blocks generate GDScript or be dynamically executed?
52
50
51
+
There is no language or data format stability implemented or expected in these early stages. If you upgrade the block coding plugin within an existing project, expect any existing block scripts to stop working and need reimplementing from scratch. For now, you probably want to avoid updating the plugin within your project if it's meeting your needs, or only doing that very sporadically. We will consider offering stability guarantees in future stages of development.
52
+
53
+
## General user guidance
54
+
55
+
Block scripts run against the node where you created them. The "Queue Free" block is going to free that node, not any other.
56
+
57
+
The selection of available blocks varies based on the node type. For example, create a block script on an `Area2D` and you will notice that you have an `On body entered` signal handling block available. Create a node script on an `AnimationPlayer` node and you will observe blocks for starting and stopping animations.
58
+
59
+
If you wish to switch context to another node, you need to define a function in that other node, and then call it. Once execution jumps into that function, blocks will now act against that other node, and you'll have access to type-specific blocks belonging to that other node. You'll need do this kind of thing if you want to trigger the freeing of another node, or trigger an animation to start playing. This is both strong in conveying the concepts of objects and encapsulation, while also a bit tedious - we may revisit in future!
60
+
61
+
We have some high level blocks for simplifying common game elements. Add a SimpleCharacter node to get a game element that can be connected to keyboard input with just one type-specific block. Add a SimpleScoring node to display a score on-screen, accompanied by simple blocks for adjusting that score.
62
+
63
+
Lean into animations! Godot's animations functionality goes beyond just simple animations of graphics. You can do so much by combining block coding with Godot's powerful animations editor.
64
+
53
65
## Feedback
54
66
55
67
Please share feedback in the [Godot Forum Block Coding thread](https://forum.godotengine.org/t/block-coding-high-level-block-based-visual-programming/68941).
@@ -90,3 +102,18 @@ There are several other GUT command line options for running specific tests.
90
102
For example, `-gtest=path/to/test_script_1.gd,path/to/test_script_2.gd` can be
91
103
used to run specific test scripts. A specific test function can be specified
92
104
with `-gunit_test_name=test_to_run`.
105
+
106
+
### Using the Development Version of the Plugin
107
+
108
+
1. If your project already has the BlockCode plugin installed:
109
+
1. Ensure you have committed your project to Git, including the `addons/block_code` directory.
110
+
At this stage of development, **block code programs written for an older plugin version will
111
+
likely not work with a newer version of the plugin**, so it is essential that you take a
112
+
snapshot of your project before changing the plugin version.
113
+
2. Under *Project* → *Project Settings…* → *Plugins*, disable the BlockCode plugin
114
+
3. In the *FileSystem* sidebar, delete the `res://addons/block_code` directory
115
+
2. Download
116
+
[a development snapshot](https://github.com/endlessm/godot-block-coding/archive/main.zip)
117
+
3. Under *AssetLib*, click *Import…*, and browse to the `main.zip` file you just downloaded
118
+
4. Check the *☑ Ignore assert root* option, and click *Install*
119
+
5. Under *Project* → *Project Settings…* → *Plugins*, enable the BlockCode plugin
0 commit comments