Not really LÖVING it

So I spent yesterday playing around with LÖVE, a really cute little platform for writing 2D games. It got linked on reddit on friday, and it looked neat so I thought I’d give it a try.

As you can tell from the title, this is not going to be a very positive post. So in order to brighten the mood I’m going to start by saying positive things about it:

  • I’ve been saying for ages that I wanted to play around with creating little games. I’ve never gotten around to doing so. LÖVE made it sufficiently easy for me to get started that I no longer had an excuse for not doing so.
  • It’s really very good at getting all the annoying cruft of creating a basic game out of the way.
  • I had a lot of fun playing with it.
  • I’m really glad I gave it a try, and if you’ve never written a game before and want to, you probably should too.

Also, the website is adorable.

Unfortunately, that’s about where the positive side of things stops.

First off, the biggest problem with it is that it’s really unreliable. It will sit on a CPU and eat 100% of it, for even the smallest of games. It seemed very crashy – on my work PC it tended to randomly crash other applications. People who tried to play my games said that it seems to crash itself and other things when you try to close it (this was under both macs and windows. I never had this problem under linux). Between these two factors I’d basically never consider it for a real game. Hopefully both will be fixed at some point. (Yes, yes, I know, open source, I should look into it. Unfortunately it seems to be written in C++, which I have approximately zero interest in writing).

The other major problem with it is that it’s actually not very powerful. What it basically comes down to is an infrastructure for loading files, an ok graphics API and fairly basic physics and sound APIs (there’s also an animation API which I didn’t bother to look at. It may be better than the others, I don’t know). So although it helps you get started it doesn’t really do much for you once you have.

As an example to illustrate the above: I had a bit of a play with the physics engine. Basically I created a green square that could jump about (he’s a very abstract representation of Victoria’s very abstract representation of a frog). That worked quite nicely – he could jump, he could move from side to side, he could land on stuff.

The point at which it stopped working nicely was when I wanted him to not be able to jump while already in mid air. See, it turns out that the physics engine has no way (or rather no way exposed in the API) of detecting if two bodies were in contact, so I couldn’t easily detect if he was on the ground or not. I asked in #loveclub on freenode (a much less dubious channel than the name might suggest), and various things were suggested. The best idea I encountered was checking vertical distance from the point of contact. This unfortunately proves to have a bunch of problems as well. The method I eventually settled on was that he could only jump if his vertical speed was already zero (actually, < 0.001) and hope that the player’s reactions weren’t good enough to jump during hang time.

At this point I more or less decided I’d had enough of the physics engine. I went back to the first game I’d made, turned it into something that was actually a proper game (it hadn’t previously been possible to lose. Now it’s only really hard to lose) and declared myself all out of LÖVE. It was a fun little encounter, and I do hope they do well, but unfortunately I’m not really left with any desire to use it.

If you want to check out the code I wrote for this, it’s available from the github repo. Be warned though: It’s really bad. It started out slightly crummy because I was just exploring the API, and then in that last “right, let’s get something actually playable” push I started factoring things out nicely before I realised that I was never going to touch the code again and just brutally copied and pasted and hacked until it worked. I should also warn you that the games themselves are correspondingly lame. :-)

(As an aside, also in that repo are today’s experiments at recreating something like the Love API but more reliable and/or powerful in Scala. But more on those later)

This entry was posted in programming and tagged , on by .

7 thoughts on “Not really LÖVING it

  1. Villane

    I haven’t looked into LÖVE, but I’m working on 2D games in Scala. Here’s a crappy webcam video of a current prototype:

    I’m using the Slick 2D engine and Box 2D for physics (the latter I ported to Scala). In a few months, I hope to release both a demo and make the source of the engine available.

  2. Villane

    I haven’t looked into LÖVE, but I’m working on 2D games in Scala.

    I’m using the Slick Java library (recommend it!) and my Scala port of JBox2D physics engine as the foundation. However, I don’t think the level of abstraction provided by those libraries is enough to implement a game, so I’m writing a game entity system on top of those, plus some other goodies. It takes advantage of some Scala’s modularity features (traits most of all) and I think it’s going to be awesome :) I will release an early version of the engine (source code) in a few months.

    A video of an early game prototype in action is available: search for “Orbitum” on youtube.

  3. rude

    Heh, you should start a competitor called HÄTE. :3

    Two things:

    1. Yes, LÖVE will take all the CPU it can get by default. Sleep a few milliseconds in the main loop if you don’t like it.
    2. Randomly crash other applications? This is the first I’ve heard of this happening. If you have any more information, it would be cool if you could send it to me.

  4. david Post author


    Thanks for the tip about 1. Dare I suggest that “eat 100% of the CPU” is not a good default, even if it’s circumventable. :-)

    2 is hard to reproduce reliably, but was particularly noticeable with pidgin – often existing pidgin instances would crash when love started up or closed (problem observed both under linux and windows xp).

  5. Tyler

    First off, your game looks sweet, I loved the sound effects. I’m also looking forward to your Scala port of JBox2D.


Comments are closed.