20 ms·
Show HN: I open sourced a game I just released on Steam, written in Lua
- wheybags 5y agoLove2d (the lua engine used here) is really great. If I were teaching a newbie to programming, I'd probably have them start with love. It makes it super easy yo just get something on screen, and you're not screwing around with configuration, build systems and package managers etc (the death of productivity IMO, especially for a beginner). I used it on a recent jam game too (https://wheybags.itch.io/drilbert https://wheybags.itch.io/drilbert)
- mikepurvis 5y agoSeems like it could be nice next step up from Pico-8, especially for users who’ve moved on to using external art tools and text editors anyway.
- spicybright 5y agoAnother good beginner game dev framework is kaboom.js https://kaboomjs.com/ https://kaboomjs.com/ Example project online: https://kaboomjs.com/examples#level https://kaboomjs.com/examples#level And just to add, if anyone has been using love2d or other frameworks like it, give GoDot a try. I started using it a few weeks ago and it's amazing how much I'm getting done with my game.
- jmiskovic 5y agoBeen using Love2d for few years now, and you are right on point that it's great for education. You can get fun things to happen with few lines of code. The whole API fits into your head, and together with Lua's simplicity this is a powerful combo. Any complexity in code comes from your side. With live reloading, development happens in tight loop with running environment, and this easily drags you into the zone. At the same time the framework is low level. The included functions cover only interfacing HW and rendering graphical primitives. It's just a thin abstraction layer that greatly simplifies accessing OS features. Everything else like scene management, AI navigation, live code reloading, skeletal animation, common graphics shaders, tile maps, sound management, UI, that's all left out of the framework. Numerous Lua libraries were made to fill in the missing stuff. You get to pick from different solutions and glue them together with script code. This is very consistent with general Lua mindset. Neither functional constructs nor OOP are not included in Lua, but both can easily be brought in with any of dozen libraries. It creates fractured space and it's kind of bazaar of different tech stacks that are same but different. Other frameworks and engines (Defold, Solar2D, Roblox) that use Lua all take integrated approach where more of functionality is crammed into engine itself. This is a more closed solution where you aren't supposed to extend the engine much, just script inside it.
- canadianfella 5y ago> Neither functional constructs nor OOP are not included in Lua That’s hard to read.
- Banana699 5y agoI think they didn't mean the double negative, since they continue with "both can be brought with libraries" which implies they are not included in the core language, which is the opposite of this doubly negated statment.
- samatman 5y agoIt's very likely, given the occasional dropped article, that the poster in question is not a native English speaker, and probably from a language where 'double negative' is agreement, as in "we don't need no education".
- jmiskovic 5y agoYou are correct that I'm not a native speaker, and also that my language uses double negatives. Alas, this mistake was due to editing small part of sentence and neglecting to re-read the whole thing. I won't try to avoid not making this error never again.
- deleted 5y ago[deleted]
- jmiskovic 5y agoAlso, thanks for pointing out the dropped articles. The gmail spell checker often wants to insert those into my texts. While in most cases it felt they were not necessary, obviously the omission gets noticed.
- lc9er 5y agoI really enjoyed this set of tutorials for Tic-80, which also uses Lua (or Fennel/Moonscript/Wren/JS). The series was a really great intro not just the tic-80 engine, but programming concepts in general. A friend of mine was able to take some of the concepts he learned and was able to improve the bit of spreadsheet/data munching that he has to do for his otherwise non-technical work. (https://m.youtube.com/playlist?list=PLvOT6zBnJyYF3FzmfXz2QXMA8xk7JHA_b https://m.youtube.com/playlist?list=PLvOT6zBnJyYF3FzmfXz2QXM...)
- yonifei 5y agoFlash with ActionScript 2/3 was incredible for this sort of thing as well.
- nicetryguy 5y agoPeople argue that Flash has been completely replaced with HTML5, but, there is no GUI / interface for designing games / animations for the web that even comes close to what Flash had. I miss me some movieclips =(
- VWWHFSfQ 5y agoI learned to program with Flash MX 2004. I had no idea what I was doing but within a day or so I had made some pretty cool stuff that I was proud of. Was hooked from then on.
- geswit2x 5y agoHaxeFlixel + FlashDevelop
- emehrkay 5y agoThe Flash IDE was top notch. And the fact that it made a one-file executable was pretty cool too. And their version of javascript with classes was damn cool (was it es6?). Flash had a nice dev-to-executable experience, too bad it was soured by its browser inclusion. It could've been a great alternative to Java/Electron as the build once run anywhere lang. Adobe was a bit too early with Air
- ronyeh 5y agoAS 3.0 was ecmascript and similar to typescript! I loved actionscript 3.
- fiddlerwoaroof 5y agoAS 3.0 was the closest we got to an ECMAScript 4 implementation.
- grawprog 5y agoLove2d was the first 'real' game engine I ever played around with. I made a bunch of silly little games with it. My only real problem is not really to do with love2d but lua itself. Debugging lua is a pain. There was one debugging addon I remember finding for love2d that was sort of hacky and didn't work that well. Otherwise, honestly it's a great little engine and like you say, if you're pretty new to programming and want to try making games for fun, lua and love2d is a great way to go.
- seany 5y agoSolar2d is also quite good. https://solar2d.com/ https://solar2d.com/ its technically older than love, but it started as Corona (not opensource)
- op03 5y agoWhy snake like? Just curious.
- drchickensalad 5y agoThere's a sort of mini genre of build simulators stapled on to a simple shell game (which the OP is one of the main contributors to). It works well because the controls are simple, the mechanics that builds tie in to are simple to grasp, and it takes way less dev effort. For this specific game, snake works super well because it's very inspired by auto battlers, so different units as segmentd doing their thing and being killed individually works very well with snake.
- Kiro 5y ago> There's a sort of mini genre of build simulators stapled on to a simple shell game Where can I find more games like that?
- adnzzzzZ 5y agoI don't think there's any central place or tag that captures this idea properly. Generally games like this tend to happen a lot in roguelike/roguelite tags (https://store.steampowered.com/tags/en/Roguelite/ https://store.steampowered.com/tags/en/Roguelite/), but they can be anywhere really since theorycrafting/build-making is a very common theme in games.
- drchickensalad 5y agoI wish there was a steam tag people used but I think it's too niche lol. Here's the ones I've found on steam - Nova Drift - SNKRX - BYTEPATH Back in the day I played so many flash games like this, but unfortunately it didn't seem to spawn as much of a genre lol.
- thekyle 5y agoI'm glad to see that GitHub finally allows embedding videos in the README.md so that people can stop using gifs there.
- mrighele 5y agoIn Firefox under linux I see a "No video with supported format and MIME type found". It seems that Gifs are still more widely supported...
- c01n 5y agoHmm, I use Firefox (dev edition) on Linux and the video is playing with no problem
- spicybright 5y agoI can see it in firefox stable under macos
- BlackLotus89 5y agoMaybe you use umatrix? You have to allow githubusercontent.com
- lavela 5y agoI can see it in firefox stable under fedora
- gentleman11 5y agoI could see it with Firefox on iOS
- wos-dv 5y agoLooks sick!
- lisardo 5y agoGo Adonaac!
- jedimastert 5y agoI'm reminded of the talk "Juice It of Lose It" <https://www.youtube.com/watch?v=Fy0aCDmgnxg https://www.youtube.com/watch?v=Fy0aCDmgnxg>. This looks like a very juicy game. There's also an excellent video by Mark Brown, a fantastic resource for game design discussion <https://www.youtube.com/watch?v=216_5nu4aVQ https://www.youtube.com/watch?v=216_5nu4aVQ>
- ivanr 5y agoI'd love to play it, but it seems to be Windows only. Any plans to support other platforms, for example macOS? FWIW, I'd probably prefer to play it on iOS if the controls are decent.
- pixelbro 5y agoIt's an open source project, and the engine supports Mac OS, though Apple being Apple you can only target any of their platforms by investing in their overpriced hardware. You realize you're on hacker news, right? Anyone with the right machine can fork it, strip out the Steam integration and ship it on your preferred platform.
- cf 5y agoMaybe he would like to see it supported for Linux on Steam and perhaps send the creator a little cash as well?
- wizzwizz4 5y agoLÖVE works well on Wine.
- JasonFruit 5y agoLÖVE works well natively on Linux.
- wizzwizz4 5y agoAncedotally, LÖVE software written for Windows can be hard to get running natively on Linux properly.
- throwaway3699 5y agoHence the cash motivation for real support.
- unnouinceput 5y agoQuote: "You need to have Steam up to run it successfully" So for an open source game I need to have a proprietary 3rd party software running and I am not talking about video card drivers? Yeah, hard pass.
- kroltan 5y agoHow dare someone release something that was otherwise paid for free and not cater to my individual moral interests? If only there was a way to change the game so it did not depend on the evil library...
- teddyh 5y agoIs it illegitimate to criticize something which was freely obtained?
- throwaway3699 5y agoWith moral grandstanding? Yes. Especially when OP made it clear they were not going to actually obtain and run the software. After all, they could've added a non-Steam patch being OSS.
- nix23 5y ago>With moral grandstanding? Yes. So stop criticize air pollution?
- drchickensalad 5y agoI will buy every game you release :)
- offtop5 5y agoAmazing, I purchased it to show support and I love this. The music is cool too, this will be the game I play while waiting for Unity builds ! Please port to Android/IOS !
- sundvor 5y agoAlso purchased it after seeing this; looking forward to trying it out, and will check out the source code as well.
- aquova 5y agoFor anyone else looking to make a game in Lua + Love2D, a developer wrote an entire tutorial for how they made their game, which is also released on Steam: https://github.com/a327ex/BYTEPATH https://github.com/a327ex/BYTEPATH. Both the game and the tutorial are high quality, and provide really useful insights.
- newobj 5y agoLöve2d is the best. I actually like to code for it in TypeScript and then use the https://github.com/TypeScriptToLua/TypeScriptToLua https://github.com/TypeScriptToLua/TypeScriptToLua transpiler to spit out Lua code. Best of both worlds scenario IMHO. Once my Lua codebase hit 10k lines or so I found it very difficult to maintain. TS has really helped there while maintaining all the dynamism and fun of Lua.
- toastal 5y agoLooks like Wu has a Löve wrapper https://github.com/wu-lang https://github.com/wu-lang
- fileeditview 5y agoInteresting. Never heard of Wu before. The love wrapper "lover" however seems to be very immature. At least its roadmap indicates this.
- spentu 5y agoI wish that people who abandon their early access games would always release the source code for people who are passionate about the project. For example, objects in space seems to have a lot of potential. And as a person who bought the game it sucks to see that the development was stopped.
- davidp 5y agoThe day-by-day dev log[0] is worth a read on its own. It's impressive what a single developer can do with the right determination and discipline. [0]: https://github.com/a327ex/SNKRX/blob/master/devlog.md https://github.com/a327ex/SNKRX/blob/master/devlog.md
- slver 5y agoIt's really odd to me Lua is only used for games. It could take the same place Python has and many other things. It's a nice platform for scripting.
- genericone 5y agoI would agree that generally Lua has been used for games... But NodeMCU is one of the more well known ESPxx microcontroller firmwares, Adobe Lightroom uses Lua for plugins, and just now I found this big list as well on wikipedia: https://en.wikipedia.org/wiki/List_of_applications_using_Lua https://en.wikipedia.org/wiki/List_of_applications_using_Lua More notably for myself, my work's robotics applications are developed with Lua 4.1, so you might actually find the small embeddable language used in more places than you might expect, especially where you don't want to do the scripting level work ( business layer) in C/C++ at the same layer your low level real-time stack operates.
- yakubin 5y agoLua is also used for: - AwesomeWM configuration - Wireshark dissectors - Nmap scripting
- mdaniel 5y agoAnd OpenResty extensions (and sometimes configuration of the built-in ones), as one can see in use by the nginx kubernetes ingress controller IIRC the Kong api gateway uses it in a similar way There's a Lua interpreter in Redis, too
- atweiden 5y ago> It's really odd to me Lua is only used for games. It could take the same place Python has and many other things. It's a nice platform for scripting. I’ve written quite a bit of code in Fennel [1], a Lisp language which compiles to Lua, and enjoyed thoroughly the simplicity of Lua. I implemented map, filter and reduce by hand using Lua tables and genuinely experienced joy with how Lua tables are such a unifying concept throughout the language. I even enjoyed 1-based array indexing after a short while. (Furthermore, I have to say Lua is meant to be a Lisp, insofar as homoiconicity is the simplest language syntax, and being Lua underneath removes all the esoterica from Lisp, making the end result even simpler.) But Lua was designed from the very beginning with the assumption it would be embedded within a systems programming language like C. Lua lacks basic functionality other, more full-featured scripting languages ship support for out of the box, e.g. Lua doesn’t even have mkdir. Also, once you survey the landscape for argument parsing in Lua, or cross-platform statically linked binary compilation in Lua, you realize the Lua ecosystem itself expects you to be using Lua as an embedded scripting language. I was able to get really far embedding Fennel in Rust, for example [2]. Rust is miles ahead of Lua in all the areas Lua is lacking. Instead of clumsily tacking on an object system on top of Lua, write Rust structs. Or instead of using ancient libraries for cross-platform filesystem and IO handling, leverage the native Rust ecosystem (see: dirs-next, clap). My idea was to just embed Fennel in Rust, and write almost no Rust. And while it does certainly work, I’m increasingly of the belief you should use the language best for the task. Lua is best at being an embedded scripting language, good when you want to ship an interpreter on top of a C/Rust application for instance, or when you want something fancier than TOML or INI for config. (In this department, see also the work being done on Starlark in the Bazel ecosystem [3].) [1]: https://fennel-lang.org/ https://fennel-lang.org/ [2]: https://git.sr.ht/~ioiojo/include-fnl https://git.sr.ht/~ioiojo/include-fnl [3]: https://github.com/facebookexperimental/starlark-rust https://github.com/facebookexperimental/starlark-rust
- Tourniquet 5y agoThanks for this, will pick through it to see if we can pick up any better practices or patterns. My 11yr old son and I playing with Love for a few weeks, learning OO, LUA, and some game engine principles. https://github.com/ppriest/love https://github.com/ppriest/love if interested.
- dgb23 5y agoThe game looks very well made. I like the LOVE framework as well!
- worldsayshi 5y agoI just played through it and found the game style and design really appealing. And it also felt really well polished. Really nice music and juicy animations! It felt like it would be thrice as fun with a bit more challenge though. A bit of balancing of the numbers. Right now I managed to beat the game without understanding my choices and without improving my technique.
- linux_is_nice 5y agofun fact: there's an easter egg on https://love2d.org/ https://love2d.org/
- albertzeyer 5y agoThere is an interesting blog post by the author on the development and his experiences and lessons, on LÖVE, coding style, reuse of code, etc: https://www.a327ex.com/posts/lessons_second_game/ https://www.a327ex.com/posts/lessons_second_game/
- harryvederci 5y agoI really like the author's transparency, seems like an awesome person.
- junon 5y agoLOVE is great for anything that isn't too crazy complex. Also, I bought both your games today on steam and thoroughly enjoyed both of them. Thank you :)
- pabs3 5y agoI kept wanting to zoom out while watching the demo video.
- nathias 5y agoLua is great, too bad about the array count tho.
- harryvederci 5y agoThat's just part of the language to keep nitpicky people out of the community ;)
- slava_kiose 5y agoIt's cool. Really great.