blockpy-edu / blockpy

Blockly that's more Python than JavaScript, powered with Skulpt
Apache License 2.0
403 stars 133 forks source link

Simulation canvas as well as chart plotting canvas? #78

Open psychemedia opened 5 years ago

psychemedia commented 5 years ago

I recently came across a simple browser based 2D robot simulator, ev3dev-sim (repo and demo) that runs under skulpt.

EV3DEV_Python_Simulator

My first thought was to wonder how easy it might be to switch out the ev3dev-sim editor for BlockMirror, but then I started wondering whether the canvas might be something that could be integrated into BlockPy, offering a robotics context as well as the data science context, to motivate programming activities. The robotics context might also generate data that could be used in the data science/analysis/visualisation context?

acbart commented 5 years ago

There's another group interested in adding robots (#75). In general, I definitely want to add more contexts to BlockPy. As of the summer, Turtles are working and I have preliminary code for simple image manipulation mocking PIL (far from release ready, though). One of my major priorities for the next year will probably be a game API - I've been trying Arcade this semester through Thonny, but I think I'm now leaning back towards Pygame. Just from my own course survey data, I know that robotics would be a great addition too.

Mechanically, the new infrastructure should make it relatively easy to add in new "consoles". These consoles can stretch to replace the Feedback area, giving more horizontal space, and stretch vertically too. I haven't set it up, but I was considering some functionality to have it pop up a "window" within the current tab.

Of course, the major limit here is that we need more dev cycles. There's dozens of unclosed TODOs from over the summer, we have to spend some time reclaiming performance from Pedal in Skulpt, and I'd like to make that game API. But I'll be interested in looking over #75 to see how much of that is directly usable.