1 (edited by gjtorikian 2011-11-09 08:20:04)

Topic: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Edit: See this new thread: http://forum.nevercorner.net/viewtopic. … 317#p26317

Frustrated by the two+ years waiting for Neverball ME to be released, I've taken to the monumental task of porting Neverball to Android.

And I am failing.

Here is the requisite video: http://www.youtube.com/watch?v=Wd3xyhH0FR4

Not very pretty, right?

It is coded in native C, bypassing almost entirely the Java layer. I'm able to compile the app ( smile ) with SDL 1.2, and all required libs (ogg/vorbis support, libpng, libjpeg, e.t.c.). I am also able to use Physfs to read the data dir on the SD card, as well as store player data there. Touchscreen and sound works as you can see.

I am not sure if it is my terrible knowledge of OpenGL ES, or my hacking around video.c, that is presenting the monstrosity you see in the video. I am leaning towards the former. What's curious is that I am able to draw some items--the first and last row of the graphic level "preview" in the level selection screen. Also, you can't really see it in the video (save around 0:20s), but I can display the GUI text, albeit gray, instead of the yellow to red gradient.

This post is intended to serve as:

a) A call for experienced developers to help out with this port; or
b) A plea to Lazrhog/rlk to release the seemingly inactive source of the previous 1.4 fork that runs on iOS

You must understand, we have no games on Android. We don't even have the luxury of Super Monkey Ball!

I've sunk two weeks into this already and am getting fatigued. For what it's worth, I am an experienced Android dev, but this is a bit different. There aren't many good resources for Android development in C, unfortunately, so there's nowhere for me to go and learn.

2

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

The Dreamcast port is based off 1.4 as well, and I believe it had to make major changes to run on that platform. The most drastic being no transparent ball (ball made of white dots instead).

1.4 does not use Physfs, but does use more SDL projects. I assume you are using 1.5+ code as the use of Physfs was fairly recent in Neverball development terms. Switching to static background gradients will certainly save some rendering memory. Also, all the textures are probably too large for a mobile phone to render, you may want to cut them down to 256x256, or even 128x128, just for testing purposes.

I read recently that someone had to change a texture to 257x257, or it would not show up under a certain OpenGL-ES app.

Anyway, I award you 3 internets for your epic contribution so far!

Currently Playing:
Celeste and Electronic Super Joy

3

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

In SVN the PhysicsFS dependency is optional, you can alternatively compile with "make ENABLE_FS=stdio" (no archive support though).

4 (edited by gjtorikian 2011-01-19 02:32:48)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

I am not sure why both replies spoke almost exclusively about PhysicsFS. As far as I can tell I am using it successfully to read data on the SD card--otherwise the app would crash immediately.

themacmeister, do you remember if it was this forum or another where you read that the textures had to be resized? And I take your internets gracefully tongue

I am compiling off 1.5.4, as I was unable to find 1.4. I admit I didn't look very hard in the SVN, though. Edit: also, I could never find the source for the Dreamcast port hmm

5

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

It was the Dreamcast port that needed smaller textures, mainly due to early console graphics hardware.

The guy responsible for Neverball on Dreamcast is still working on ports, and still contactable on the dcuk forums (I do not have the link handy, sorry). I'm sure if you explain your situation and ask nicely, he would be obliging.

Currently Playing:
Celeste and Electronic Super Joy

6

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

themacmeister wrote:

The guy responsible for Neverball on Dreamcast is still working on ports, and still contactable on the dcuk forums (I do not have the link handy, sorry). I'm sure if you explain your situation and ask nicely, he would be obliging.

Yup, chui. I attempted to contact him via PM, as well as posting in his Neverball port thread.

In a fit of light night insanity, I also contacted the devs over at MeeGo, as they have Neverball 1.4 on their system. However, they're running the plain OpenGL version--I thought their hardware only supported OpenGL ES.

7

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Scratch the above--I did get the source from chui. He did some very interesting stuff. Someone--probably him--ported SDL and OpenGL to the Dreamcast, which he then latched Neverball onto. I've been hacking around for the last two days and I don't think I can salvage much from his port. I don't think the low-level OpenGL functionality is available on Android the way it was on Dreamcast. Even though it looks like he's reimplementing some of the functionality (i.e. with display lists) it still doesn't seem to be of much help.

Still, it's nice to know he tried, and shared his source.

8 (edited by themacmeister 2011-01-23 08:50:03)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Version 1.4 was simpler in many respects, but it's reliance on SDL and SDL Projects was quite high.

You may want to look here:

http://www.anddev.org/sdl_port_for_andr … t9218.html

and here:

https://github.com/greenrobot/sdl-android

"You can combine SDL and OpenGL ES, see GLXGears example in sources." sounds too good to be true...

Currently Playing:
Celeste and Electronic Super Joy

9

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

I appreciate the help, but I have already found and integrated them into my port. What I am having trouble with is not the SDL aspect, but changing the OpenGL ode to OpenGL ES.

10 (edited by Lazrhog 2011-02-02 17:33:23)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

My hands are tied.  There are very good reasons for not releasing the source code as yet (which are to prevent the spread of poor quality mobile ports of Neverball to everywhere)

On the other hand, I applaud your efforts.  Looking back, whilst it only took me a couple of weeks to port Neverball, I do think my translation to OpenGLES was pretty cool, so it might not be so easy for everyone...   I did only do it because I could, not because I should.

11 (edited by themacmeister 2011-02-02 23:20:57)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

You can look at these too:

http://sourceforge.net/projects/dogless/

http://www.unrealvoodoo.org/hiteck/projects/maemo/

(contains SDL and GLUT extended for OpenGL ES)

http://unrealvoodoo.org/git/glesport.git/

smile

Currently Playing:
Celeste and Electronic Super Joy

12 (edited by gjtorikian 2011-02-03 00:21:51)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Yep, I had come across DOGLESS earlier, too.

My current approach is thus:

* I've identified where the current (1.5.4) OpenGL code needs to be converted to OpenGL ES.
* Following chui's lead, I'm creating a wrapper around the OpenGL code to my own OpenGL ES functionality. In other words, if the code says glCallList(), I define my own glCallList() somewhere else. For this I am also relying on the innards of DOGLESS.

I'm confident I can charge through this way. I have already improved the drawings, slightly, on my phone. I haven't bothered to shoot a new video, though. I'm getting distracted with low-hanging fruit, though. For example, yesterday I devised a way to use the translation files in .po (the Android OS only accepts the "C" locale, you have to do some "forced" overriding to get another locale).

themacmeister, do you have an Android phone? Interested in being a tester? big_smile

Edit: Just read Lazrhog's note above. Then, should it ever come to the point where it's ready to release, should I get my code audited here before making it public under GPL?

13 (edited by themacmeister 2011-02-03 03:48:42)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

I only have live Android boot USB (multiboot). I am unaware how the live Android works with my GeForce 9800GT, and whether or not the x86 port uses GL ES?!

I would be glad to test under this platform, but it will not give an accurate picture of compatibility/performance I fear sad

EDIT: Live x86 Android of mine is only 1.6 too

Currently Playing:
Celeste and Electronic Super Joy

14

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

I would like to be a tester (once this has matured a bit, and iff I don't have to mess around for too long)!! big_smile
(Got me a HTC Desire Z / G2.)

15

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Edit: Just read Lazrhog's note above. Then, should it ever come to the point where it's ready to release, should I get my code audited here before making it public under GPL?

I would certainly run it past Lazrhog and possibly RLK before release (privately). You will get frank, and accurate feedback, without making the source public just yet.

Currently Playing:
Celeste and Electronic Super Joy

16

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

nue wrote:

I would like to be a tester (once this has matured a bit, and iff I don't have to mess around for too long)!! big_smile
(Got me a HTC Desire Z / G2.)

Thanks very much for the offer. I've developed two Android apps before so I feel like at this point I know most of the tips and tricks between supporting different screen sizes and all that nonsense. I usually grab a few friends IRL to help out too smile

17

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

I would not release a port of Neverball unless it was running nicely at 60fps.  My initial tech demo to see if it was possible, should not really have been released (as it was much less than 60fps).  However, those were early days in mobile development.  We now know it is possible.   Neverball runs very nicely at 60fps on my iPhone 4, and I would think it would do so on the latest Android devices too.

All I would say, before you do too much work, is to ask RLK what his plans for the Android platform are....

18 (edited by gjtorikian 2011-02-04 18:54:28)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Lazrhog wrote:

All I would say, before you do too much work, is to ask RLK what his plans for the Android platform are....

I've sent him a "forum e-mail" directing him to this thread, then, to see what his thoughts are. Thanks for the info.

Edit: I won't post the whole message but suffice to say rlk is not working on a port, has given me his blessing, and has suggested that I keep the community involved with my plans and efforts.

Which is exactly what I'm doing. ^^

19 (edited by tonesfrommars 2011-02-04 19:12:49)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Hey gjtorikian, that's great. I'm glad that you and lazrhog can be in communication on this as well. Two heads are better than one, right? I would love to help in any way that I can, maybe some mapping work will be needed if you have to selectively pare down textures or some such thing. I only have an itouch, so I couldn't be of too much help as a tester.

I'll be following your progress, good luck.

20

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Thats great news gjt, it is much better having more than one port on any given platform (I wish this were the case on Dreamcast!). Now we have Nuncabola, there is an alternative for Neverball on just about every PC platform that supports JAVA. Android is the Holy Grail at the moment, and very popular as well.

Currently Playing:
Celeste and Electronic Super Joy

21

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

tonesfrommars wrote:

Hey gjtorikian, that's great. I'm glad that you and lazrhog can be in communication on this as well. Two heads are better than one, right? I would love to help in any way that I can, maybe some mapping work will be needed if you have to selectively pare down textures or some such thing. I only have an itouch, so I couldn't be of too much help as a tester.

I'll be following your progress, good luck.

Not sure if you're comfortable doing so, but you can technically install Android alongside iOS: http://www.idroidproject.org/wiki/Main_Page

22

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

@gjtorikian -- there is no 3D acceleration under iDroid - so pretty useless for Neverball wink

Currently Playing:
Celeste and Electronic Super Joy

23 (edited by gjtorikian 2011-02-05 02:09:52)

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

themacmeister wrote:

@gjtorikian -- there is no 3D acceleration under iDroid - so pretty useless for Neverball wink

Oh boo, I didn't see that. Well, at the least you can change the volume and read the help? *shrug* smile

24

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

Ha! Too funny.
I'll definitely install it so I can beta test the options menu tongue

25

Re: MOD, PLEASE CLOSE THIS TOPIC: I am porting Neverball to Android.

I am beginning to lose hope in this endeavor.

I just can't seem to draw anything properly to the screen. Touch input and sound works so I can actually manage to get to a level but obviously there is no way of telling what the ball is doing. Maybe I should consider submitting a patch called "BLACKOUT MODE" that can appear as a grouping under Nevermania levels.

I wonder also if it is also my phone. Not all Android devices support the same OpenGL ES bindings, the hardware is different across them, e.t.c. It might be easier if I can set up an OpenGL ES emulator on my Ubuntu box but even then I don't know how accurate that will be.