urn-love2d-bindings - Write Löve2D games in Lisp!
Posted: Thu Jan 25, 2018 11:50 pm
These are bindings for Löve2D for the Urn programming language, which is a self-hosting Lisp that compiles to Lua. It outputs single, mostly readable, dead code-eliminated, fully self-contained Lua files, making it easy to use within any context.
You may find the bindings on GitLab.
If you're using Arch Linux, you can get this library, as well as Urn, from the AUR (not maintained by me).
To get started, simply follow these steps:
Run these commands:
Create a file game.lisp with these contents:
Now, assuming "urn" is the Urn compiler, run this:
The Urn compiler will now have created a self-contained main.lua file, which we can run with Löve2D as usual:
If everything worked correctly, you should be able to see a window with the text "Hello World!", as expected.
Further useful information:
To prove this library works in practice, I've written a basic Pong example with these bindings, which you can find and learn from here.
GitHub user paines has figured out how to use lovelive to live compile Löve2D games with Urn.
You may find the bindings on GitLab.
If you're using Arch Linux, you can get this library, as well as Urn, from the AUR (not maintained by me).
To get started, simply follow these steps:
Run these commands:
Code: Select all
mkdir my-project
cd my-project
git clone https://gitlab.com/Lignum/urn-love2d-bindings.git love
Code: Select all
(import love/love (defevent))
(import love/graphics)
(defevent :init ())
(defevent :draw ()
(love/graphics/print "Hello World!" 64 64))
Code: Select all
urn game.lisp -o main
Code: Select all
love .
Further useful information:
To prove this library works in practice, I've written a basic Pong example with these bindings, which you can find and learn from here.
GitHub user paines has figured out how to use lovelive to live compile Löve2D games with Urn.