404 points · by adnzzzzZ · 6y ago · 93 comments
https://github.com/a327ex/blog/issues/35 - BYTEPATH Postmortem (2018)
https://github.com/a327ex/blog/issues/44 - One Year Sales Data for BYTEPATH (2019)
One of the easiest to code cross platform development languages there is.
https://www.lexaloffle.com/pico-8.php
Celeste, a successful commercial game, was prototyped in Pico-8
https://www.wowhead.com/guide=5338/comprehensive-beginners-g...
SQL, Lua, C++, and HTML all around 2006 to host private World of WarCraft servers.
Great talking point at my previous interviews.
A new text editor in Lua, why not: https://github.com/rxi/lite
(Rxi is awesome, see https://rxi.itch.io/)
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, which is also possible to make, but doesn't mean its bikeshedding - which seems to be a totally overused term to basically mean any argument I don't want to have.
Like a string will always be:
s:sub(1, #s)
And a sequence table will always be: for i = 1, #t do
t[i]
end function split_dot(s)
local idx = s:find(".", 1, true)
if not idx then return s end
return s:sub(1,idx-1), s:sub(idx+1)
end
It may come as a surprise that one should use a difference of 2 to skip over one character!In a language that used the half-open interval convention we would end up with:
s:sub(0, #s)
and for i = 0, #t do
t[i]
end
which seem just as good to me.Lua is a language for both hardcore C programmers and complete n00bs wanting to configure their C programs. In that context, position-based indexing makes much more sense, as it's how most non-programmers think.
Lua, both has a dedicated nil value and a boolean type, so there's no reason whatsoever to treat zero as falsey, other than the C cargocult.
As for empty strings, I really don't see the rationale behind it. An empty string is not nothing. At the very least, it still holds the length-data of 0, so it's conceptually more than just nil and should thus still be truthy.
Python does this, which leads to people checking whether a list is empty using `if l` rather than `if len(l) > 0`. I‘d rather they stuck with “explicit is better than implicit”.
Of the three I thought Defold was the best and was supported by a company of commercial game developers. If I were going to start today it would be my top one to consider.
Don't let that stop you using the software of course, as long as you have knowledge of the actual license being used.
[1]: https://www.planimeter.org/grid-sdk/ [2]: https://github.com/topics/love2d
Additionally, adnzzzzZ and I are both from the Facepunch/Knockout community, where a lot of Lua developers have come from due to its popularity in Garry's Mod. It also had a wonderful web dev community.
There are a lot of cool developers from that community, like Gran PC who works at itch.io and worked on The Stanley Parable, and TheBerkin who designed rant, among many other highly skilled individuals, though most people at HN are probably more familiar with developers like sebmck who wrote 6to5, which later became Babel, and Gabriele Cirulli who wrote 2048.
It is written in Rust and aims to be 100% hot-reloadable.
As you mention, Roblox is actually a huge platform for creating games in Lua, and helping other players discover them. Not only do you get a cross-platform game engine with multiplayer built in, it also seems to be quite pleasant to develop for.
For instance, you can create both client-side and server-side Lua in the same IDE, and spin up a local server with a client that connects to it in a single click with no configuration. You can also add breakpoints and step through both sides in the debugger. Pretty awesome as I was used to client-side JavaScript and server-side Python before.
Because the platform encourages experimentation, I think we'll see many new game ideas and probably even new genres emerging from Roblox.
It's always interesting to see games published made with LÖVE in lua. I'm writing an "Advance Wars 2" clone at the moment in LÖVE and hope to get some inspiration from your code.
You seem to use a lot of global variables. Is that on purpose? I try to do as much as possible with local variables (although especially in game logic global entities are sometimes just the easiest way). I'm very wary of 1. global lookup overhead and 2. confusing errors when accidentally overwriting an existing global variable.
As I have never noticed both of these I'm not sure whether my angst is justified ;-)
https://github.com/a327ex/blog/issues/24
It mainly boils down to the fact that an indie game written by one person and never maintained after release doesn't need to be written for maintainability. Supposedly there are productivity gains the author receives from doing this.
Personally, I disagree from past experiences dealing with hundreds of globals in legacy code, but to each their own.
I see the point that a single developer does not have to focus on maintainability so much. And if it works for him -- as it obviously does -- more power to him.
But for me, I do not think I am mentally capable to reason about my program if it has to many globals. If I can have as much as possible local, my mental model also can be local.
I am very new to gamedev, so this way of thinking may not be appropriate in the long run.
A rich git history a lot of the times imo is necessary to understand why some parts are written the way they are written, and is also enjoyable to read.
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.
(PoE is a awesome ARPG with a massive build customization and I believe inspired game creates by OP)