When was the last time you played a computer game? I really like one of Benjamin Franklin quotes – “We do not stop playing because we grow old, we grow old because we stop playing.” – he lived in times where computer games did not existed yet but the quote remains current. I do not play games a lot, but when I do I make sure that they are the right and best ones. They are often games from the past and some of these games just do not age … they are timeless actually. Today I will show you some oldschool gaming on FreeBSD system.

Here is the Table of Contents for the article.

  • Native Games
    • Native Console/Terminal Games
      • Interactive
      • Passive
    • Native X11 Games
  • AMIGA Games
  • DOS Games
    • Fourteen Years Later
  • Windows Games
  • Flash/SWF Games
  • Web Browser Games
  • Last Resort
  • Closing Thoughts

Here is my Openbox ‘games’ menu.

openbox-games-menu


Native Games


First we will start with ‘native’ games on FreeBSD – as of today there are more then thousand games available in the FreeBSD Ports collection.

% ls /usr/ports/games | wc -l
1130


You can get nice description for each of these games (from the pkg-descr file) by using the below command. I assume that your FreeBSD Ports tree is under /usr/ports directory.

% for I in /usr/ports/games/*/pkg-descr
> do
> echo ${I}
> echo
> cat ${I}
> echo
> echo
> echo
> done \
> | grep \
> --color=always \
> -A 100 \
> -E "^/usr/ports/games/.*/pkg-descr" \
> | less -R



Here is the one-liner that you can actually copy and paste into your terminal.

% for I in /usr/ports/games/*/pkg-descr; do echo ${I}; echo; cat ${I}; echo; echo; echo; done | grep --color=always -A 100 -E "^/usr/ports/games/.*/pkg-descr" | less -R

Here is how it looks.

native-ports-list


This way you can browse (and search in less(1) command) for interesting titles.

Native Console/Terminal Games

Interactive


Lets start with the most simple games – the text games played in terminal. I play only two of these and they are 2048 and ctris games.

The 2048 is generally a single C file – 2048.c – from here – https://github.com/mevdschee/2048.c/blob/master/2048.c – you need to compile it with the cc(1) command – like that.

% cc -o 2048 2048.c
% ./2048


game-2048


The other one ctris is available in the FreeBSD Ports or you can add it by package with pkg(8) command.

# pkg install -y ctris


game-ctris


There are also several other terminal games like Tetris in the FreeBSD Ports – they are bsdtris or vitetris ones for example.

Passive


The are also terminal ‘non-interactive’ games (or maybe I should call them terminal screensavers alternatively).

My favorite two are cmatrix and pipes. The first one is available from FreeBSD Ports.

IMHO it looks best when launched this way.

% cmatrix -a -b -u 6 -C blue


game-cmatrix


Some time ago I ‘ported’ or should I say modified the pipes so it will work properly on FreeBSD and its available from – https://github.com/vermaden/pipes/blob/master/pipes.sh – here.

game-pipes


Native X11 Games


Time to move to some more graphically appealing games – the X11 games.

One of the better open source games it the Battle for Wesnoth which is also available in the FreeBSD Ports so adding package it easy.

# pkg install -y wesnoth


game-wesnoth


AMIGA Games


Most AMIGA games have been ported to DOS and its generally more convenient and a lot faster to play the DOS ‘ports’ using dosbox(1) instead of playing their original AMIGA versions under fs-uae(1) emulator. Some games like Sensible World of Soccer are better in original AMIGA version (little larger field view for example in the AMIGA version – but that only makes the DOS game little harder as you see less) then in DOS port but still the difference is not that huge to wait for each game start roughly 60 seconds with fs-uae(1) and manually switching virtual floppies.

swos-amiga-dos-xbla


As you can see on the far right the Sensible World of Soccer game has been even ported to the Microsoft XBOX console – SWOS – available here
🙂


There is however (at least) one AMIGA game that has not been ported to DOS and its made by the legendary TEAM17 studio. Its the All Terrain Racing game. When you check its reviews back when it was released it did not get that high scores as Sensible World of Soccer for example but its one of the better looking and fun racing games made for AMIGA. But Sensible World of Soccer was named one of The 10 Most Important Video Games of All Time on 2007 so it really hard to beat that. Even Sensible Gold got a lot worse reviews.

game-atr


Originally it came in two floppies version so everytime you will launch this game in fs-uae(1) you will need to change the virtual floppy … which is real PITA I must say … not to mention 60 seconds of waiting for it to start. But there is other possibility. The All Terrain Racing game was also created for the AMIGA CD32 variant which used CD-ROM discs instead of floppies. That way by loading single ISO file you do not need to switch floppies anymore each time the game starts. Yay!

Fortunately the fs-uae(1) config for All Terrain Racing game is not long or complicated either.

fs-uae


The fs-uae(1) is also easily installable on FreeBSD by using packages.

# pkg install -y fs-uae


As the All Terrain Racing game is started/loaded from ISO file the save/load game state is not made ‘natively’ in the game but level up above – in the fs-uae(1) itself with SAVE STATE and LOAD STATE options as shown below.

game-atr-save-load


Not all AMIGA games are available as CD32 version but one may also use virtual Hard Disk option on the fs-uae(1) emulator to avoid switching floppies.

DOS Games


The DOS games can be very conveniently played by using the DOSBox which is available on FreeBSD as dosbox packages (or port).

# pkg install -y dosbox


Games in DOSBox start very quickly which is very nice. They also run very smoothly.

dosbox


Like you see I prefer to keep my games outside of the ~/.doxbox directory while keeping only configuration files there. But that is just ‘organizational’ choice. Make your own choices how and where to keep the games that suits you best.

Its also very convenient to redefine all keyboard shortcuts with DOSBox builtin keyboard remapper. For example instead of default [CTRL] for ‘FIRE’ button in Sensible World of Soccer I prefer to use [Z] key instead and that is my only mapping currently.

dosbox-keys


Keep in mind that as the DOSBox main config file is kept as ~/.dosbox/dosbox-${VERSION}.conf file (its ~/.dosbox/dosbox-0.74-3.conf as of time of writing the article) the remapped keyboard shortcuts as kept in the ~/.dosbox/mapper-${VERSION}.map file (its ~/.dosbox/mapper-0.74-3.map as of time of writing the article). Also keep in mind that if you will start dosbox in ~ (home) dir and not in ~/.dosbox~dir then dosbox will creates ~/mapper-0.74-3.map file (in your home dir) instead of proper ~/.dosbox/mapper-0.74-3.map place.

I also made script wrappers for each game so I can launch them quickly both from command line or by using dmenu.

scripts-games


You will find them all as games-* scripts in my GitHub repository – https://github.com/vermaden/scripts – available here. The DOSBox configuration files are in the dosbox dir on the same repo – https://github.com/vermaden/scripts/tree/master/dosbox – here.

My favorite DOS (originally from AMIGA) game is Sensible World of Soccer. I also like to play first Settlers game and Theme Hospital occasionally.

The DOSBox also allows you to easily record both audio (into WAV files) and video (into AVI files) with keyboard shortcuts.

For example I have recorded replay of my Sensible World of Soccer goals this way (then converted it to GIF using ffmpeg(1) for this).

SWOS Goals.


This is the ffmpeg(1) spell that I used to convert the DOSBox made AVI file to GIF file.

% ffmpeg -i ~/.dosbox/capture/sws_eng_001.avi -vf "fps=30" -loop 0 swos.goals.gif


Keep in mind that some games – and Sensible World of Soccer is one of these games – have more then one graphical mode to run them. When you start the game without any switches then it starts in low graphics mode which is ways to spot on by looking at pixelated/dotted ‘S‘ logo on the top right corner. The lines on the field are also not antialiased.

game-swos-not-full


When you add /f flag to the Sensible World of Soccer binary then it starts in full graphics mode and the ‘S‘ letter has now solid grey color on the back and lines on the field are also antialiased now.

game-swos-full

Here is how it looks in the DOSBox config file.

[autoexec]
@echo off
mount C: ~/.dosbox
C:
cd swos-SFX
sws_eng.exe /f


The Sensible World of Soccer has a special place in my private games ‘Hall of Fame’. Its the only game that I was able to play straight for 26 hours with breaks only for meals and pee … but that was in the old AMIGA times in the 90s.

Fourteen Years Later


One of the very old but also very nice logic games I played two decades ago was Swing game. I was not able to start this game in ‘normal’ mode as it started in ‘network’ mode each time. While searching for a possible solution I found … my own bug on DOSBox created 14 years agohttps://www.dosbox.com/comp_list.php?showID=2499 – here. I was not able to force the Swing game to start in ‘normal’ mode back then so I ‘marked’ it as ‘non working’ and moved on.

Now when I checked the bug report I see useful solutions to the problem. Pity I am not able to login and ‘thank’ as I do not remember my password and DOSBox page does not offer password reset service.

Seems that Swing needs to have its game directory mounted again as CD-ROM device. That way Swing starts in ‘normal’ mode and local Single and Multi Player games are now possible.

game-swing


The most important part of DOSBox config is here:

[autoexec]
@echo off
mount C ~/.dosbox
mount D ~/.dosbox/swing -t cdrom -usecd 0
C:
cd swing
swing.bat

Windows Games


Good old WINE. On FreeBSD there are two WINE versions. There is 64bit version as emulators/wine package and 32bit version names emulators/i386-wine. You want to use the latter because most games are 32bit and the 64bit version of WINE is not able to run them 32bit games. The installation on FreeBSD is typical as shown below.

# pkg install i386-wine


Old/classic Windows games usually keep your saved games directly in their installation folders under dirs named ‘SAVE’ or ‘SAVEDGAMES’ but in some time between 2005 and now the game developers started to think that its a ‘great’ idea to store them in your ‘My Documents’ directory … I do not have to tell you how I fell about that ‘decision’ but on FreeBSD it means that you will have saved games directories created directly in your ~ home directory (its /home/vermaden in my case) directory. What a mess.

winecfg


That is probably the only thing I configure in WINE on FreeBSD with winecfg – I set ‘My Documents’ location to ~/games.EXTRACT/profile directory instead.

The DOSBox is also better for gaming then WINE because it allows convenient [ALT]+[ENTER] shortcut to switch between fullscreen and windowed modes. With WINE I need to keep two game ‘startup’ scripts. Separate ones for windowed mode and for fullscreen mode.

wine-window-fullscreen


Below is an example of Colin McRae Rally 2.0 game under WINE on FreeBSD.

game-colin


My best time for Stage 1 on Italy was ‘only’ 2:09.84 so I was not fast enough to beat the all time best with 2:05:75 immortalized here –
View: https://youtu.be/iLLMIJzpoVk
– on YouTube.

Other classic – original Baldur’s Gate game below. It was possible to dual class into specialist mage – not possible now in Enhanced Edition.

game-baldurs-bg1


More up to date Baldur’s Gate: Enhanced Edition also works well.

game-baldurs-play


Less popular titles like Lionheart: Legacy of the Crusader also work well under WINE on FreeBSD. Very unusual game as it used the S.P.E.C.I.A.L system from Fallout instead of ‘typical’ choice like Advanced Dungeons and Dragons like in other Black Isle games.

game-lionheart-play


If for some reason your game does not work under WINE on FreeBSD then you should try Project Homura solution. Its also available as games/homura package (or port) on FreeBSD.

Flash/SWF Games


As I really hate Adobe Flash technology when browsing the web pages but I quite like the compact SWF files as simple flash games using WINE and Flash Player Projector from Adobe. I also use WINE to start the Windows version of that Flash Player Projector program. Its available here – https://www.adobe.com/support/flashplayer/debug_downloads.html – in the debug downloads.

You can pick one of these two but I use the first one.


An example of Governor of Poker 2 game running in the Flash Player Projector under WINE.

game-poker


All of these games can be found on various sites Flash games by looking in the View Page Source in your browser and looking for the link to the SWF file. I can not post these games here for download but if you will have problem finding them then let me know
🙂


Web Browser Games


A class of games that are played directly in the web browser. Examples of such games can be Krunker

game-krunker


… or Spelunky for example.

game-spelunky


If you are VERY bored then you can also try the Chrome Dinosaur Game built into the Chromium browser. To access it try to open the page that does not exists like http://non-existing-site.com for example.

game-chromium


The Chromium browser will then display No Internet error message. Press [UP] arrow now and start to play.

game-chromium-end


If you liked the 2048 game and you DO have Internet connection you may also play 2048 directly at DuckDuckGo page.

game-duck-2048


Last Resort


Sometimes WINE does not work and the game is available only for Windows or Linux. The solution is to use the Virtualbox here. Remember to select/enable the 3D acceleration and install Virtualbox Guest Additions for good performance.

virtualbox


Closing Thoughts


All of these games were played smoothly on oldschool Intel HD Graphics 3000 card from 2011 Sandy Bridge CPU model i7-2820QM as this is with what my ThinkPad W520 came.

If I forgot to post something or its not obvious then feel free to let me know. This post as usual grow more then it should
🙂
Also if you think that I missed some important dosbox(1)/wine(1)/fs-uae(1) options then let me know please.

EOF

Continue reading...
 
Back
Top