Introduction of uBlockly - Reimplementation of Google Blockly in Unity

1min read

Contents

  1. Introduction
  2. Blockly Model
  3. Code Interpreter and Runner
  4. UGUI Design

For Chinese:

  1. Introduction
  2. Blockly Model
  3. Code Interpreter and Runner
  4. UGUI Design


Block-based programming language has seen a growing popularity nowadays, both in Kids' education and Robot for fun industries. Google Blockly has provided a fundamental solution facilitating building flexible and interactive Web Block-based Programming Apps. So I decided to move it to Unity. However, due to the incompatibility and dissimilarity of the two platforms, I have to reimplement the core logic in C#, and provide specific impementations for the code runner and UI, which make up UBlockly.

Showcase

Modularization

UBlockly consists of 3 modules: Blockly Model, Code Interpreter and Runner, UI.

Blockly Model is the core logic, which is translated from Google Blockly.

Code Interpreter is IEnumerator-based mechanism for interpreting block behaviors in C# functions. Code Runner is a controllable runtime for running those interpreters.

UI is implemented in UGUI, facilitating automatic block generation and dynamic layout.

The details of these 3 modules will be given in the following 3 blogs.

Module

How to Use

Check README for how to use this cool project!


MORE FROM THE BLOG

The UGUI Design of uBlockly...

For Chinese:...

5min read

The Interpreter and Runner of...

For Chinese:...

6min read

The Blockly Model of uBlockly...

For Chinese:...

4min read

Automatic Chain's Animation On wheel...

In last blog, I introduced the construction of the chains on wheels. This blog will tell the animation calculations. The...

3min read