checking out MakeCode
A friend of mine's son is interested in coding, and we recently sat down to chat about it. Benjamin showed me some cool stuff he'd been doing with MakeCode. I hadn't known much about MakeCode, but the visual coding paradigm is a riff on Scratch.
MakeCode has provided features that make it easier to get some basic physics working. Acceleration and velocity settings are provided, and they evidently have baked in conservation of energy as a default. My recollections of doing the same in Scratch were that without tweaking your velocity to maintain CoE, errors would accumulate, and bouncing objects might eventually come to a stop. Or maybe they gradually went faster and faster. If you watch this program for awhile, you will notice the particles hold the same energy, reaching the same apoapsis* after every bounce. However, they do gradually lose their initial synchronization.
*I was going to use the term apogee, but when I retrieved the Wikipedia link, I found that apogee refers to the furthest point from Earth. Since these balls are in orbits around some hypothetical gravity source (interrupted occasionally by hitting surfaces), the more general term apoapsis applies. Who knew. I guess people that write for Wikipedia, bless their hearts.