Not long ago, number of ports under games/ category has passed over 1000. Thus, at least in terms of supported entertainment applications, FreeBSD goes on par with most popular Linux distros, and even overcomes some of them. Of course, there's still much room for improvement to which this page is dedicated.
These are just numbers of items available under games/ category for different port/package systems.
Note, that these values may considerably differ from real quantity of games available due to many reasons (splitting data into separate package or not, availability of engines and various game-related libs under games/ or under other category, etc. For example, Debian has bunch of campaign packages for wesnoth, image packages for pysycache and language packages for gcompris, while FreeBSD has Perl/Python/PHP modules under games/ and various Quake 1/2/3 mods).
| Repository/package system | Number of games |
|---|---|
| Free software repositories and news sites | |
| SourceForge (games with files) | 9215 1) |
| SourceForge (games with files and supported OS includes 'All POSIX') | 2817 2) |
| Linux Game Tome (total) | 2517 |
| FreshMeat (games/entertanment) | 2486 3) |
| Linux Game Tome (freely redistributable with source available) | 1953 |
| Google code (label:Games) | 746 |
| Libregamewiki (list of games) | 387 |
| Real ports/package systems | |
| ArchLinux AUR (games) | 1217 |
| Ubuntu karmic packages (games) | 1137 |
| FreeBSD ports (games) | 1112 |
| Ubuntu jaunty packages (games) | 1088 |
| Debian unstable packages (games) | 1080 |
| Ubuntu itrepid packages (games) | 1071 |
| Debian testing packages (games) | 1052 |
| Debian stable packages (games) | 1018 |
| Gentoo portage | 889 |
| pkgsrc (games) | 297 |
| OpenBSD ports (games) | 207 |
| Darwin ports (games) | 131 |
The most basic thing that we want to support are opensource games written for POSIX systems (Linux, that is, in most cases). Unfortunately, there are reasons why some of those games are not available for FreeBSD (yet):
Those problems can be solved from both sides. Games written with portability in mind should not use OS-specific or non-portable APIs. Sometimes this can't be helped, as those APIs are really powerful and bring to much possibilities for programmers, so another way is to encourage commercial developers to port their software to FreeBSD and to implement Linux-compatible APIs for FreeBSD.
On August 20, 2008 the following ports were removed from FreeBSD ports collection: games/blobwars, games/blobandconquer, games/randomshooter, games/starfighter, games/viruskiller. Those are all games by Parallel Realities. The story is quite sad: not long after Blob Wars episode 2: Blob And Conquer version 1.0 was finally released it turned out that all the games by PR contain copyrighted material ripped from commercial games, so we had to remove ports to avoid potential legal issues (ports/packages were removed from popular Linux distros and other BSD systems as well).
To avoid such issues new ports (and existing ones) should be carefully checked. That's not an easy task.
There are many closed source (both free and commercial) Linux games that will run well on FreeBSD with it's (recently improved to support Linux 2.6) Linux emulation layer, but some of those games require too many linux libraries not available in FreeBSD ports collection yet. That's huge task (for example, free Rigs of Rods game requires Ogre3D, DevIL and lua libs, Phun requires Boost and GLEW) and brings up thoughts of a need to automate process somehow. I can think of some ideas from ToDo, such as Abstract Ports.
See vegastrike-data for example (includes automatic plist generation).
Some games use shared directory to store e.g. highscores systemwide (TODO: add examples for Makefile/plist/pkg-install).
Some games are not suited for systemwide installation, i.e. they tend to store highscores/savegames and other dynamically changed files in current dir. There's two ways to handle those.
+#include <unistd.h>
+#include <err.h>
+#include <sys/stat.h>
...
int main(int argc, char **argv)
{
+ {
+ if (chdir(getenv("HOME")) != 0)
+ err(1, "cannot cd to $HOME");
+ if (mkdir(".nameofthegame", 0755) != 0 && errno != EEXIST)
+ err(1, "cannot mkdir $HOME/.nameofthegame");
+ if (chdir(".nameofthegame") != 0)
+ err(1, "cannot cd to $HOME/.nameofthegame");
+ }