[HN Gopher] Show HN: I open sourced a game I just released on St...
       ___________________________________________________________________
        
       Show HN: I open sourced a game I just released on Steam, written in
       Lua
        
       Author : adnzzzzZ
       Score  : 379 points
       Date   : 2021-05-23 11:17 UTC (11 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | dgb23 wrote:
       | The game looks very well made. I like the LOVE framework as well!
        
       | thekyle wrote:
       | I'm glad to see that GitHub finally allows embedding videos in
       | the README.md so that people can stop using gifs there.
        
         | mrighele wrote:
         | In Firefox under linux I see a "No video with supported format
         | and MIME type found". It seems that Gifs are still more widely
         | supported...
        
           | lavela wrote:
           | I can see it in firefox stable under fedora
        
           | butz wrote:
           | You need to install non-free video codecs. It would be great
           | if GitHub recommended using open video codecs for people
           | uploading videos. AV1 would be a good candidate, but Safari
           | still doesn't support it.
        
           | BlackLotus89 wrote:
           | Maybe you use umatrix? You have to allow
           | githubusercontent.com
        
           | c01n wrote:
           | Hmm, I use Firefox (dev edition) on Linux and the video is
           | playing with no problem
        
             | slimsag wrote:
             | Also works for me, Firefox Nightly on Mac OS.
        
               | slimsag wrote:
               | Really? I'm down-voted for trying to help uncover where
               | it doesn't work?
        
           | spicybright wrote:
           | I can see it in firefox stable under macos
        
           | gentleman11 wrote:
           | I could see it with Firefox on iOS
        
             | throwaway3699 wrote:
             | Firefox iOS is just Safari.
        
       | wos-dv wrote:
       | Looks sick!
        
       | worldsayshi wrote:
       | I 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.
        
       | drchickensalad wrote:
       | I will buy every game you release :)
        
       | lisardo wrote:
       | Go Adonaac!
        
       | albertzeyer wrote:
       | There is an interesting blog post by the author on the
       | development and his experiences and lessons, on LOVE, coding
       | style, reuse of code, etc:
       | https://www.a327ex.com/posts/lessons_second_game/
        
       | offtop5 wrote:
       | Amazing, 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 wrote:
         | Also purchased it after seeing this; looking forward to trying
         | it out, and will check out the source code as well.
        
       | jedimastert wrote:
       | I'm reminded of the talk "Juice It of Lose It"
       | <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>
        
       | slver wrote:
       | 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.
        
         | yakubin wrote:
         | Lua is also used for:
         | 
         | - AwesomeWM configuration
         | 
         | - Wireshark dissectors
         | 
         | - Nmap scripting
        
         | genericone wrote:
         | I 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
         | 
         | 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.
        
       | aquova wrote:
       | For 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. Both the game and the
       | tutorial are high quality, and provide really useful insights.
        
         | OliverM wrote:
         | The same developer authored this game.
        
       | ivanr wrote:
       | I'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.
        
         | BlackLotus89 wrote:
         | Since it has requirements for steam here a quick hack to get it
         | working without
         | https://gist.github.com/BlackLotus/164cbdd2352adc6c67d807a13...
         | 
         | Tried getting it to work with lutro (the libretro love
         | implementation), but didn't get too far (am too lazy). But if
         | someone gets it working with lutro you can play it on nearly
         | any platform (every platform with retroarch and lutro so nearly
         | every 32/64bit platform you can imagine)
        
         | pixelbro wrote:
         | It'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.
        
           | ivanr wrote:
           | Yeah, I realise I could do that. But I'd prefer to just play
           | the game and reward the author financially for the
           | convenience.
        
           | cf wrote:
           | Maybe he would like to see it supported for Linux on Steam
           | and perhaps send the creator a little cash as well?
        
             | wizzwizz4 wrote:
             | LOVE works well on Wine.
        
               | JasonFruit wrote:
               | LOVE works well natively on Linux.
        
               | wizzwizz4 wrote:
               | Ancedotally, LOVE software written for Windows can be
               | hard to get running natively on Linux properly.
        
           | spicybright wrote:
           | You don't need any apple build tools for this. The engine is
           | an application that reads lua files you edit to make your
           | game. Then you can repackage all that as an application.
        
             | pixelbro wrote:
             | From the Love2D documentation [1]:
             | 
             | > Compiling Mac apps requires a Mac running macOS with
             | XCode installed
             | 
             | Same for iOS.
             | 
             | [1] https://love2d.org/wiki/Game_Distribution
        
               | spicybright wrote:
               | For distribution on the mac store, yes. But you can make
               | stand alone builds by including a main.lua (and other
               | code) next to the Love executable inside of the
               | application (you can just make a copy of it for your
               | game).
        
               | lasagnaphil wrote:
               | There's an easier way: create a zip file with all your
               | .lua files, and just drag the zip file into the LOVE app
               | (which you can download from the website). This isn't for
               | distribution and more for game testing, but it works
               | perfectly fine.
        
         | wsc981 wrote:
         | Since the game is open source and developed with LOVE, you can
         | probably just download the source code, go into the root
         | directory of the game and type 'love .' in a terminal. You need
         | to have LOVE installed of course.
         | 
         | The game might not run (rather crash) if the game uses some
         | Windows specific dependencies.
         | 
         |  _I am also gonna add a little bit of self promotion here ..._
         | 
         | So far I've finished one game in LOVE, which is Paratrooper
         | (available on macOS AppStore [0]). I have almost finished my
         | second LOVE game called Lethal Pongbat [1] which I will release
         | for macOS and Windows on Steam.
         | 
         | I have already plans for a 3rd game that I hope to start on in
         | the coming months and which will be a BOOM clone [2].
         | 
         | I learned LOVE through the Harvard Game Programming course [3],
         | which I can recommend anyone as a starting point into game dev.
         | In later lessons the course also uses Unity. The course can be
         | followed for free, but you can pay some money for some extra
         | features.
         | 
         | ---
         | 
         | [0]: https://www.youtube.com/watch?v=dFX0FlO_g9Q
         | 
         | [1]: https://www.youtube.com/watch?v=mNhn77ipGTc
         | 
         | [2]: https://macintoshgarden.org/games/boom
         | 
         | [3]: https://online-
         | learning.harvard.edu/course/cs50s-introductio...
        
           | shakna wrote:
           | > The game might not run (rather crash) if the game uses some
           | Windows specific dependencies.
           | 
           | It links against Steam, so you'll need to make that available
           | to avoid the crash, but that seems to be the only part of the
           | code that wouldn't work out-of-box on other platforms.
        
             | throwaway3699 wrote:
             | Can't you link against the macOS or Linux version of Steam
             | libraries?
        
               | shakna wrote:
               | Yes. It's the same API - you'll just need to do that
               | linking yourself, because the build scripts assume
               | Windows.
        
       | linux_is_nice wrote:
       | fun fact: there's an easter egg on https://love2d.org/
        
       | spentu wrote:
       | I 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 wrote:
       | The 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
        
       | newobj wrote:
       | Love2d is the best. I actually like to code for it in TypeScript
       | and then use the
       | 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 wrote:
         | Looks like Wu has a Love wrapper
         | 
         | https://github.com/wu-lang
        
           | fileeditview wrote:
           | Interesting. Never heard of Wu before. The love wrapper
           | "lover" however seems to be very immature. At least its
           | roadmap indicates this.
        
       | wheybags wrote:
       | Love2d (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)
        
         | mikepurvis wrote:
         | Seems 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.
        
         | jmiskovic wrote:
         | Been 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 wrote:
           | > Neither functional constructs nor OOP are not included in
           | Lua
           | 
           | That's hard to read.
        
         | lc9er wrote:
         | I 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=PLvOT6zBnJyYF3FzmfXz2QXM..
         | .)
        
         | spicybright wrote:
         | Another good beginner game dev framework is kaboom.js
         | 
         | https://kaboomjs.com/
         | 
         | Example project online: 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.
        
         | yonifei wrote:
         | Flash with ActionScript 2/3 was incredible for this sort of
         | thing as well.
        
           | nicetryguy wrote:
           | People 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 wrote:
             | I 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.
        
             | derefr wrote:
             | Flash-the-format is gone, but Flash-the-editor never went
             | away. It's just called Adobe Animate now. It now exports
             | projects (incl. arbitrarily-complex ActionScript-based
             | games) to HTML5 rather than SWF, with literally no loss of
             | functionality (and in fact _gains_ in functionality
             | instead) compared to the SWF days.
             | 
             | Animate also exports to Adobe's AIR runtime -- which isn't
             | just "that weird Adobe thing you had to install on your PC
             | once to run a business presentation", but much more
             | importantly translates to the ability to export a project
             | to a native mobile app for iOS/Android, since these
             | platforms have AIR-runtime implementation as libraries you
             | can link into an app project.
             | 
             | Not sure why everyone seems to have forgotten it existed.
             | It's not like it went unmaintained or anything, the way
             | Fireworks was for a while before its death. Animate is
             | still a great and modern tool, with new features being
             | added all the time. It's become a first-in-class tool for
             | animation studios to produce cartoons with -- thus the
             | updated name/branding. People just seem to have lost, in
             | the process of that rebrand, all awareness of the fact that
             | it can still be used to make games/interactive experiences.
             | Which is a shame.
        
             | emehrkay wrote:
             | The 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
        
               | [deleted]
        
               | ronyeh wrote:
               | AS 3.0 was ecmascript and similar to typescript! I loved
               | actionscript 3.
        
               | fiddlerwoaroof wrote:
               | AS 3.0 was the closest we got to an ECMAScript 4
               | implementation.
        
             | sumnole wrote:
             | Flash Player can be emulated with https://ruffle.rs/ but
             | there's still no viable replacement afaik for Flash IDE.
        
             | cmrdsprklpny wrote:
             | wickeditor.com is trying to fill this niche, still pretty
             | young but under active development.
        
             | geswit2x wrote:
             | HaxeFlixel + FlashDevelop
        
         | seany wrote:
         | Solar2d is also quite good. https://solar2d.com/ its
         | technically older than love, but it started as Corona (not
         | opensource)
        
         | grawprog wrote:
         | Love2d 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.
        
       | op03 wrote:
       | Why snake like? Just curious.
        
         | drchickensalad wrote:
         | There'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 wrote:
           | > 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 wrote:
             | I 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/), but
             | they can be anywhere really since theorycrafting/build-
             | making is a very common theme in games.
        
             | drchickensalad wrote:
             | I 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.
        
       | unnouinceput wrote:
       | Quote: "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.
        
       | Tourniquet wrote:
       | Thanks 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 if interested.
        
       ___________________________________________________________________
       (page generated 2021-05-23 23:00 UTC)