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.
That’s hard to read.
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.
(https://m.youtube.com/playlist?list=PLvOT6zBnJyYF3FzmfXz2QXM...)
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.
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 LÖVE, which is Paratrooper (available on macOS AppStore [0]). I have almost finished my second LÖVE 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 LÖVE 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...
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.
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)
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.
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].)
It is lisp-like language with Lua like semantic and implementation, but it is separate from them.
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.
- AwesomeWM configuration
- Wireshark dissectors
- Nmap scripting
IIRC the Kong api gateway uses it in a similar way
There's a Lua interpreter in Redis, too
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.
Where can I find more games like that?
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.
If only there was a way to change the game so it did not depend on the evil library...
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.
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.
https://github.com/ppriest/love if interested.
Also, I bought both your games today on steam and thoroughly enjoyed both of them. Thank you :)