How To: Build OpenKinect/LibFreenect in Linux

The Kinect just came out in Australia today, so I’m already a little bit late to the party, but I’m keen to see what I can do with it so I went and picked one up earlier – a couple of minutes after unboxing and it’s happily working with Linux. Awesome =D

The GLView example running on LibFreenect
The GLView example running on LibFreenect

Anyways, here’s what you need to do to build the library for yourself:

  1. Using synaptic or apt-get, install the following packages: libusb1.0-dev, freeglut3-dev, git, cmake
  2. It’s possible you may need to install some other packages as well depending on what you currently have or don’t have installed, but if you need anything additional then cmake will let you know about it when you get to that step.

  3. Download the libFreenect source code using git (this will make a directory for you called libfreenect):

  4. Make a directory inside the c folder where you’ve downloaded the libFreenect source code and use cmake to configure the build:

  5. Actually compile the library:

That’s it – you’re done!

Now you can check out what the kinect’s seeing by going into the examples directory (which will now exist at ~/libfreenect/build/examples) and running ./glview as root:

I think we’re going to have a lot of fun with this… =D

How-To: Fix Missing Bots in ioquake3 in Linux

I don’t do a lot of PC gaming these days, preferring more to just sling a disc in the 360 or PS3 to get my jollies without all the patch/driver hassle, but you’ve got to have a couple of linux games installed to vent the occasional blood-lust. With that in mind, I grabbed the latest version of ioquake3 earlier, and tried out a single player game, but no bots would join the match, and a look at the shell showed errors along the line of:

^1Error: file bots/default_c.c, line 2: file charsh” not found
^3Warning: couldn’t find skill 1 in bots/default_c.c
^1Error: file bots/default_c.c, line 2: file charsh” not found
^1Error: file bots/default_c.c, line 2: file charsh” not found
^1Error: file bots/default_c.c, line 2: file charsh” not found
^3Warning: couldn’t load any skill from bots/default_c.c
^1Error: file bots/kyonshi_c.c, line 2: file charsh” not found
^3Warning: couldn’t find skill 1 in bots/kyonshi_c.c

Apparently it’s only been an issue with the 64-bit version – but even the older version I had was showing the same problem (which I don’t quite get how) – anyways, I recompiled ioquake3 and it’s all fixed up – and thought that if anyone else was up against the same issue it might be useful to know how to fix it quickly and easily.

1.) Get the source

For this we need to have git installed to download the source code, if you do – great!, if not, then run this first:

With git in place, grab the source code with:

2.) Build it

Go into the downloaded ioq3 folder cd ioq3 and then build that bad-boy with this complex command:

Geez, linux is tech ;) To be fair, you’ll need the sdl-dev packages installed (for example: libsdl1.2-dev) and of course build-essential – I didn’t have to get any extra packages, it just built.

3.) Pick a place to stick it

Because I’m the only user of my laptop, I have a folder called Games in my home directory, so I just created ~/Games/ioquake3 and then copied all the files from the build/release-linux-x86_64 sub-folder (created when you successfully built ioquake using that complex make command – your folder won’t have _64 on the end if you built it on a 32-bit system) to ~/Games/ioquake3/, and then copied the pak0 to pak8.pk3 files from my original Windows install of Quake III into the baseq3 subfolder of the ioquake3 folder.

4.) Frag on!

Launch ioquake3.x86_64 and get your game on =D

I have absolutely no idea how they’ve got motion blur on the game (unless it’s applied post-game to the captured footage) – but it looks AWESOME! Want! If you know how they did it please feel free to smack me with the clue-stick in the comments! Cheers! =D

Update: It turns out they’re using the Excessive Plus mod in the video (which works fine with ioquake), still no clue about the motion blur though…

Another Update: Turns out this issue exists in the 64-bit version of OpenArena as well as ioquake3. I rebuilt openarena using the 0.81 version from the svn here – but still no dice with getting bots to spawn. Apparently the 32-bit version of OpenArena is unaffected.

How To: Compile and Use the Dolphin Gamecube/Wii Emulator in Linux

It’s really easy to get this emulator up and working – but you do have to compile it yourself in linux – still, it’s only a couple of commands and you’re set. I did it on Ubuntu 9.10 64-bit and it worked like a charm…

Update (04/07/2011): Easiest way yet – simply add the PPA and get it (for Ubuntu 10.10 & 11.04 32/64 bit only) like this:

Update (Older than above): I found that you can download pre-compiled .deb files for Ubuntu 9.10 here (PPA addition required) – be careful with that sudo apt-get upgrade command in the instructions though – I don’t really think you need it and you probably don’t want to upgrade your entire linux distribution just to play an emulator… I’m confusing sudo apt-get upgrade (which upgrades currently installed packages) with sudo apt-get dist-upgrade (which updates your linux distribution if there is a newer version available) – my bad.

Either way, I’d recommend you just compile it yourself – it only takes a couple of minutes.

Update – Nov 2011: Like anything published, it ages and what might have been correct at the time of writing may no longer be the case – so with that in mind, if you’re going to build your own copy of Dolphin, you’re probably best off going to http://code.google.com/p/dolphin-emu/wiki/Linux_Build and using the instructions there.

Issues: If you’re getting errors along the line of Looking for lib Cg… no. Plugin_VideoOGL must have cg and cggl to be build, then the fix is to install the nvidia-cg-toolkit package with:

With all that done, it takes around five minutes to compile and build, then you can go to the Binary folder inside your source-code download location to find the executable and launch it. Once it’s up and running just go File | Open and point it at an Wii or Gamecube ISO and you’re in business!

Dolphin Gamecube/Wii Emulator

By default you get a gamecube controller bound to the keyboard (Enter = Start button, x = A button, cursor keys up/down/left/right) and an emulated Wiimote is bound to the mouse (where the left mouse button is the A button), but you can use joysticks, real Wiimotes etc as well without too much fuss. Fantastic stuff :)

If you’re having any issues, just read more about linux confix/setup/dependencies here, while the main Dolphin wiki lives here.