Sunday, June 30, 2013

Cannonball 0.19 - OpenGL Rendering

I've updated Cannonball to support OpenGL rendering. This means:

  • Large performance improvement, especially when using full-screen mode. 
  • Scanlines can now be used in both full-screen and stretch modes.
  • Filtering can be toggled in the config.xml for a softer look, similar to MAME.

The old software renderer will still be supported, but is toggled at compile time by unsetting the OPENGL flag in your build.cmake file. 

There are a few other improvements rolled into this build:

  • A minor bug was fixed in the road rendering. This occasionally caused road pixels furthest into the horizon to be displayed at the wrong position.
  • In widescreen mode, sprite clipping is now correct, so sprites close to the camera aren't deactivated so aggressively. This is most noticeable on levels with wide grassy strips etc. 

I'd consider this build beta for now. Please try it out and let me know if you spot any problems. If I haven't broken anything along the way, I will update the main page. Then it's back to LayOut, which has been neglected a little lately.

Download here.
Marcus has also updated the Mac version here.

Thanks to Legooolas for having a stab at the OpenGL code originally. In the end I rewrote everything myself as I wanted to untangle the SDL rendering code from the native OutRun video code. So now the codebase is a little cleaner in this area. 


francois said...

it doesn't work on my PC windows7...??

yt said...

Can you explain what you mean by doesn't work?

- Do you get an error message
- What happens if you run from the command line?

Many Thanks!

matt said...

Any chance us Mac owners can get a more up-to-date version? And how about an iPad version?

yt said...

@Matt: You could try contacting the chap who compiled it on Mac last time round and ask him to compile the latest version... (it's in the develop branch in GIT).

I don't have a Mac so not possible for me to help there.

yt said...

I am actually interested in compiling CannonBall to Javascript using emscripten.

I don't think it's actually that much work.

Another rainy day project... or someone else can try it out. :D

Unknown said...

I have updated the Mac version this weekend.

@yt: Noticed that the OpenGL version had distorted colors on the Mac and played a bit with the R/G/Bmask and R/G/Bshift parameters in rendergl.cpp until it worked out.

yt said...

Nice one Marcus! I'll take a look at your changes and get them back into the main codebase. Thanks for the e-mail, will reply shortly.

Jimbo said...

An incredible port (/re-implementation) of this classic game - Thank you! Is there any way to get steering rumble output somehow (serial port perhaps?).

yt said...

Can you explain further. Do you mean other than with a force feedback wheel, which is currently supported?

Jimbo said...

Sorry I didn't realise - Great! Do you have any notes on how to connect this up to arcade controls (anything would help - I've read through various MAME related threads but I'm not finding noob-compatible info :) ) It would be great to build a re-pro coin-op based on this...

yt said...

No worries Jimbo.

Have you checked out the Cannonball manual here?

It contains some info on the Force Feedback support.

It may not do what you need. If it doesn't, it would be interesting to hear about what you're trying to do at least.

Jimbo said...

Thanks again - that's very helpful. I'd sooner implement this on Linux but am just at the start... at least I know something is possible even if that means resorting to Windows.

Jimbo said...

I re-built with OpenGL (thanks for the pointer!) and enabled filtering via config.xml - it's looking pretty good!

Is it possible to somehow add 'Blargg' filtering?

yt said...

Haha... well everything is possible it's just finding the time.

To be honest, there are a number of things on the horizon and filters aren't really a passion of mine. But maybe someone else wants to take a stab at implementing it? :)

Jimbo said...

Fair enough :) I've been trying but alas don't understand OpenGL at all!