Cave Story for Android/iOS (via PSX4droid/PSX4All) Theory

Oct 22, 2012 at 2:32 AM
Junior Member
"It's dangerous to go alone!"
Join Date: Jan 24, 2012
Location: Inside the haunted game with BEN.
Posts: 35
  • Thanks for double posting.
  • Nicalis has asked for no more Cave Story ports to be made, since that is their business now and they own the rights to Cave Story.
  • Welcome to the forums.
  • :3

nicalis is satan.
 
Oct 28, 2012 at 1:23 AM
Junior Member
"It's dangerous to go alone!"
Join Date: Oct 21, 2012
Location: Appalachia, NC
Posts: 32
Age: 34
nicalis is satan.
I don't know if you read the posts after that, but one of them mentions it was actually Pixel himself who called for a halt on fan-ports, not Nicalis.
 
Oct 30, 2012 at 11:19 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Oct 24, 2012
Location:
Posts: 22
Not sure if I have to make post here or to create new thread. Anyway.

I'm making the port of NXEngine to iOS platform.
Proof is here:
Project page is here: https://github.com/PIlin/NXEngine-iOS

Work in progress, but, as you can see, game is already in a good state.

There are no packages yet, source only. And I don't think, that the game will appear in appstore in near future. I'm not even sure that it is possible to submit it to appstore due to of legal regulations, licensing, rights and such stuff.

I would appreciate any help. For example:

1. Can someone check the licensing? I think, original game files are free and NXEngine is GNU GPL, but all this legal stuff makes me really confused.

2. Can someone make an icon for application?

3. If someone have experience for packaging apps for jailbroken devices, feel free to help me and distribute it on cydia.

4. I would appreciate, if you manage to build and launch the game, find and report the bugs. And then, make the patches ;)
I worked a little bit on an android version but gave up (your port works much better). As for licensing, to avoid potential issues with redistributing the original game files, what should be done is to add a downloader the app which downloads the data files from a licensed distributor (such as cavestory.org) and have it read the downloaded files. Then all the deb/ipa would contain is the GPL licensed app. If you could send a binary compiled for a jailbreak I could help create a deb package for cydia, including a data downloader script.
 
Dec 11, 2012 at 12:34 AM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Oct 24, 2012
Location:
Posts: 22
pashkoff said:
I have established cydia repo for testing purpouses. There is development version of the engine. Link is http://pilin.github.com/NXEngine-iOS/repo/
Issue tacker is on the project page https://github.com/PIlin/NXEngine-iOS/issues?state=open
Thanks to your fixes (and recompiling using the official NDK), the ear-bleeding sound issue and signboard issue in NXEngine AE are fixed. Only two problems now. Sound effects don't seem to play, and its slow. I'll try a release compile and see if it will run faster
 
Dec 11, 2012 at 3:47 AM
Junior Member
"Wahoo! Upgrade!"
Join Date: Aug 24, 2012
Location: Stuck inside a warehouse with nothing but a mac an
Posts: 46
Age: 26
Dec 11, 2012 at 10:34 AM
Junior Member
"Fresh from the Bakery"
Join Date: Oct 19, 2012
Location:
Posts: 13
xperia64 said:
Thanks to your fixes (and recompiling using the official NDK), the ear-bleeding sound issue and signboard issue in NXEngine AE are fixed. Only two problems now. Sound effects don't seem to play, and its slow. I'll try a release compile and see if it will run faster
I am very glad to read that.

There were two issues with sound:
1. Undefined behaviour when game is rendered sound samples from formulas. Fixed in https://github.com/PIlin/NXEngine-iOS/commit/4fab248cea7a0aab342713a536834bbdff169da2 (and wrong fix was in the previous commit). This issue was only in release configuration when compiler made optimizations.
2. Mixing buffer was not cleaned. It seems, that it worked in SDL1.2, but in newer version it made realy stramge sounds. Fixed in https://github.com/PIlin/NXEngine-iOS/commit/34f2452a2a74ce14e813d67d2a7c2dcd229d54f1

If you interested, you can try to revert changes and check, what caused your problems with music.

Are you sure, that sound effects are enabled in settings? Sure, it's stupid question, but anyway.

Also, about speed. Are there any profiler tools for android? It would be interestiong to see, where game spends morst of the time. I'm almost sure it will be in rendering.
I have moved game to SDL2, where it's possible to use hardware accelerated rendering, but I have not changed how it's rendered. And I have to say, that engine does it in very unefficient way. The next thing I want to do is to remake rendering. Problem is, I don't really have much free time now.
 
Dec 11, 2012 at 6:00 PM
Mrs. Policewoman
"Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-Wacka-BLEIUP"
Join Date: Oct 24, 2011
Location: Canada
Posts: 330
Age: 25
Works quite well so far, We all know what this means... MOD PORTING!!!!!!!!!!!
Or MAYBE modding program porting, now THAT would be nice...
 
Dec 11, 2012 at 6:29 PM
Junior Member
"Fresh from the Bakery"
Join Date: Oct 19, 2012
Location:
Posts: 13
hate9 said:
Works quite well so far, We all know what this means... MOD PORTING!!!!!!!!!!!
Or MAYBE modding program porting, now THAT would be nice...
If mods change only game files, than I don't see big problems to port something to mobile device. For beginning, you can try them under NXEngine for Windows or Linux.
 
Dec 11, 2012 at 9:09 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Oct 24, 2012
Location:
Posts: 22
pashkoff said:
I am very glad to read that.

There were two issues with sound:
1. Undefined behaviour when game is rendered sound samples from formulas. Fixed in https://github.com/PIlin/NXEngine-iOS/commit/4fab248cea7a0aab342713a536834bbdff169da2 (and wrong fix was in the previous commit). This issue was only in release configuration when compiler made optimizations.
2. Mixing buffer was not cleaned. It seems, that it worked in SDL1.2, but in newer version it made realy stramge sounds. Fixed in https://github.com/PIlin/NXEngine-iOS/commit/34f2452a2a74ce14e813d67d2a7c2dcd229d54f1

If you interested, you can try to revert changes and check, what caused your problems with music.

Are you sure, that sound effects are enabled in settings? Sure, it's stupid question, but anyway.

Also, about speed. Are there any profiler tools for android? It would be interestiong to see, where game spends morst of the time. I'm almost sure it will be in rendering.
I have moved game to SDL2, where it's possible to use hardware accelerated rendering, but I have not changed how it's rendered. And I have to say, that engine does it in very unefficient way. The next thing I want to do is to remake rendering. Problem is, I don't really have much free time now.
I fixed the sound effects issue. It was trying to load from sndcache.pcm which is broken. Loading from the .pxt's works perfectly. On a side note, I think in both of our projects we should disable the resolution option in the menu.
 
Dec 11, 2012 at 9:34 PM
Junior Member
"Fresh from the Bakery"
Join Date: Oct 19, 2012
Location:
Posts: 13
Dec 11, 2012 at 9:47 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Oct 24, 2012
Location:
Posts: 22
pashkoff said:
Yes, cahce removal helps with those issues. And I have already disabled resolution switching.
https://github.com/PIlin/NXEngine-iOS/commit/0ad911d82a697f821d0464cc32a30f7446d323d1
Good. Also, as android's virtual keyboard doesn't play nice with SDL, NXEngine AE currently requires a physical controller such as a wiimote.
Here is the app download:
http://db.tt/KYl38Rs5
and here is the data download:
http://db.tt/6nKdu9Za
(extract the nxengine folder into /mnt/sdcard/data/)
NXEngine AE will probably not be on the google play store any time soon for various reasons. I might upload it to slideme or somewhere like that
 
Dec 11, 2012 at 10:02 PM
Junior Member
"Fresh from the Bakery"
Join Date: Oct 19, 2012
Location:
Posts: 13
xperia64 said:
Good. Also, as android's virtual keyboard doesn't play nice with SDL, NXEngine AE currently requires a physical controller such as a wiimote.
Here is the app download:
http://db.tt/KYl38Rs5
and here is the data download:
http://db.tt/6nKdu9Za
(extract the nxengine folder into /mnt/sdcard/data/)
NXEngine AE will probably not be on the google play store any time soon for various reasons. I might upload it to slideme or somewhere like that
I have written my own implementation of virtual gamepad which uses sdl2 touch events. It's what you can see in video. So it's, probably, biggest cange I made in the engine. It is in vjoy.cpp. Also, I have made support for touch control of in-game button and such stuff. For this I had to intervene into a lot of places around the code (but they are all under ifdef CONFIG_USE_TAPS. Or must be). And also I have done some ios-specific code for tap and gestures support. But this code is located in platform/iOS folder.
So, check it. Maybe you can reuse it.

What do you think about combining our efforts? I think, that the main part - the engine - is the same on both platforms. So we can merge our code and improve it together. I will be traveling for a few weeks, so think about it.
 
Dec 11, 2012 at 10:43 PM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Oct 24, 2012
Location:
Posts: 22
pashkoff said:
What do you think about combining our efforts? I think, that the main part - the engine - is the same on both platforms. So we can merge our code and improve it together. I will be traveling for a few weeks, so think about it.
Main problem with my port is that it appears to be based off of NXEngine v. 1.0.0. I used the code from the openpandora port as a base (here: http://sebt3.openpandora.org/src/?f=nxengine-pandora-20110624.tar.gz ) . I also tried compiling the 1.0.0.4 core but it was even slower and had graphical glitches (I might try to fix it later, or just start with a fork of the ios port with the android-specific fixes I added).
Here is my current source code: http://db.tt/mv1E7sOc
 
Dec 11, 2012 at 11:00 PM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
You guys have no idea how dumb you sound right now.
 
Dec 11, 2012 at 11:19 PM
Junior Member
"Fresh from the Bakery"
Join Date: Oct 19, 2012
Location:
Posts: 13
Carrotlord said:
You guys have no idea how dumb you sound right now.
Yes, you are right - I have no idea. Can you, please, continue and clarify, what have you mean?
 
Dec 11, 2012 at 11:22 PM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
1. Why are you porting anything? This is Cave Story, NOT your own game.
Nicalis could easily sue you. You're right - they probably won't, but porting it isn't actually legal, especially if you're trying to make a faithful recreation of the game.
Pixel and Nicalis have said very explicitly: they control all ports, and no more ports will be made. This is final.

2. Do not say that you can support mods until you have a working port. I mean a fully working port, not the examples you have now.

3. Do you know how hard it is to port mods to the PSP? Why can't we easily port mods to Mac and Linux? There is a good reason. A very good reason that you should never attempt to fix by yourself unless you are an industry leader.

I consider real mods to be real mods. Also, this is just a minor gripe, but it would be nice of both of you two could get avatars. It is confusing to talk to you right now when I can barely tell who's who.
 
Dec 12, 2012 at 12:10 AM
Junior Member
"Wow! The more I drink of this magical beverage, the more games I can play! Wheee!"
Join Date: Oct 24, 2012
Location:
Posts: 22
1. We are not porting cave story. We are porting NXEngine. NXEngine is licensed under GPL and does not include the cave story data files and therefore is perfectly legal to port. Also, we will not be making profit of any kind from our ports. We simply want to make the game available to a wider audience.
2. I agree. And again, we are not porting cave story itself. There can never be a "fully working port" of cave story, only high-quality ports of nxengine. If a mod works with NXEngine on a PC, then it will be supported with our apps. Currently, almost all mods are glitchy at least with the android port. The only playable one was Boss Rush, and it would only work if the included profile was loaded.
3. Pixel was never an "industry leader" and yet they made this game. And, Nicalis is never going to allow the use of cave story mods. On a side note, the PSP uses a compressed Data.csz file which adds to the difficulty of porting. Porting mods to NXEngine and then trying to add them to the Data.csz file would be the logical course of action.
4. Done.
And, here is a video of my latest update:
http://www.youtube.com/watch?v=NwMQKcV1wgc
 
Dec 12, 2012 at 12:28 AM
Junior Member
"Fresh from the Bakery"
Join Date: Oct 19, 2012
Location:
Posts: 13
Carrotlord said:
1. Why are you porting anything? This is Cave Story, NOT your own game.
Nicalis could easily sue you. You're right - they probably won't, but porting it isn't actually legal, especially if you're trying to make a faithful recreation of the game.
Pixel and Nicalis have said very explicitly: they control all ports, and no more ports will be made. This is final.

2. Do not say that you can support mods until you have a working port. I mean a fully working port, not the examples you have now.

3. Do you know how hard it is to port mods to the PSP? Why can't we easily port mods to Mac and Linux? There is a good reason. A very good reason that you should never attempt to fix by yourself unless you are an industry leader.

I consider real mods to be real mods. Also, this is just a minor gripe, but it would be nice of both of you two could get avatars. It is confusing to talk to you right now when I can barely tell who's who.
1. Ah, yes. I have heard this argument.
I want to explain something.
I wanted to play CaveStory on my iPhone and I found NXEngine. As I'm C++ developer, I have all needed skills to fullfill my wish. After the first success, I was carried away liitle bit and made misleading statements. I have already changed the title of mine youtube video demonstration. When I come back from my travel, I will change another names, texts, e.t.c.
Before coming to this forum, I was not aware about Nicalis, Pixel, disallow of game ports. Now I understand the situation better, so let me put it this way.
I'm not porting the game Cave Story. I'm porting game engine named NXEngine. Yes, this engine is able to interprete cave story game files. Hell, it was its purpose. And I use Cave Story game files to debug engine (so the files are in current development build and avilable from the repo). I will delete game files as fast as possible (in the next week). By the way, no one explained me yet the legal status of Cave Story game files. Is the game freeware, isn't it? Who can redistribute game (original game, not the CaveStory+)? It can be downloaded only from site of Pixel? From this site? Where is the list of allowed sites?

About suing me. Until someone will prove that GNU GPL v3 license of NXEngine is not valid - I'm able to do and improve my port of NXEngine for iOS. But maybe I'm wrong? I came from exUSSR country. We have very low legal culture.

2 and 3. I'm not saying that it supports mods. What I said is, if some mod changes only game files and not the engine, there is possibility that it will work using NXEngine. I have no idea, do mods change original CaveStory engine or not. For example, most mods for half-life use unchanged engine, so I was sure that cave story are the same. Looking to your 3-rd point, mods do change game engine, if there are problems to run them not under windows. Then, obviosuly, it's not possible to run mods using NXEngine.

By the way. Just out of curiosity. If mods chage original game engine (using some hacking and meddling with binary), is it ok for Pixel and Nicalis? I suppose, there is no official way to extend and modify the game. And for me, it looks like modding is what Nicalis do with the PC game (leaving aside releases on wii and stuff - there they do real deal).

Avatar - maybe after I will return from the trip.


EDIT: oh. xperia64 also build his own wall of text. And it seems, that he has the same thoughts as me.
 
Top