Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 2.19 KB

README.md

File metadata and controls

50 lines (34 loc) · 2.19 KB

BlockNQC

Visual programming editor to generate NQC code which can then be compiled with a NQC compiler, e.g. WebNQC embedded into WebPBrick.

Blockly

Blockly source code and installation

see https://developers.google.com/blockly/guides/get-started/get-the-code

Blocks

Built-in default blocks

Custom blocks

Open questions

  • Can the number of variables be limited? (All variables are made global, so they are limited by the RCX bytecode interpreter to 32. Blockly treats variables as global by default.)
  • Can the number of options of built-in blocks be reduced? E.g. ^ (JavaScript code generator generates Math.pow()) be removed from math_arithmetic?
  • How to implement the task feature properly? Only tasks should be started/stopped that exists (i.e. where their name has been declared).
  • How can the way of storing/loading programs (as JSON) be improved?

Optional TODOs

(considered nice-to-have)

  • Implement Program() and SelectProgram()
  • Implement functions and subroutines (code blocks can be copy-pasted).
  • Support for loops
  • Support switch statement
  • Implement resource access control (acquire, monitor)
  • Restrict math_single block to abs() and unary minus (or reimplement)
  • Reimplement math_number_property
  • Add support for sign() and bitwise operations
  • Implement OutputStatus()
  • Support counters
  • Support events
  • Add instructions (context-aware tooltips)
  • Add support for "RCX2" functions - need to double-check against used firmware version?!
  • Define aliases for sensor inputs and (motor) outputs.