Suppose someone wanted to teach computer programming concepts using Julia through interactive graphical animations a-la scratch? Are there any packages that let you open a window and draw objects/move them around/animate them?
I’ve seen Luxor, but it seems like it’s designed around drawing static image files (like png or svg files) and/or maybe combining them into a static animation/movie.
Yeah, the audience here has already learned some scratch, and wants to move up to something a little more useful to control stuff on an RPi but the motivating factor of watching graphics move around on the screen is still strong.
The responses here give a lot of examples of alternative teaching languages to Scratch, but I’m still interested in the original question. Are there Julia packages for live sprite-like object animation and interaction (e.g. collision detection) in a window?
Yes. I’m still interested in that sort of thing as well. Right now I’m looking into doing a GtkReact based window for very simple Mandelbrot set drawing, zooming, interaction. I think you could probably do sprite based stuff this way too, but it’s all going to be fairly low level.
If you are looking for general interactivity with few constraints, Pluto.jl might be useful.
It displays arbitrary graphics, and if those graphics depend on parameters defined in other cells, the graphics will get updated immediately when their params change. You can also do animations by having variables that are bound to time.
On its own it is not geared towards kids though. But its reactivity probably does half of what you are looking for, and its generality should allow you to use it with whichever libraries you want. Using it to play with https://github.com/GiovineItalia/Compose.jl graphics might be accessible and fun.
Hey! I am very interested in this question! kolia mentioned my Pluto.jl project, which is primarily designed for the undergraduate level. It does make programming and interactivity easier, but it does not provide anything exciting (graphics, games) on its own.
Pluto with Luxor might be nice for education, its author cormullion made this cool GIF. But Pluto’s interaction is always one-directional: sliders and buttons defined in different cells - it’s not a platform to make games
At the school where I worked we had a lot of success with scratch! With more advanced students we started with python, with PyGame (also works online through repl.it, and students can share games with eachother), or by controlling a raspberry Pi. (also have a look at the micro:bit if you want to do electronics)
Minecraft Education edition looks exciting - there’s an in-game scratch-style programing language to control the world with. And this has a natural advancement to Julia: there is a Julia package PiCraft.jl to control the minecraft world using Julia. Less intuitive than the control-flow-language, but you can do more powerful things like fractals!
You need an environment that provides some widgets, like sliders and checkboxes. Jupyter notebooks can use Interact.jl for these (if I remember right) but these days I’d use Pluto.jl for this kind of thing.
(Does VS-Code have widgets and/or Jupyter notebook integration? I haven’t looked yet.)