Topics

Forces of Darkness - BBCSDL version

Richard Russell
 

I'm very pleased to announce the release of the BBCSDL version of David Williams' prizewinning video game Forces of Darkness. It may be downloaded as FODSDL.zip (note that this is a large file, more than 50 Mbytes).

The game will run as a demo on all the supported platforms (Windows, Linux, Mac OS, Raspberry Pi, Android, Amazon Fire TV) but requires a keyboard - or Amazon Fire Remote - in order to be played. When running on a Raspberry Pi or Android device it automatically configures itself to a low memory mode of operation, with reduced features. Even so, you will need to configure the RPi for 256 Mbytes of graphics memory (raspi-config utility).

Forces of Darkness requires BBCSDL v0.19b, which I released today. Attempting to run it with an earlier version will likely give poor results. It makes heavy use of accelerated 2D rendering so the performance will depend very much on the GPU in your PC. I will be interested to learn how well it works compared with David's original.

The principal objective in converting the game has been to demonstrate the capabilities of BBCSDL, and to show that translating a BB4W+GFXLIB program to BBCSDL (or coding a game from scratch) is relatively straightforward. The conversion was achieved largely by replacing GFXLIB calls with exact or near equivalent SDL function calls. The resulting program is 100% BASIC, with no assembler code and no custom libraries or DLLs.

I cannot guarantee that the game is actually playable, since that is not my area of expertise! It is possible that the different (and less accurate) collision-detection mechanism may have affected gameplay; if anybody is able to contribute a recorded 'demo data' file that plays the game to completion I would be pleased to receive it.

Richard.

Richard Russell
 

I've updated FODSDL.zip to provide support for playing the game using only a touchscreen (i.e. without a keyboard) for example on a mobile device - although it works on my Windows laptop as well. My recommendation would be to use a stylus rather than your finger however!

The download link is the same as before. The file is a bit smaller now (35 Mbytes compared with more than 50) because I've downsampled the background bitmaps to reduce the memory footprint.

Richard

Richard Russell
 

In case anybody is interested, you can find a video of Forces of Darkness running on a Raspberry Pi 3 here.  It doesn't always manage to keep up with the full frame rate (50 Hz) but it's remarkable that it runs as well as it does on such a low-powered machine.  Most Android devices will have a faster processor than the RPi, and quite possibly a faster GPU too, so the program should run at least as well on that platform.

Even if, like me, playing that style of video game doesn't appeal, you can still marvel at the skill of the programmer, and hopefully be impressed by what a program written in 100% BBC BASIC can achieve.  If you are inclined to try your hand at something similar, looking at the FODSDL source code should give you plenty of ideas.

Richard.

Richard Russell
 

The latest addition to FODSDL is a Full Screen option; this is activated by setting 'fullscreen 1' in the Config.txt file. It works on all the supported platforms, with the exception of Android of course - on which it always ran 'full screen' anyway! However it does increase the likelihood of crashing the Raspberry Pi because of apparently running out of graphics memory (I'm sure it shouldn't crash so badly; this is presumably an RPi bug).  The trick for making it work Full Screen on a Raspberry Pi 3 seems to be to run it directly rather than from the IDE. So for example run it using this command:

Code:
BBCBASIC/bbcsdl FODSDL/Fod.bbc 
(adapt the command to suit your installation directories, of course).

The new version may be downloaded as FODSDL.zip as before.

Richard.