Pinball with Scittle/ClojureScript01 Mar 2023
The past few months I have been on some longer train rides. These rides had plenty of time to look outside the window to the nice scenery between Dresden and Prague. Other routes were more suitable for programming.
To program on my Android phone I installed the UserLAnd app, which can run a full Ubuntu environment (or other Linux variants), without special permissions or special hacks to the phone or Android system. In this Ubuntu installation I run Emacs for coding with Paredit on Clojure code. The UserLAnd app adds the "Ctrl" and "Alt"/"Meta" key to the Android touchscreen keyboard. Together with some custom configuration in Emacs this makes nice Paredit editing available on my phone.
The program I have been writing on my phone is a pinball simulator. This is based on the code and YouTube video explanations from Ten Minute Physics. This site has many nice tutorials about programming physics, such as what happens when two balls with a velocity collide. This accumulates into a pinball game.
My version of the pinball game is available here: Pinball game with Scittle. It is playable on touchscreen phones and in desktop browsers. The Clojure code is available in the html file via 'view source'!