
In Love with LÖVE - replicatorblog
http://an.ton.io/blog/articles/2013/01/27/in-love-with-love
======
kevingadd
I am confused by the fact that this blog post seems to link to all the
competing frameworks he discusses, but never links to LÖVE itself. Seems an
odd choice given that the word is going to produce a bunch of unrelated google
search results...

For reference: <https://love2d.org/>

~~~
antrod2
Sorry about that. I was clearly so proud of myself for getting my keyboard to
do the two dot thing on top of the Ö that I forgot the most basic link of all.
Updated now.

~~~
cubicle67
for the curious - Option+u (for umlaut) then the letter you want, so in this
case O. result: Ö

If you're new to OSX I highly recommend playing about seeing which characters
are possible. Hold Option and try each key, then Option+Shift and each key.
Comes in handy for typing things like ©2013, 20˚, 2π and LÖVE

~~~
jkestner
Or, just hold down the O key and check out the variations available to you.

~~~
cubicle67
on iOS, yes, that's correct. Try it on OSX however and all you get is a line
of Os :)

~~~
mtrichardson
Not in Lion - by default holding down a key will bring up the accent menu. You
can turn it off by following this [http://osxdaily.com/2011/08/04/enable-key-
repeat-mac-os-x-li...](http://osxdaily.com/2011/08/04/enable-key-repeat-mac-
os-x-lion/) (though I've found it more useful to keep it on).

~~~
cubicle67
cool, thanks, didn't know that :) Unfortunately I'm stuck on 10.6 here as this
machine's too old to upgrade. Tested it and everything before I replied, just
in case I was wrong.

------
tikhonj
Does Lua have "crappy scoping"? My understanding is that it has full lexical
scoping. And somebody normally liking Python is in no position to complain
about bad scoping rules!

I haven't used Lua myself, but I'm impressed by the design: it seems like an
elegant version of JavaScript minus most of the really obnoxious JavaScript
warts.

The tables and metatables seem particularly great: they look like a simple,
elegant version of prototype-based inheritance without some of the problems
JavaScript suffers. It's certainly simpler _and_ more expressive than a class-
based system.

Also, Lua is well known for having coroutines that are done correctly. That's
probably not immediately useful for complete beginners, but it's certainly a
nice feature when you get to it.

~~~
Avshalom
It does have full lexical scoping, however "global by default" is good for
scripting, questionable for standalone programming.

I general yes Lua is a great language, I have a lot of fun writing in it. But
it does have its warts (though fewer than Javascript).

~~~
brianto2010
For what it's worth, you can use the local keyword to limit the scope of
variables.

<http://www.lua.org/pil/4.2.html>

------
kanatohodets
For the folks who struggle with Lua's language design: try thinking of it like
Crockford's Good Parts of Javascript with a slightly different syntax (and
arrays/objects rolled into one, the table). Generally speaking, once you've
moved past the default indexing from 1, that analogy works out pretty well --
even down to how to set up more object oriented designs (js prototypes and Lua
metatables/metamethods are rather closely related ideas).

LÖVE is a very fun engine, much easier than PyGame to get going - in both
setup and development terms.

~~~
JulianMorrison
Indexing from 1 and 0 seem to me to reflect two different equally valid
viewpoints. Offsets against a base address in memory (the C family) versus
labels for boxes (Lua and friends). Naturally, stating from a base address,
the offset is 0. Equally naturally, if you're labelling boxes with numbers,
you number the first one "1". For Lua, given the tables are also at the same
time hashes (with explicit labels), treating them as numbered boxes makes
sense.

~~~
justincormack
I think also the construction of the for loop makes it more natural. Lua is
"for i = i, n" vs the more complex and off-by-1 prone "for (i = 1; i < n;
i++)" where you need the less than vs an equality.

~~~
unwind
If your for loop is for a 0-based language, it's wrong because it starts with
1.

If it's for a 1-based language, it's wrong because it compares with "<" and
not "<=".

So, I guess that proves your point that it's error-prone. :)

In C, the idiomatic way is (as you surely know) "for(i = 0; i < n; ++i)".

~~~
justincormack
typo, the second one was supposed to be 0 based... although that shows how off
by 1 errors occur.

------
Avshalom
The only problem and it's really a very tiny problem, is that the library
community has settled on a fairly... purile naming convention.

Beyond that it's a fantastically easy way to get started writing a game.

~~~
kevingadd
I don't know if I would call it tiny; looking at the library naming convention
it doesn't seem to be far from the controversy around 'pantyshot' a while
back: [http://www.zdnet.com/blog/violetblue/when-software-
offends-t...](http://www.zdnet.com/blog/violetblue/when-software-offends-the-
pantyshot-package-controversy/509)

Though I would assume most library authors are not necessarily attempting to
be offensive, not the greatest culture to construct around your toolset
regardless.

~~~
bartbes
As biased as I am (very), I'm not sure how this applies, none of the library
names I know suggest anything sexist, or otherwise offensive. Now, as for
whether naming libraries after sex acts, and possibly body parts, is a good
idea, well, does it matter? Worst case it makes your conversations more fun.

~~~
NoPiece
Asking a co-worker about the AnAl library could elicit a chuckle, or it could
be an example of what alienates female programmers from the game industry. It
isn't inherently a big deal, but in the hands of the immature and can easily
go from funny to uncomfortable.

~~~
limmeau
If the sexual funniness stems from the library the team is using, then the
awkwardness can be addressed in a team meeting well in advance. Perhaps
resulting in a only-one-joke-a-day policy or changed pronunciation (e.g. AnAl
like "analgesic").

------
maximilian
> _I had seen this about 6 months ago but dismissed it because the programming
> language, Lua, looked weird and I’d never heard of it._

This what surprised me most about the post. Lua is not especially strange, by
any means, and also fairly well known. Obviously, its hard to compare my
experience with his experience, but nonetheless I was quite surprised he said
something like that.

~~~
justincormack
It is not alas that well known, although much more so in the last few years.
It has reached number 20 on github though now. A lot of people use it but do
not really talk about it much, eg in game development.

~~~
BystanderX
Probably doesn't help that most of the code is tied up in scripts for games,
and public development is hosted in places like curseforge and wowinterface.

------
grimgrin
Just going to link one of my favorite libraries for LÖVE.

<https://github.com/kikito/middleclass>

~~~
limmeau
What makes it your favorite?

~~~
grimgrin
Not the favorite, just one that I enjoy. When looking for a simple OO
implementation, middleclass works.

------
igierard
Something else, that while not a game engine, was built to bring the the BASIC
experince to modner machines is Hackety Hack <http://hackety.com/>

------
Hupo
This isn't directly related to the blog post as it's about stuff available on
OS X, but if you're on Windows I can very much recommend checking out
Construct 2 by Scirra[1]. They have a pretty fantastic HTML5 game engine and
an editor (and the whole "no programming required" is really just marketing -
even though it uses a "visual" event system you still need to understand
programming concepts like loops, conditions and such in order to make
effective use of it). They have a feature-limited (no other limits though)
free edition available for it too.

[1] <http://scirra.com>

------
fspeech
My 12 year old (going on 13) also started with Mindstorm. Then we dabbled in
MIT battlecode (Java). I taught him some Python and he did Udacity Python
intro class on his own. Then he discovered Ogre (C++) and has been obsessed
with it ever since. I remember giving him an 20 minutes intro to HTML a couple
of years ago and that was all he needed to start playing with web pages. A
young mind seems particularly adept at absorb ing artificial languages. Don't
underestimate your children.

------
seivan
Take a look at <http://defold.se> \- It uses LUA (I'm not the biggest fan) but
offers a nice editor that is very useful for most 2d games.

------
bartbes
It's too bad he doesn't do a thorough comparison, I'd love to hear what he
likes so much about Pythonista, for instance.

With regards to the "crappy scoping", I can only assume he didn't read up
properly, especially since both the globals and locals mentioned right after
do exist.

------
primitur
Wait until he tries out MOAI. If he loves LÖVE, he's going to be falling over
himself to have an affair with MOAI .. ;)

<http://getmoai.com/>

~~~
adam-a
One of the great benefits of Love, in my opinion, and something that sets it
apart from a lot of comparable game frameworks, is the open source and free
nature. It really encourages sharing and open (not obfuscated) code by having
the default packaging for your games just a zip file of the source and assets.

Moai, compared, is probably a richer framework but seems fairly closed. I'm
also slightly confused by the paid for cloud component. Is this necessary for
making games? What part, or how much of Moai is free or open?

~~~
primitur
MOAI is open source under the CPAL license, and contributions from the
community are folded back into mainline regularly.

Check out the license here: <http://opensource.org/licenses/cpal_1.0>

The cloud is an additional service, which you are not required to use - but is
there if you do need it. Its one small point of confusion in the MOAI world,
that people think that MOAI Cloud is MOAI itself, but thats not the case. Its
just an additional service that can be utilized by users of the MOAI SDK, if
they want it ..

~~~
adam-a
Thanks for information. Yes, the Moai is slightly confusing, it's not obvious
to me that there is a full SDK available and usable without paying for the
cloud component. I might check it out in fact, I have been looking for a cross
platform game toolkit, I skipped over Moai before because I thought I would
have to pay to use it.

------
asselinpaul
Polycode is about to get released: <http://www.polycode.org/>

------
zem
his comment on gosu made me sad. as a big ruby fan, i run into the "framework
looks wonderful, but due to installation issues i cannot in good conscience
recommend it to a beginner" far too often. the one-click installer projects
for windows and osx are going a long way towards fixing this, though.

~~~
rurounijones
I cannot recommend ruby for any desktop applications that you intend to
distribute to non-tech-savvy users.

Sure there are ways it can be done, jruby + swing and shooes or monkeybars etc
but they all have big drawbacks compared to "Just Works" languages.

[EDIT] Having said that, the releasey gem used by gosu looks interesting.

------
fosap
I found out about LÖVE about 2 weeks ago. It looks a bit like "flash done
right". I haven't done anything with it yet, but it looks cool for interactive
multimedia content.

~~~
jiggy2011
Yes, unfortunately there doesn't seem to be any easy way to run the games in a
browser which would probably be the killer app for this.

~~~
cmwelsh
A talented hacker, ghoulsblade on GitHub, cobbled together a web player for
LOVE: <https://github.com/ghoulsblade/love-webplayer>

Here are some demo applications converted to HTML5/WebGL:
<http://ghoulsblade.schattenkind.net/love-webplayer/>

~~~
fosap
awesome!

