I've never heard of Lua, but now that I am looking at it, it seems very friendly. Love how they call things what they are, for example `local` is just a local variable, or `repeat X until Y` for a loop. It's a joy to see, to be honest.
1-index kept throwing me off though
I open sourced my game along with a tutorial on how to make it using Lua
51–60 of 96 posts
Re: I open sourced my game along with a tutorial on how to make it using Lua
#52I've never heard of Lua, but now that I am looking at it, it seems very friendly. Love how they call things what they are, for example `local` is just a local variable, or `repeat X until Y` for a loop. It's a joy to see, to be honest.
Re: I open sourced my game along with a tutorial on how to make it using Lua
#53Earlier quoted context omitted.
The main problem with that decision is that every discussion having anything to do with Lua always devolves into repetitive bikeshedding about the 1-indexing.
I think the main problem with 1-indexing is that it makes some formulas that depend on the length of an array more complicated. Not a huge problem, but it's kind of annoying.
In the end, in a language where you aren't doing pointer arithmetic, the sides are pretty even. We just tend to side with tradition, because it's easier to.
Re: I open sourced my game along with a tutorial on how to make it using Lua
#54Earlier quoted context omitted.
In the context of language design, the arguments for 0-based indexing rise above bikeshedding. https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E... Sure it may not be the most critical point about language design, but it's not just bikeshedding either. For one thing, it is a language semantics issue rather than plainly syntax issue. I still like Lua, and maybe you don't even agree with Dijkstra's argument,…
Roberto Ierusalimschy makes an interesting point on this in an interview[1] last year. > When we started Lua, the world was different, not everything was C-like. Java and JavaScript did not exist, Python was in an infancy and had a lower than 1.0 version. So there was not this thing when all the languages are supposed to be C-like. C was just one of many syntaxes around. > And the arrays were exactly the same. It’s v…
Re: I open sourced my game along with a tutorial on how to make it using Lua
#55Also, are you using moonscript and SDL2 in this?
Great project by the way! The pixellated graphic effects are clever and unique.
Re: I open sourced my game along with a tutorial on how to make it using Lua
#56I've never heard of Lua, but now that I am looking at it, it seems very friendly. Love how they call things what they are, for example `local` is just a local variable, or `repeat X until Y` for a loop. It's a joy to see, to be honest.
A new text editor in Lua, why not: https://github.com/rxi/lite
(Rxi is awesome, see https://rxi.itch.io/)
Re: I open sourced my game along with a tutorial on how to make it using Lua
#57What was the process of compiling your love to a standalone executable? I'd love to try out LOVE but I dont want to sink time in unless the process of packaging it up into something I can send my friends is painful or not well supported. Also, are you using moonscript and SDL2 in this? Great project by the way! The pixellated graphic effects are clever and unique.
When I packaged a game for Mac it was a bit more painful but not too bad, and I told Linux users to use wine. Some people have made it pretty easy to package love games for Linux since then though.
Re: I open sourced my game along with a tutorial on how to make it using Lua
#58I've never heard of Lua, but now that I am looking at it, it seems very friendly. Love how they call things what they are, for example `local` is just a local variable, or `repeat X until Y` for a loop. It's a joy to see, to be honest.
A decade ago, I thought Lua would be where JS is today. But JS won... A new text editor in Lua, why not: https://github.com/rxi/lite (Rxi is awesome, see https://rxi.itch.io/ )
Re: I open sourced my game along with a tutorial on how to make it using Lua
#59Earlier quoted context omitted.
A decade ago, I thought Lua would be where JS is today. But JS won... A new text editor in Lua, why not: https://github.com/rxi/lite (Rxi is awesome, see https://rxi.itch.io/ )
rxi indeed is awesome! Do you know in what language/engine his (her?) tools on itch.io are written? They all have an awesome pixelart look to them and I wonder if (s)he uses lua for them too.
Re: I open sourced my game along with a tutorial on how to make it using Lua
#60Earlier quoted context omitted.
Roberto Ierusalimschy makes an interesting point on this in an interview[1] last year. > When we started Lua, the world was different, not everything was C-like. Java and JavaScript did not exist, Python was in an infancy and had a lower than 1.0 version. So there was not this thing when all the languages are supposed to be C-like. C was just one of many syntaxes around. > And the arrays were exactly the same. It’s v…
I'm confused. Lisp does 0-based indexing. Lisp predates C and C-like languages by decades.
(Bit of a tangent: Lisp predates C by at most 2 years if you count McCarthy's original 1960 paper, but afaict their respective implementations both got their first public distribution in 1962. Of course, Lisp was set to gain momentum from that time until the AI winter, while C was practically confined to UNIX until the 80s...)