Getting LÖVE 2D 10.2 running on Fedora 31
Harvard has made several online courses available free of charge, for the time being. Looking at their offerings, CS50’s Introduction to Game Development caught my eye. I haven’t written a game in on the order of 25 years, and my son is starting to get interested, so it seemed like a fun thing to do. It is really amazing to see how some current tools and approaches differ from what I cut my teeth on in the mid 1990s.
The online lectures are excellent quality, and the problem sets are interesting. The early ones, at least, were also put together in Fall 2018 using a toolit called LÖVE 2D. That’s a cross platform toolkit for writing games that use SDL using Lua. The biggest challenge getting started is that my laptop runs Fedora 31 Workstation these days, and in late 2018 the project was not providing binaries for F31. Unfortunately, after a brief attempt, it looks like the class exercise would need some fixing before they could run on the 11.x versions of LÖVE 2D that are easier to get going.
These are my notes on getting it started.
I needed to install these development packages. The process may depend on others not listed here, as this is not a freshly installed system.
$ sudo dnf install openal-soft-devel libmodplug-devel \
libvorbis-devel libtheora-devel physfs-devel \
luajit-devel mpg123-devel SDL2-devel
Download and unpack the 10.2 source code:
$ tar xf tar xf love-0.10.2-linux-src.tar.gz
$ cd love-0.10.2
There are several places in the socket support code where they use luaL_reg
when they meant luaL_Reg
. It looks like they tried to take care of that with the preprocessor. Most likely gcc is now enforcing scope a bit differently than it did when this was current. Rather than try to figure out how to fix the preprocessor macros, I changed the source in each place.
A patch file is here and can be applied by running the command
$ patch -p1 <love-0.10.2.socket_fix.patch
Build and install into $HOME
:
$ mkdir autotools-linux-build
$ cd autotools-linux-build
$ ../configure --prefix=$HOME/.local
$ make -j8
$ make install
With that I was off and running with the samples and assignments from Lecture 0.
I’m trying on Kev Quirk’s “100 Days To Offload” idea. You can see details and join yourself by visiting 100daystooffload.com.