BBC BASIC
« BBCSDL side-scroller demo »

Welcome Guest. Please Login or Register.
Jan 20th, 2018, 6:06pm


Cross-platform BBC BASIC (Win32, Linux x86, Android, Mac OS-X, Raspberry Pi)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: BBCSDL side-scroller demo  (Read 86 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx 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.

Richard.

« Last Edit: Nov 4th, 2017, 6:33pm by Richard Russell » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx Re: BBCSDL side-scroller demo
« Reply #1 on: Nov 5th, 2017, 2:53pm »

And here it is running on a Raspberry Pi 3:

User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx Re: BBCSDL side-scroller demo
« Reply #2 on: Nov 5th, 2017, 9:09pm »

and on Android (a OnePlus 5 ARM smartphone):

User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls