Live data from Hacker News

LÖVE: 2D Game Framework for Lua

github.com

141–150 of 229 posts

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

#141
post #117

Earlier quoted context omitted.

In many aspects, Lua is more verbose and awkward than other similar languages. Compare local alive_enemies = {} for _, enemy in ipairs(enemies) do if not enemy.dead then table.insert(alive_enemies, enemy) end end enemies = alive_enemies with enemies = enemies.filter(enemy => enemy.alive)

It's more minimalistic, that's true. But there's nothing stopping you writing or downloading an array library so you can do this: enemies = array.filter(enemies, function(e) return e.alive end) Or even setting a metatable so you can do: enemies = enemies.filter(function(e) return e.alive end)

Due to the embedded nature of Lua, it’s often impossible or difficult to use libraries. And I don’t want to reimplement basic functionality every time I start a new project.

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

#143
post #28

Am I really the first one to mention pico8 in this thread? Anyway, pico8 is another option that has a bit different spin, but you also implement the games in Lua :)

As long as we're doing mentions, here's a reminder. If you bought the racial equality bundle in itch.io you already own pico8. You can download the latest version right now on itch.io.

(It is neither open source nor free)

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

#144
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.

> One of the biggest recent indie hits, Balatro, was made in Löve!

Moonring[1] is another one that that is written in Löve (apparently by the co-creator of XBox's Fable series). The base game is even available for free. I had lots of fun playing it.

[1] https://store.steampowered.com/app/2373630/Moonring/

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

#145
post #16
post #13

Earlier quoted context omitted.

too bad universe doesn't ship with unobfuscated source so that you could see whether you're unlucky, or just skill issue

The source is right there, you just have to grok it.

Good news: the universe is written in LISP. Bad news: with no comments.

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

#146
post #119

Earlier quoted context omitted.

I know it’s bikeshedding and leads to pointless discussions, but in my opinion Lua would be the perfect scripting language if it had 0-based indexing. “It makes more sense this way” is not a good enough reason to break convention.

There is nothing stopping you from doing someArray[0] = "the first item", you know. For me, the table is extremely powerful. I like it that it can be used as a sparse array, a hash, a vector, whatever. Of course one must know, at heart, the difference between pairs() and ipairs() and what it means for your data, though ..

> There is nothing stopping you from doing someArray[0] = "the first item", you know.

Yes, there is:

    local l = {[0] = 'a', [1] = 'b', [2] = 'c'}
    for i, c in ipairs(l) do
        print(i, c)
    end
This will only print the last two pairs. Lua is 1-indexed, end of story. You can store values at index zero, but it's no different than storing values at index -1 or index 'lolrofl'. It does not exist in the array-part of the table as far as Lua is concerned.

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

#147
post #119

I generally very much dislike dynamic languages but for some reason I've always really liked Lua. I'm not exactly sure why to be honest. Maybe because you can fit the whole language spec on a single sheet of paper and adding more advanced features is pretty easy. Love looks really cool. I never got into it personally but I still might

I know it’s bikeshedding and leads to pointless discussions, but in my opinion Lua would be the perfect scripting language if it had 0-based indexing. “It makes more sense this way” is not a good enough reason to break convention.

Sometimes I feel like I'm the only person in the world who does not care about zero-indexed VS one-indexed. It's just the way Lua is, no big deal. Then again, I don't care about significant whitespace either. Maybe I'm just weird.

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

#148
post #139
post #51

Earlier quoted context omitted.

Well, it's kind of a machine code for a self-modifying compiler, so there's that.

The source is not just dna - that's just one type of architecture that exists. There might be others that operate on different instruction sets. The real source is mathematics. But some might say it's incomplete.

Mathematics is the FORTRAN of the real source. Closer to a real source is probably "real" things like atoms and other universal things.

If I remember correctly, Stargate-SG1 at one point had some ideas about this sort of universal language, that multiple species could use for communication, as any sufficiently intelligent specie probably been able to see atoms and so on, but may have completely other way of doing "math-like" stuff.

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

#149

Earlier quoted context omitted.

extract the exe like a zip file, that's how love packages itself. last i looked at the source myself it had comments in still from the dev

I'm really curious how they do version control. The Steam version was created by one guy, but the platform ports have a couple different authors. The Google Play and Xbox PC versions, for instance, have divergences. I wonder how the ports influence the upstream and each other. How do they keep the codebases in sync, while also accounting for platform differences?

Can't say for sure how Balatro did it, but typically you do one shared core and any platforms basically use that core in their own suitable way. Considering it's lua, would feel very natural and be relatively simple for Balatro to do it this way too. Not much to keep in sync, just ensuring the core remains reusable in the ways the platforms need it.

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

#150
post #2

I love LÖVE. For me it sits at the perfect intersection between high and low level abstraction. Unfortunately the latest released version is getting pretty long in the tooth now and a lot of devs use the latest HEAD from the repo since it has better performance and compatibility. One day the mythical 12.0 will get released for real…..

"long in the tooth"

How? has Lua changed any?

Or all the references are to old versions?

Post reply on HN