BBCSDL side-scroller demo
« Thread started on: Nov 4th, 2017, 6:31pm »
BBCSDL is, of course, based on SDL 2.0 which began life as primarily a 2D game engine and which is still very well suited to that application. However to date there haven't been any really good examples of BBC BASIC leveraging the power of hardware-accelerated 2D rendering provided by SDL.
I have attempted to put that right by adapting some of the graphics from David Williams' recent 'Forces of Darkness' game to run in BBCSDL. The original BB4W game uses David's own custom graphics library GFXLIB2 (largely written in assembler) plus a little compiled C code which he has put in a DLL. As such it is very much Windows-specific.
Instead of calling GFXLIB library functions my adaptation calls SDL functions directly (using the SYS statement). Fortunately in almost every case there has been an exact or close equivalent, and only minor changes have been necessary elsewhere. The C code has been replaced by BASIC code.
The end result is a program which is 100% BBC BASIC but with a performance comparable to the original version. The video below shows it running at 60 frames-per-second in BBCSDL on a Windows PC.