Vanfanel
Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Cavestory (NXEngine) fixed for Raspberry Pi

Sun Dec 09, 2012 7:50 pm

Hello there,

Here I bring you a new Cave Story version for the Raspberry Pi, with threaded audio to avoid stalls in previous versions.
It also uses the included libSDL version wich is compiled with a DISPMANX backend, so it's smooth (no tearing) because it uses double-buffer + vsync and full screen scaling is done in hardware.
Dowload here:

https://github.com/vanfanel/cavestory_r ... master.zip

Instructions:
=========
-Download master.zip
-mkdir ~/cavestory
-cp master.zip ~/cavestory
-cd ~cavestory
-unzip master.zip
-rm master.zip
-./cavestory.sh

NOTE: I don't know if it works with X, no idea. I'm not interested in X, I don't use it and never will.
Please test it and report any other problems.

Original sources here:
http://nxengine.sourceforge.net
Next nxengine version will surely include the threaded audio code.

s-config
Posts: 3
Joined: Sun Dec 09, 2012 10:39 pm

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Sun Dec 09, 2012 10:54 pm

you're right! it doesn't work with X but it's okay, games run better on rpi from rasbian shell anyways.

One thing that happens in my Pi is when i start a new game, save on level 1 and die on the spikes, die on the spikes again. it locks my Pi. So I guess the lesson is don't die so much!:)

But otherwise it's great to have the music back! Thank you for the hard work in getting this working on the Pi!

Vanfanel
Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Mon Dec 10, 2012 2:27 pm

@s-config: I tried starting a new game and dying on the spikes several times with no lock ups at all. Have you got an idea of how to reproduce the problem? Dying on the spikes causes the ORG player to change music so this kind of error could be my fault, but I can't reproduce it.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Mon Dec 10, 2012 3:10 pm

Dying to get home to try it out :)
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Mon Dec 10, 2012 5:15 pm

Running on Raspbian armhf off a motorola lapdock works great thank you.

After unzipping
cd /cavestory_rpi-master
then
./cavestory.sh

Played about 10 minutes no hangs right from login as promised no X Window :) always a plus
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

moocow1452
Posts: 26
Joined: Wed Apr 04, 2012 10:03 pm

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Wed Dec 19, 2012 11:17 pm

Been trying to port this to Android using xperia64's modded version of the NX engine (http://www.cavestory.org/forums/index.p ... r-android/) But the sounds keep on hanging up. Think we could combine our powers to get a proper port over?

SSilver2k2
Posts: 179
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
Contact: Website AOL

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Thu Dec 20, 2012 3:44 am

So Awesome. I hated how the version I compiled had the audio stuttering. Great Job!!!!
My blog of various geeky things - http://blog.sheasilverman.com
PiPLAY - http://piplay.org
DeskCade.com - Mini Raspberry Pi Arcade Cabinet

Cael
Posts: 93
Joined: Sat Jul 07, 2012 7:08 am

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Sat Feb 23, 2013 3:28 am

i figured that out (first time really using HDMI for sound much less a tv w/ it.

is there a copy of the source? (so it can be added to RetroPie)

petrockblog
Posts: 272
Joined: Wed Jul 04, 2012 6:12 am
Location: Germany
Contact: Website

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Mar 05, 2013 6:37 pm

Has someone already set up game pad / joystick control with this and could give advice about how to do that?
fun stuff for technics enthusiasts: www.petrockblock.com

Redyam
Posts: 5
Joined: Fri Jun 29, 2012 2:53 pm

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Thu Mar 07, 2013 3:14 pm

I tried it, and the sound is there + it runs smoothly.
However, it's only a quarter screen size, and the graphics keep flashing. Any ideas why?

Trey
Posts: 4
Joined: Sun Sep 16, 2012 2:40 pm
Location: Austin, TX
Contact: Website

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Mar 19, 2013 9:16 am

Seems to be runny smoothly, thanks! Is it possible to disable bilinear filtering or enable joystick support? The libretro port had these things covered through retroarch, but the micro freezes were making platforming a little too challenging :P

Vanfanel
Posts: 433
Joined: Sat Aug 18, 2012 5:58 pm

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Mar 19, 2013 9:28 am

@Redyman: No idea, Are you running from the console or are you using the defective thing people call X?

@Trey: joystick support depends on the nxengine itself. Will look into it and will try to disable bilinear filtering, but I don't know if It will be able to do the joystick part because the engine is not mine and I don't know the code at all so I can only make small changes.

Newk33
Posts: 13
Joined: Wed Mar 27, 2013 1:28 am

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Sun Mar 31, 2013 11:23 pm

have the same error as Redyman:

booting my Raspi (version B) in Raspbian (wheezy) without starting X
(got a DVI 1024x768 screen hooked up on HDMI and in boot config configured at this resolution)

Code: Select all

pi@raspberrypi ~/cavestory $ ./cavestory.sh
Loading settings...
videoinfo: desktop bpp 16
SDL_SetVideoMode: 320x240 @ 16bpp
I can start your unaccellerated version without this visual bug and scaled from commandline without X
And even stranger, when i start the new version from X that flickering is gone! but still very tiny 320x240 on screen and suffers from that unaccellerated X.

i tried to use the settings.dat from the older version when that is set to 960x720 resolution as that gave a crystal clear and nicely fitting game on screen with the older version.. but when i put that file in the new folder i get a segmentation fault when starting ./nx
any other way to set resolution? and hope the flickering can be cured

Luutifa
Posts: 16
Joined: Mon Nov 26, 2012 6:20 pm

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Apr 02, 2013 5:18 pm

Yup. Same here.
Screen is small, and flickering the background (of the game, like a cave wall) trough.

This problem started when I had to make a new SD card. I have the latest Raspbian, and the latest firmware.

I hope something can be done.

Also this version is still a bit unstable.
It can crash on some sound effects, or when going from a room/place/level to another.
Sometimes so badly that I can only plug the power out.

Anyway, this is a great work. I'd just like to have it working.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5370
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Apr 02, 2013 5:44 pm

Gave it a quick try. Latest firmware and launched from command line.
It filled the screen, sound seemed perfect and it ran pretty quick. It's a bit too easy to die though...

Newk33
Posts: 13
Joined: Wed Mar 27, 2013 1:28 am

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Sun Apr 07, 2013 9:49 pm

strange that it runs diffrently on other debian wheezy... or are you running some other OS, Dom?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5370
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Mon Apr 08, 2013 2:14 pm

Newk³ wrote:strange that it runs diffrently on other debian wheezy... or are you running some other OS, Dom?
I'm running on standard raspbian wheezy image.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Apr 09, 2013 5:49 pm

I've also given this a try, I'm running the Pi on a Motorola Lapdock where the screen resolution is 1366x768.
It seems to default to 320x240, but was quite smooth and playable. Sound was great too.
Although I would love to be able to specify a higher resolution, is it fixed to 320x240 because of the sound issue then?

ruadrim
Posts: 2
Joined: Wed Apr 17, 2013 2:48 pm

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Wed Apr 17, 2013 2:50 pm

I also would like a way to change the resolution and configure a joystick.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Mon Sep 30, 2013 8:17 pm

Folks, Cave Story is now up on the Pi Store if anyone wants it.
It's only just been approved so if a few people could test it, that would be great;

You should find it under Games.
http://store.raspberrypi.com/projects/cavestory

dexwerx
Posts: 2
Joined: Tue Oct 08, 2013 3:03 am

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Oct 08, 2013 3:10 am

seems to run smoothly, but needs game pad support - ie: a way to assign buttons.
It registers the dpad fine on my NES->USB, but the other buttons are all over.

I can't even find where it installed to look for configs?

dexwerx
Posts: 2
Joined: Tue Oct 08, 2013 3:03 am

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Oct 08, 2013 3:14 am

FYI cavestory.cfg is in
/usr/local/bin/indiecity/InstalledApps/cavestory/Full

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Tue Oct 08, 2013 6:58 am

dexwerx wrote:FYI cavestory.cfg is in
/usr/local/bin/indiecity/InstalledApps/cavestory/Full
Yep, what he said^

malcolm5054
Posts: 1
Joined: Mon Oct 21, 2013 9:59 pm

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Mon Oct 21, 2013 10:09 pm

Davespice wrote:Folks, Cave Story is now up on the Pi Store if anyone wants it.
It's only just been approved so if a few people could test it, that would be great;

You should find it under Games.
http://store.raspberrypi.com/projects/cavestory
I launched the game but it asks to either Load or New Game. Up and down arrow works but I can't get the game to start.
Pressing F1 brings up a menu but I can't find a way to use it.

Any suggestions. I am new to Raspberry Pi....bought it for my grand son, so trying to get some things working.

thanks

Malcolm

User avatar
PokeEngineer
Posts: 26
Joined: Tue Oct 13, 2015 11:19 pm
Location: United States

Re: Cavestory (NXEngine) fixed for Raspberry Pi

Thu Feb 21, 2019 4:00 pm

Vanfanel wrote:
Sun Dec 09, 2012 7:50 pm
Hello there,

Here I bring you a new Cave Story version for the Raspberry Pi, with threaded audio to avoid stalls in previous versions.
It also uses the included libSDL version wich is compiled with a DISPMANX backend, so it's smooth (no tearing) because it uses double-buffer + vsync and full screen scaling is done in hardware.
Dear Vanfanel,

I am currently working on an updated version of NXEngine for Raspberry Pi with bug fixes and stuff and I would very much like to have the source code to your port, as this would make my life so much easier. Can you please provide?

Also, sorry for bugging you.

Thanks,
PokeEngineer
Be happy! Take a BYTE out of life!
(Also, a proud owner of 1 RPI B+, 1 RPI Zero, and 1 RPI 3)

:D

Check out my GitHub account: https://github.com/PokeEngineer

Return to “Gaming”