Live data from Hacker News

LÖVE: 2D Game Framework for Lua

github.com

21–30 of 229 posts

Re: LÖVE: 2D Game Framework for Lua

#22
post #18
post #8

Btw, Love2D is based on SDL2. If you hate Lua but needs the same cross-platform capabilities, you can use an SDL2 binding in other languages or make your own.

SDL3

Definitely SDL2.

Author is currently building version 12 which will be using SDL3. But it's been in development for quite some time with no clear end date afaik.

Re: LÖVE: 2D Game Framework for Lua

#23

Earlier quoted context omitted.

Balatro ships with the entire unobfuscated Lua source by the way. I once checked if the odds stated on a card were implemented wrong. Turns out no, the code checks out, I'm just that unlucky.

hahaha, I did the exact same thing after the game came out to see if wheel of fortune was really a 1/4 chance

lol, love seeing that I'm not the only one who did this. Being suspicious of WoF was the first and last time I peeked at the Balatro source.

Re: LÖVE: 2D Game Framework for Lua

#25
post #18

Earlier quoted context omitted.

SDL3

Definitely SDL2. Author is currently building version 12 which will be using SDL3. But it's been in development for quite some time with no clear end date afaik.

It is easy to get Lua (with LuaJIT) working with SDL3, though.

That obviously isn't a replacement for the framework but it is perfectly doable if someone just wants to write a game in Lua with minimal overhead.

Edit: I mention LuaJIT specifically because it lets you create metaclasses around C objects, which is much easier than messing with the Lua stack from C, and it's easy to make a 2d vector class from an SDL Point or a spritesheet or what have you. There are a few rough edges like dealing with pointers and gc but to me it's the best of both worlds (the speed of C, and some implicit type checking, and the flexibility of Lua.)

Obviously you could do it the hard way and the other way around with normal modern Lua but it's such a pain in the ass.

Re: LÖVE: 2D Game Framework for Lua

#26
LÖVE seems amazing, I’ve always looked at it with curiosity. There’s also the legendary Harvard CS50’s Introduction to 2D Game Development, which now uses it in its latest version.

But I’m wondering: why do mature tools like this sometimes end up on Hacker News’ front page without any particular news (like new releases or updates)? It’s just a curiosity, not a critique.

Re: LÖVE: 2D Game Framework for Lua

#27
post #7

One of the biggest recent indie hits, Balatro, was made in Löve! I really like it, the developer experience is so smooth for beginners, just drag a zip onto the exe and it starts. And the APIs are simple enough to memorize while allowing pretty cool rendering stuff.

In case you're curious, here's a Nix derivation to make Balatro for any other system playable on Linux:

https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ba...

I wrote half a blog post when I did the derivation. One day, I should finish it and post it here.

Post reply on HN