Firstly, thanks for the kind words and interest surrounding the project. It's much appreciated. I've taken some of the initial feedback on board and released a new version.
The highlights are:
Binaries are here.
The highlights are:
- The beginnings of the configuration system. Currently, its an XML file you must edit manually, but this will eventually become a cool in-game GUI.
- Full screen support
- Scaling in windowed mode
- FPS options. Disable the 60fps mode to recreate the original experience.
- Gear options (automatic option & support for cabinets with a switch based shifter)
- Configurable traffic (including the ability to disable traffic entirely)
- Configurable time (including infinite time)
- Advertise sound option
- A new online manual available here.
- MinGW build now includes necessary DLL files
- Visual C++ build definitely built in release mode this time :)
Binaries are here.
Source code is here. (get compiling for some different platforms!)
I'll be taking a break from coding over the next week, before diving back in and adding configurable controls.
37 comments:
Amazing work on this. I'd love to see the same thing for Outrunners since the System 32 is such a rare system to come by, and since its the most complete version of Outrun to me but anyways, keep the epic job!
Love to read your articles about those games!
I, thanks for this ! Outrun is fantastic, and having a rewrite of it, it's really great !
I will try to compile & package that for the OpenPandora (an ARM-base portable device, with good gaming control). I keep you posted on my success / failure on this (first I have to compile Boost, so that an hour or two just waiting...)
ptitSeb: Let me know how it goes. I can happily host binaries or link to your site if you get things working.
Boost isn't essential as such. It's mainly used for the config.xml loading, static asserts and crc32 checking on the roms. So if it doesn't compile for your platform, you could in theory still get the core engine working.
alforata: Definitely no more new decompiles of this scale... it already took 3 years of my life ;) You can do Outrunners if you like!!!
I have tryed it and it's... fantastic !
Thanks for this incredible work on OutRun !! You give to us a great christmas present. if Yu Suzuki looks at your Cannonball, i'm sure he will be proud. with this open source release you are a part of the OutRun history. thanks Again
F.L (France)
Ok, I compiled it on the OpenPandora. I add to addapt path (not a big deal) and on the main.cpp, change bool pause to bool pauseEngine (and adapt the function accordingly). I remove the -lsdl_main. And it linked...But it segfault at start, before SDL (with or without roms)... I have to debug now I guess
Quick update: it segfault at the very beginning, the SDL_Init call, so maybe it's my environnement... I'll dig it.
Yep sounds like something is up with your SDL setup...
I think the problem is that to use SDL, I must pass some parameters to the compiler and liker (with sdl-config --cflags --libs). I have to understand how pass that in the cmake... It's easier with plain Makefile (or at least I am a bit more used to that)
It might make sense to try compiling one of the simple demos that comes with SDL first, to ensure your SDL setup is working. And then take it from there... :)
You could always generate the standard gcc makefiles with cmake and edit them as another starting point.
I just have. They work flawlessly.
Ok. I found it !!! That's crazy, it's the array "connect[8]" that was in conflict with an X11 "connect" function. I have to put "static" in front of the definition, and it ran !!!
It is a bit slow in a windows. I have to switch to FullScreen and play a bit with all those option.
I will also change some of the default controls to make it more User Frendly and adapt to the design of the OpenPandora.
But it works !!! That's great !
I forgot to tell, I opened a thread in the dedicate OpenPandora Forum with screenshot and executable here http://boards.openpandora.org/index.php?/topic/11068-cannonball-the-enhanced-c-outrun-engine/
I will put the modified sources also later today.
Hmm. It shouldnt be slow as we had it running on a raspberry pi previously. Try lowering the resolution if possible or changing the sdl flag to HW SURFACE instead of software or locking to 30fps?!
i have tested Cannonball in 30 fps on my old laptop ( windows XP, P3 -128 Mo )and it runs perfectly. congratulations again for your release
I allready use HW SURFACE, HW Scaling, and limited at 30 fps. But it is slow on an overclocked 1Ghz ARM.
On the Respebery Pi, was it with the sound? Because I suspect the sound system to be demanding (I try with 22050 just to check, and it looked better, but non functionnal).
Could be. Theres an option in globals.hpp to disable the sound code. So give that a go :)
I will try that and report back
It does feel smoother without sound. But still a bit too slow at some place, but an enjoiable experience...
I will take a look at the main bottleneck and see if I can get a smooth experience (will submit code in the OpenPandora thread if I find things to do, as I don't see where else to put that).
What actual resolution are you running in? By default cannonball just uses what the default resolution is and scales up. This is the best approach for fast pcs but maybe not handhelds. Can you lock it to scale 1 to check the speed. Im still convinced pandora is quick enough :)
Actual resolution is 640x480 (screen is 800x480). If fixed scaled to 1, but the speed increase is still not enough. I keep looking at it.
The resolution of the game is 320x224, so it should be running at that unscaled not 640x480.
Anything more, and you'll be losing speed by pushing more pixels and upscaling.
Having said that, I've no idea if this is where your bottleneck lies...
Yes, I have seen that, and be default the framebuffer is 640x448. But even with 320x224, it is slow. Not sure the bottleneck is here. I have to experiment now, desabling everithing and enabling layer one by one to find the most taxing one...
Ok, I now have CannonBall running fullspeed (just some very light stutering on very rare occasions).
I optimise some part of the code (less clean now I'm afraid), fixed rendering to 30 fps, and use "fake" windowed*1 that is rendered Fullscreen with highly optimised scalling !
That's great to have that on this Pocket Device :-)
I will try to add a "half rate" sound rendering if I can, and it should be fast enought for every one (I also have the nosound option).
Again, that's a great project, thank you very much.
If you can send me the code, I will see if we can merge any of the changes into the main branch. :)
Also, if you can take some photos of it running would be cool to add it to the blog.
Don't forget to post the code somewhere regardless (see the license for details).
Nice one!
No problem for Screenshot or CodeSource. Just I can't put them in this blog. So everything is available on the Boards of OpenPandora here: http://boards.openpandora.org/index.php?/topic/11068-cannonball-the-enhanced-c-outrun-engine/
I haven't found how to send all this to you...
Nice one! :)
Feel free to e-mail me using the address here:
http://javagear.co.uk/images/email.png
Great. Once at home, I'll send you the sources and some screenshots. I'll take a picture of the OpenPandora running Cannonball also (as the Screenshots are identical to thoses on a PC for example)...
Cool. I had a quick look through your optimizations, and seems a fair few of them can just be rolled into the main codebase.
Feel free to send me a summary of what you think the best performance improvements were.
Another tweak you can try is in src\main\engine\osprites.hpp
Change this line:
const static uint8_t SPRITE_ENTRIES = FIX_BUGS ? 0x62 : 0x4F;
to 0x4F only. This will render fewer sprites (same as the original game) and be faster on certain levels. But you will get the broken arches on Gateway.
Ah yes, the broken arches. I prefer when they are complete ! I compared the Demo mode between Cannonball and Emulated Outrun in FinalBurn, and was surprised by this difference... :-) I keep the fixed one, I will try to redo more the Zoomed Sprite part. I want to preprocess the sprites (1 pixel per int) to make te rendering even faster (and simpler to read).
How does OutRun run under emulation on Pandora? Just curious to understand the difference as the video and sound rendering is derived from MAME.
Outrun was smooth on FinalBurn. But there are some auto frameskipping I think (I have to check the options), so i's not exactly a 1:1 comparaison.
And MAME is quite slow on the Pandora. I don't have a build of MAME on it, but I don't think Outrun is playable with good enough framerate.
FinalBurn is more optimized than MAME I think.
Btw, I checked in a few optimizations to the rendering code in the 'develop' branch on github. Might be worth absorbing (tile rendering and road renderering in hwvideo)
Send a mail with some photos of the pandora running Cannonball. Hope you received them.
Excellent work. I noticed that unlike the previews the roms need a hyphen. opr-, epr-, mpr- etc.
I also see that there isn't a config setting to enable broken bridges on Gateway. It is silky smooth and looks better enhanced but it's nice to see the original. I can't remember if the Saturn version had the broken bridges.
I changed the rom naming to reflect mame exactly.
I'll add a config mode for that stuff in due course.
Enjoy!
Post a Comment