Saturday, January 02, 2016

CannonBall SDL 2 Code Changes

I haven't done any coding work on CannonBall lately. This isn't because the project is abandoned, or that I've lost interest as I still have plenty of ideas. It's simply a result of my limited amount of time and as such I've focused my attention elsewhere.

Having said that, Manuel Alfayate has made some critical backend changes which result in CannonBall performing really well on Linux based systems including the Raspberry Pi. Previously performance was stuck in low gear.

Firstly, he has ported CannonBall to SDL 2. The codebase previously used the ancient SDL 1.2 library. This results in accelerated, fullscreen, X-less mode for the Pi using SDL 2. To utilise this, you must build the sdl2 or sdl2gles cmake profiles.

Right now, SDL 1 is still included in the codebase and is the default for Windows, but it will be phased out the next time I release a new version. Right now , the main benefits will be for Linux based systems where you don't want to rely on an X-Windows GUI environment.

There is still optimization needed for the Pi 1 and Pi Zero. I'd like to look into this when I have some time. But once you're past the sluggish start line, you can achieve 60fps in widescreen mode. Not bad for a $5 machine.

Here's a video of the changes in action with the frame counter on display. A $5 OutRun PCB could closer than you might think...


I've merged his changes into the main codebase. 

3 comments:

Unknown said...

This is very exciting news! I recently got a Raspberry Pi 2 with the sole (for now) aim of running CannonBall.

Unknown said...

Hello Cris, it would be possible to import our own sprites to Layout editor?
or this is another stage to come
thank you and good job

Taggsta said...

So I could get your PCB for my machine in the future? Might be quicker than getting mine repaired