scratch icon indicating copy to clipboard operation
scratch copied to clipboard

Script starting is complex and inefficient

Open timrowledge opened this issue 11 years ago • 2 comments

Complex mechanism for firing up scripts. Events with string names are passed around and strings compared (sigh) Lots of stupid isKindOf: nonsense to find relevant tiles to check for scripts.

See ScratchStageMorph>broadcastEventNamed:with:

ScratchSpriteMorph>eventReceived: :-(

timrowledge avatar Sep 22 '14 23:09 timrowledge

Side remark: I never looked in detail to scratch sources, but there is a feature I discovered recently: event sending can use computed event names, pls see example. a_1 And 'outside world' can send in events, which are not enumerated by nature. This feature could explain some string compare on event names. Usage of variable names is not possible to the receiver side. This feature is useful for

  • storing events in lists and replay them
  • building commands for external software, like "robot_move_axis(1,300)"

heppg avatar Sep 25 '14 02:09 heppg

That is rather cool.

timrowledge avatar Sep 25 '14 17:09 timrowledge