For those in the community that are interested in a free 2D game engine (versus 3D like Af-Frame), I'd like to recommend using Kaplay with Droidscript:
https://kaplayjs.com/
(I'm not a Kaplay developer-- just a supporter and community member).
A while back the Kaplay developers on my request added a single .html file build feature for apps developed in Kaplay which turns any app you develop in Kaplay into an .html file that can be shared with others that they can open in their browsers off-line.
Since the .html build feature generates an .html, I found it easy then to just insert the contents of that .html file into a DroidScript "html type" app, and it runs. I also found that I was able to then build the html type app imported from the Kaplay .html build into an .apk using the apk build plug in and found the .apk install also ran well!
If you are interested to try it out, you can go to the Kaplay website (URL above), select the "playground" button, create a 2D app, then look for the "Project" option on the top right of the IDE, and select "Build HTML" to download an HTML to import into Droidscript.
Fyi-- have fun!
Sincerely,
Mike
PS,
Please note that the html build from Kaplay will create a larger app then if you built a similar app using a standard js build (e.g. separate html and kaplay.js files) due to the Kaplay html builder's use of base64 encoding to store the javascript code. Thus, to build a leaner app you would likely want to download Kaplay.js and build the app in Droidscript Native more the traditional way, but using the single-file .html generated by Kaplay playground seems the easiest method.