6 ms·
Building Game Prototypes with LÖVE
- DylanDmitri 2y agoI gave this LOVE framework a try a couple years ago, but was dissuaded by the amount of spritework needed for my game. But looking at your prototype games here, they look pretty good and playable as is.
- furyofantares 2y agoI love LÖVE for prototyping, and am about to ship an extremely small game with it. Love.js works great to make a web build too; I host mine on the GitHub pages site for the repo. This is excellent for getting playtest help too even if you don't wanna ship it that way. Over Thanksgiving break I decided to see how far I could get an LLM to do all the work (using cursor) and I picked LÖVE as a minimalist all-code framework. I put the game design and descriptions of UI and every screen in my .cursorrules file, so they are included in every prompt, and for a long while mostly told cursor in composer mode to do whatever the next thing it suggested was. I chose the smallest possible full game design I could and managed to just barely get there, although there were some brick walls where I had to help the LLM, but I got fairly far without writing or reading any code. Reviewing what went wrong, the biggest problem is the LLM code started pretty good but just got worse and worse over time, especially as soon as it couldn't fit everything in its context. ANYWAY, I was intending to suggest choosing the smallest possible game design you can if you wanna ship something. I'm ready to ship my tiny project and it's amazing just how much work it is to ship a thing even after you've got all the functionality done.
- trevorhinesley 2y agoTo the OP, try DragonRuby for your next game if you miss hot reloading but like the scripting, code-first nature of LÖVE. It’s also cross-platform. Not sponsored, just a big fan and it scratches many of the same itches as you described with LÖVE.
- je42 2y agoLove 2d can be quickly extended with hot reloading. See https://github.com/rxi/lurker https://github.com/rxi/lurker
- trevorhinesley 2y agoThat’s awesome! It’s been a core feature of DragonRuby since the start, and they share similar framework values from what I can tell. It’s worth a look. I’m not the biggest Lua fan, personally, so DragonRuby scratches the right itch.
- vunderba 2y agoHmmm. DragonRuby seems to be a closed source proprietary game engine (at least as far as I can tell). With open source engines like Love2D / Godot / PhaserJS / Pyxel becoming more popular - this may be a deterrent for many devs on HN. Something else to consider is traction, if you get stuck in DragonRuby there's probably not a huge amount of docs/tutorials around it. That being said, it does seem like they have a pretty active Discord at least.
- trevorhinesley 2y ago> DragonRuby seems to be a closed source proprietary game engine Yes, but check out: https://docs.dragonruby.org/#/misc/faq?id=dragonruby-is-not-open-source-thats-not-right https://docs.dragonruby.org/#/misc/faq?id=dragonruby-is-not-... And https://docs.dragonruby.org/#/misc/faq?id=what-if-i-build-something-with-dragonruby-but-dragonruby-llp-becomes-insolvent https://docs.dragonruby.org/#/misc/faq?id=what-if-i-build-so... > If you get stuck in DragonRuby there’s probably not a huge amount of docs/tutorials around it. You’d be surprised. The docs are extensive and there are sample games galore in the distro. https://docs.dragonruby.org/#/ https://docs.dragonruby.org/#/ Also the Discord is incredibly helpful and the creators chime in regularly. It’s a pretty special engine and community IMO
- vunderba 2y agoI totally get it - I'm not definitely not casting aspersions on their choice to go commercial with it. I just feel like with the insane Unity pricing restructuring (which they ultimately rolled back) - a lot of game devs have been pretty gun shy about investing in another proprietary engine. That said, we can always use more game engines / frameworks!
- modernerd 2y agoBalatro was made with LÖVE, and a lot of it like the background and score flames were made with GLSL to reduce the amount and size of assets: https://www.reddit.com/r/PixelArt/comments/143ybxa/pixelated_high_score_shader/ https://www.reddit.com/r/PixelArt/comments/143ybxa/pixelated... The OP mentions hot reloading and there are a couple of repos that may help with that: https://github.com/clofresh/love-module https://github.com/clofresh/love-module https://github.com/usysrc/LICK https://github.com/usysrc/LICK Their card game prototype is really impressive for three hours' work!
- aquova 2y agoBalatro recently published a mobile version of their game, but I was under the impression Love2D only supported desktop platforms. Has that changed?
- furyofantares 2y agoIt is pretty easy to build for iOS, Android, and web.
- greeniskool 2y agoShould mention love.js isn't officially supported, and isn't 100% compatible with the LÖVE API. It will work just fine for a lot of games out of the box, though
- cableshaft 2y agoYeah when I got to the point of trying to get my game working in love.js, all I got were webassembly errors. I was able to get a basic Hello World game working with the same setup, so it's something within my code that's not supported, but I don't really know how to pin down what the problem is.
- cableshaft 2y agoGetting it built isn't too bad (at least iOS and Android, Web was giving me WebAssembly errors I couldn't figure out), but accessing native functionality seems harder and do not have any good tutorials (a couple really old discussions online that are probably out of date is all I could find). Like if you want to release a game on iOS you're going to need some sort of Ad framework and access its game center for achievements and leaderboards at the very least, and that's been tricky for me to get working. I know you need to write some hooks and saw some old code that I'm trying to use for reference, but it was still giving me enough issues I gave up on it for a the time being. And I've released games in native iOS before (although it's been a while), so it's not like I've never used them.
- freetonik 2y agoCoincidentally, I’ve been building a chess-inspired game prototype with LÖVE for a few days recently, but switched to Godot this week. Love and lua are lovely, but Godot makes so many things trivial, it’s hard to argue against the pace of development I was able to achieve.
- keyle 2y agoI've made games in both. They both have their pros and cons but Godot is basically a full IDE while Loves2D is a framework.
- domlebo70 2y agoWhat do people think of Phaser? Currently playing around with it. API seems pretty large
- jordwest 2y agoIt's definitely very much closer to a complete game engine than a library like LOVE and heavily leans on OOP. Personally I prefer PIXI.js (which only focuses on sprites/graphics) as I can plug it more easily into my own data oriented architecture
- p2detar 2y agoIt's a full-blown game engine and you can do A LOT with it. I've created several js games with it and it never let me down. I've never tried using it with ts, but it should be even better. edit: Just wanted to add that Phaser has one of the best docs out there including a library of tons of examples that can really get one going.
- cableshaft 2y agoI got most of the way through making a toy game with it. I kind of liked it, but I'm using Love2D for the game I'm working on now that I'm planning to release on Steam and hopefully mobile. Although I did like that I could use Typescript for Phaser, and that it was a lot easier to show off the game to other people through the web.
- riffruff24 2y ago
- fn-mote 2y agoThe article gives a sketch of three games the author built. It sounds like the velocity was provided by consulting LLMs. It’s fun. I wonder if the creative feeling is an illusion, though. Does the fact that the LLM doesn’t feel like it is directly copying work it has ingested make the experience feel different than just ripping off a project you find on GitHub? Anyway, I would be very interested in a write up that gives more details: how long did the author feel like they were “on the path” that LLM knows from existing code, vs how does it handle being “off the path”.
- furyofantares 2y agoNot the author but you can see my other comment in this thread about similar experiences I had using an LLM + Love2D to build a full tiny game. I love coding and didn't get any of that creative feeling with my code. But it sure was a magnified experience in terms of the creative feeling about the thing I was actually building. It was amazing to just think about features and that's it. Until it didn't work, I mean. Then it sucked.
- xixixao 2y agoHave you ever had a creative feeling programming in a higher level language? Did you realize you were harnessing the power of the abstraction, “ripping it off”, without writing a line of assembly yourself? That said, the LLMs are weak right now. They are great for getting some initial boilerplate (how do I draw a circle with HTML Canvas API?), but as the project grows you’ll be fixing them more and writing your own code. Give it a try, especially with Cursor. It’s awesome.
- spicyusername 2y agoThe current capability of LLMs feels perfect for bouncing high-level, "What are ways people commonly do X" or "How do I handle this architectural problem I'm having" off of. I'm building a game in Monogame / C# right now, and LLMs have been great to help point me in the right direction or suggest architectural patterns I'm less familiar with to investigate. e.g. If I have a GameStateManager, an InputManager, and a UIManager, and I represent input events as an enum of GameCommand's, what is a good way to register callback functions from these objects with the InputManager to trigger actions on particular game commands? or Is it common when using an Entity Component System framework to manage the UI using ECS? Or is the UI often managed separately using a more familiar object-oriented approach? They don't give me perfectly working solutions, but they do give me inspiration and additional lines of inquiry.
- mococa 2y agoI have been using my engine https://github.com/willtobyte/carimbo https://github.com/willtobyte/carimbo Demo https://carimbo.run/play/1.0.30/willtobyte/megarick/1.0.30/720p/ https://carimbo.run/play/1.0.30/willtobyte/megarick/1.0.30/7... You can use Lua as scripting language.
- jmpavlec 2y agoFYI the link at the top of your GitHub to play doesn't work. Seems maybe you changed the domain name or maybe the version is outdated compared to the link you pasted here. play.carimbo.cloud vs carimbo.run
- raincole 2y ago(Off topic) Which open-source engine/framework is best in terms of cross-platform? It seems that LÖVE is desktop-only. Edit: by cross-platform I mean desktop + console + mobile.
- vunderba 2y agoLike everything the answer is... it depends on what you're looking for. What does cross-platform mean to you? Just MacOS/Windows/Linux? Web? Consoles? Android? iOS? Blackberry? Godot comes pretty close to a batteries included cross-platform engine that handles 2D/3D. JS engines can likely be ported (with varying degrees of effort as PWAs, electron/tauri, etc) to most systems as well - look into Phaser though its intended use is 2D.
- valcron1000 2y agoProbably Monogame, a C# framework that supports Windows, MacOS, Linux, Android, iOS, iPadOS, Playstation 4, Playstation 5, Xbox One and Nintendo Switch
- hiccuphippo 2y agoDon't some of them have proprietary APIs under NDA? how can an open source project support them? I ask because this is one of the criticisms towards Godot when compared to Unity.
- cableshaft 2y agoLove2D can be cross-platform. Balatro was made in Love2D and was released on PS4, PS5, Xbox One, Xbox Series X, Switch, Desktop, iOS, and Android. That doesn't mean it's well-supported or easy to fully support those other platforms. I'm struggling with getting iOS native functions working with Love2D in iOS, for example, although Balatro proved that it's definitely possible. The basic game (the game as it works on my PC) is working on my iPhone just fine, though, and wasn't too difficult to get up and running. I also have an APK working on a cheap Android phone I got.
- vlaaad 2y agoDefold: https://defold.com/ https://defold.com/
- mattfrommars 2y agoI'm always amazed how people like author "learn" and "build' so quickly. I recently started to dabble with unity on basics and no way on earth I can build, say something like Heartstone clone or the interaction. My background is web back end mostly. Good stuff OP.
- Kenji 2y ago[dead]
- Pufferbo 2y agoI’ve found using frameworks like Love, or Pixijs more approachable when coming from a programming background. It’s more like learning the library rather than an entirely new approach to building software.
- ehnto 2y agoUnity is deceptive in that it is easy to scratch the surface, but gets more complex than it needs to be for simple game features quite quickly. Unity has an immense depth and breadth to its feature set, it is frankly, too much game engine to fuss with if you just want to try making games. In my opinion. There are just so many new, engine specific concepts at play that you are not learning games, you are learning Unity. If you are a programmer and want to dable then a code first framework like LÖVE might be less cognitive load. If you prefer a more featured framework then Godot is also a really great lightweight engine, but you will spend more time in the GUI than in the code. Don't sell yourself short either, you have an advantage by knowing some backend concepts! A lot of people start from zero programming experience and jump into games.
- protocolture 2y agoYeah my experience with Unity was that, if you are doing something the Unity way, its very easy. If you want to do something that the Unity devs never considered, you are at best developing from scratch, at worst existing Unity systems are going to stand in your way. I built a prototype Metal Fatigue tech demo (No real game logic as such, just the framework) and I found that heightmap based deforming terrain for the underground drill rig to dig through was so outside the design intent of unity that it would be the sole thing I spent hundreds of hours working on to get it past the tech demo stage. Like I got it working, but its so tenuous I could never ship it as is. Not to mention the default modules were writing my changes back to the heightmap object, saving them when that was unintended. I think the code I was using was intended for tooling, not for game logic. And the Unity Store is great if you need a plugin to clone some mobile game system, but once you went to any depth it was just a hook to get 50 bucks out of you for no gain. Its an interesting ecosystem.
- pull_my_finger 2y agoI'm a big fan of Love and Lua, but one thing that always bothered me was that there's no real "great" solutions for a) cross platform/web/mobile distribution. I know there are 3rd party solutions but for as mature as the framework is, you'd think it could get a first party solution. The same goes for several API's that you'd think are core to game making, like sprite animations. There are fairly mature libraries, but I always hate having a bunch of patchwork libraries that should be included batteries instead of 3rd party boilerplate.
- dartharva 2y agoBalatro is available on Android though?
- rollcat 2y ago> cross platform/web/mobile distribution Unfortunately, each and every platform has its own unique quirks[^], and I think the problem is too large for a project like LÖVE to tackle. In fact, LÖVE's authors have already done "90% of the work in 10% of the code": you can make a ZIP file, change the extension to .love, and just distribute that. Install LÖVE, double-click YourGame.love, and you're done. You can also concatenate the game executable with the ZIP file to create a self-contained binary distribution for that target platform (super old & cute trick; it's possible because ZIP's "header" is in fact, at the end of the archive). [^]: In 2016 I've attempted a "one game per month" challenge; but I also wanted to distribute executables for Windows, macOS, and Linux, so that all of my friends could just play them. It went something like this: - Windows: distributing executables from your personal domain is considered a crime; the browser and the OS will yell at the user, block the download, blacklist you, etc. - macOS: simply concatenating won't work; you need an elaborate dance to create a .app bundle, and distribute that in a .dmg - good luck building that on a Linux host, also good luck debugging without an actual Mac. Nevermind code signing, you can bypass that with shift-right-click-open. Oh wait, macOS 15 won't let you. - Linux: are you ready for the .so hell? - BSD: bonus! The documentation for SDL_GetPlatform doesn't even enumerate all of the possible values! You need to source-dive to get them: https://github.com/libsdl-org/SDL/blob/f45ce45603a00e92332f925132547fa53cf82650/src/SDL.c#L687 https://github.com/libsdl-org/SDL/blob/f45ce45603a00e92332f9... - plus any possible patches in ports; most developers won't ever care, and will just hardcode "Linux". Checking for $DISPLAY is also unreliable: macOS users may have XQuartz installed, Wayland purists may run without XWayland, etc.
- cannibalXxx 2y agowhat an interesting article! outside of programming in my day I've written a few articles about guides on my blog https://playstationcouch.com/home.php https://playstationcouch.com/home.php
- lisp2240 2y agoAre there any 3d frameworks worth learning?
- RobKohr 2y agoIf you are looking to do VR/3d games, LÖVR (https://lovr.org/ https://lovr.org/) is derived from LÖVE.