blockly-samples
blockly-samples copied to clipboard
Turtle Movement Block Set
Category
Plugins
Component
new component
Is your feature request related to a problem? Please describe.
Blockly developers often implement a block set that generates code like:
- forward(), left(), right()
Describe the solution you'd like
A block set that developers can easily imports for blocks that generate:
- forward(), backward(), left(), right()
- (optionally) turn(angle)
Describe alternatives you've considered
Additional context
Points for discussion:
- Which blocks?
- For inspiration, look at Blockly Games Turtle and other turtle projects.
- What language should be generated?
- Javascript is a good place to start. Adding other generators is optional.
Turtle blocks for blockly games are defined here.
As Neil mentions here, even defining a general set of turtle blocks can be tricky.
Some applications want north/south/east/west movement, some want up/down/left/right movement, some want forward/backward/left/right movement, some want absolute x/y movement, some want relative x/y movement. And within each group, some want constrained magnitudes (e.g. 1 step, 90 degrees), whereas others want unconstrained magnitudes (e.g. 4.2 steps, 22 degrees). Some applications want computed magnitudes, others want simple built-in fields.
But it could still be helpful to have a set of simple forward/back/left/right blocks.