My brother and I are huge fans of Lisp, and we decided to give implementing BiwaScheme into PlayCanvas a shot!
A couple things could probably be handled better, for example although we initially intended for you to use schemeRunner.js for all of your game objects, we realized a little too late that this didn’t create much flexibility in running multiple Scheme files on one object, as well as the handy feature of dragging and dropping assets onto a script’s attributes, so we kind of took the lazy way out of both of those problems and just created duplicates of the same runner script with the attributes we needed.
It works though! We re-wrote the entire example ball game in BiwaScheme for you guys to get an idea of the workflow if you’re interested!
Feel free to ask questions or make any improvements as you see fit!
I think by far the most commented Scheme script is teleportable.scm, so I would look at that first. The original scripts are also there for you to compare and contrast. They’re mostly one to one, although we got rid of the “to” and “from” variables in teleport. We could add those in pretty easily, but I think it’s pretty obvious how to go about it from the rest of the code anyway.
Thanks for reading!
Comes with a single schemeCacher.js file that you can use to define the script names and attributes necessary for your SCM file.
As always, feel free to leave any suggestions!