aroberge / reeborg

Enhanced Karel-the-robot clone
http://reeborg.ca/reeborg.html
Other
47 stars 36 forks source link

native python engine #456

Open dz0 opened 3 years ago

dz0 commented 3 years ago

would it be hard to port reeborg engine to lets say turtle backed graphics?

so worlds/exercises could be reused (solved) with mu-editor or trinket.io (skulpt)?

aroberge commented 3 years ago

The idea of having some turtle-based exercises is something I've identified a long time ago, and which I had planned to do. See for example https://github.com/aroberge/reeborg/issues/426 and https://github.com/aroberge/reeborg/issues/419. Because Brython has a Turtle module (to which I made some significant contributions; see https://github.com/brython-dev/brython/issues/709 and, more importantly, https://github.com/brython-dev/brython/issues/739), it should be fairly easy to integrate with Reeborg's World.

Reeborg uses a mixture of Javascript and Python (translated by Brython into Javascript). As such it is not really designed for being used by a pure Python environment (such as that provided by Mu).

It might be possible to reuse much of it to use within trinket.io/skulpt but it is not something that I would be interested in working on.

To be honest, I do not plan to invest much time, at least not in the near future, on further development of anything related to Reeborg's World. I can provide guidance/make suggestions for anyone attempting to do so. But, at the moment, my free time is spent improving a different project [1] which, I believe, will be useful for many more users, most of which would be the same users interested in learning Python using the turtle module.

[1] https://aroberge.github.io/friendly-traceback-docs/docs/html/

dz0 commented 3 years ago

I had a bit different idea -- to reuse the grid-world-problems -- but play/animate solution in some native py graphics engine (for example, wrapped around turtle) instead of wrapped around JS.

I understand it could be done quite straightforward -- as pre-JS versios were native python.. I just thought about it again, as mu-editor seems very begginer-friendly -- so could just reuse its debug feature (and maybe optioaly hide stepping into graphics engine lib ).

But anyway thantks for the context of affairs :)