51

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

Could you document your progress so far?  Once I finish school, I would like to help out a bit here as well.  This probably won't be for another 6 months or so.  But I would like at least a launching pad to get going on this once I decide to start.

52

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

I am not sure what it is you would like to me to document, but I would be more than happy to help you when it is all ready.

At the moment, I have comments for any code I have added. I also have a readme.markdown file, and a GitHub repo. The only thing I can't do, again, is draw to the screen, because I don't have a strong OpenGL ES background. I am waiting for rlk's branch to be stable, at which point I'll incorporate my changes and make the work public.

53

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

*** UPDATE ***

I've been keeping track of rlk's changes in the gles branch, and I've gotten a fully rendered, running version of the app on my Android phone: http://www.youtube.com/watch?v=ehkFIUC1Ucs

Problems include:

* Screen sensitivity (My finger seems to press the wrong GUI buttons)
* Accelerometer does not appear to work
* There is a lot of skipping (the timer jumps from 27 to 24 at one point!)

This is a blend of my previous attempt mixed with rlk's current code. I imagine as time goes on my hacks will shrink as the "official" version takes prominence.

One huge problem is that if someone attempts to call while the game is running, the game crashes AND you can't actually answer the call. A big loss!

54

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

Cool!  Looks like we'll need some performance improvements.  I'm working on related issues now.

Ever since themacmeister mentioned running the game at 320x240, I've been doing some testing at that resolution.  This has made me realize that much of the text and many of the GUI elements are too small.  Making them bigger will require simplifying a couple of the GUIs, most notably the level selection screen.  Just something to think about s we bring more mobile platforms into the fold.

55 (edited by gjtorikian 2011-04-02 19:50:26)

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

FWIW the minimum Android device width x height is 480 x 320. Edit: Well, the minimum I intend to support. It goes down to 320 x 240 (QVGA) as well but I haven't done any testing here.

For selecting the level, I was thinking of implementing a sort of carousel. So, you'd start off at the "easy" set, then maybe there would be a left arrow button to press or a finger swipe that would take you forward to the next set--"medium," "hard," "mym," "tour de force," etc.

Edit 2: What a dunce! I just realized why I was having a hard time hitting the GUI buttons...the accelerometer is turned on, and acting like the arrow key. So if I am tilting the phone slightly, the highlight is hovering over an element that I am not pressing---my touch input is just accepted as an enter, no matter where I push. I'll need to disable the accelerometer and focus on getting the push to emulate the mouse.

56

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

There aren't too many 320x240 devices out there nowadays. The Wiz supports higher res for TV out (not quite full PAL res, but close). I'm sure that when the code is a bit more optimised, and the resources are shrunk down to account for the Wiz, it will run a lot smoother. That 480 x 320 is v. close to the TV out res for the Wiz, so might treat that as the probably minimum for the Android project for sure. I believe there is an order-of-magnitude improvement in computation efficiency/speed by only allowing precision enough for the available display. This could be automated (or hardcoded) for certain hardware.

PS. The Wiz is overclockable to 800MHz, so I believe the bottleneck will be memory.

Currently Playing:
Celeste and Electronic Super Joy

57

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

Wow that is running slow.  Looks to me like that phone is not accelerating VBOs, and is downloading all vertex information each frame.  It doesn't matter what optimisations RLK puts in, it is never gonna run fast enough. Sorry

58

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

Lazrhog wrote:

Wow that is running slow.  Looks to me like that phone is not accelerating VBOs, and is downloading all vertex information each frame.  It doesn't matter what optimisations RLK puts in, it is never gonna run fast enough. Sorry

That's a rather pessimistic attitude.  Not once have I ever looked at an OpenGL program and said "Well that's too slow so I guess I'll give up."  It at least deserves time spent analyzing the limitations of the device and determining the location of the bottleneck.

To me it looks more like texture thrashing.  Just enable the down-sampler by putting something like "texture 4" or "texture 8" in the neverballrc.

59

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

In addition to being rude it's also an ignorant statement.

The code I am running is a blend of rlk's current progress, and the work I had done previously. Most notably, geom.c, part.c, and game.c are still using "display lists"--that is, I've overriden callList code with my best attempt at VBOs.

So it's not even a final product yet, it's still in progress, and it's a helluva lot farther than it was in the first video I posted. I can't quite comprehend how it's "never" going to work.

60 (edited by Lazrhog 2011-04-04 20:18:28)

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

rlk wrote:
Lazrhog wrote:

Wow that is running slow.  Looks to me like that phone is not accelerating VBOs, and is downloading all vertex information each frame.  It doesn't matter what optimisations RLK puts in, it is never gonna run fast enough. Sorry

That's a rather pessimistic attitude.  Not once have I ever looked at an OpenGL program and said "Well that's too slow so I guess I'll give up."  It at least deserves time spent analyzing the limitations of the device and determining the location of the bottleneck.

To me it looks more like texture thrashing.  Just enable the down-sampler by putting something like "texture 4" or "texture 8" in the neverballrc.


OK, sorry, didn't mean to come across pessimistic.  But trying to get something from around 2fps up to 60fps is a pretty tough call.  Fine tuning for mobile devices is a pretty specialist thing, but when something isn't accelerated then it can be very hard.  Take the difference between the 3G iPhone and the 3GS, one accelerates VBOs the other doesn't and the hit on the frame rate is about 30fps at full tilt.

gjtorikian wrote:

In addition to being rude it's also an ignorant statement.

The code I am running is a blend of rlk's current progress, and the work I had done previously. Most notably, geom.c, part.c, and game.c are still using "display lists"--that is, I've overriden callList code with my best attempt at VBOs.

So it's not even a final product yet, it's still in progress, and it's a helluva lot farther than it was in the first video I posted. I can't quite comprehend how it's "never" going to work.

Fair enough, I didn't realise it was half and half.  I am not rude or ignorant by the way.  However, you may have to face the fact that some of the android phones aren't going to be up to the job, and your test phone may be one of them.

61 (edited by gjtorikian 2011-04-04 22:08:01)

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

Lazrhog wrote:

However, you may have to face the fact that some of the android phones aren't going to be up to the job, and your test phone may be one of them.

This is quite true. Mine is one of the lower end models, nearly two years old, and was never properly supported by Motorola in the first place.

Right now I'm running an OS the phone was never supposed to have, and it's potentially overclockable from ~520 MHz to ~800 MHz. The phone never even had full OpenGL ES bindings, and some clever hackers had to correct the kernel to make this happen. It's insane.

But one of the great things about Neverball is the support it has for older video cards and hardware configurations. Given that the game has run on the Dreamcast--with a CPU of 200 MHz and a GPU of 100 MHz--I hope to at least get it playable on some of the "low end" phones.

62

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

@GJT, the Wiz is ~520 to ~800MHz, so might have the same Arm chip. There is only one REAL OpenGL port to it, and that is GL-Quake. Judging from the smooth playback, I would say that Neverball will be "quite playable" on the device, with static backgrounds. I might give this source a trial build. Is this just a branch of the SVN, and if so, do you have the svn co command to just get the branch?

many thanks, and great work everyone!

Currently Playing:
Celeste and Electronic Super Joy

63

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

There is only one REAL OpenGL port to it, and that is GL-Quake.

Not true, i also ported Ken's Labyrinth OGL to GLES :-P

Im planning to give the gles branch a test on the pandora soon.

64

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

I just tried this game out on a friend's newer Android device--it runs flawlessly, but I think the accelerometer play is a bit difficult.

65

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

That sounds awesome! Do you have a simple .apk already?

Will the accelerometer be the only input method in the final android version?

66

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

nue wrote:

That sounds awesome! Do you have a simple .apk already?

Will the accelerometer be the only input method in the final android version?

This is a good question and one I'm not sure about.

At present, my Android phone has a slide out keyboard, and I can play with both accelerometer and the D-Pad on my phone.

It is also possible to add a sort of virtual d-pad on the phone screen. This is how yongzh does it with his various emulators.

I don't know how to swap between the various inputs (hard keyboard, accelerometer, virtual d-pad) based on a users' preference. And while I'd really like to go with the d-pad, it might be even harder to play than with the accelerometer !

67 (edited by gjtorikian 2011-04-24 02:45:09)

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

Is anyone able to act as a beta tester? The game is nearly releasable.

Per the question above, there are actually two ways to control the gameplay. The first is with the accelerometer, but the second--which I'm liking more--is by using your finger to control the map. It's a bit difficult to explain but imagine your finger touches acting as the mouse, and the accelerometer acting as the keyboard / joystick. Both these methods of gamplay cannot be enabled at the same time so I'll have to add a toggle for it.

As for the rest of my todo list, in order of priority, there's:

  • fixing gui button sizes (it looks terrible on 480 x 320)

  • volume buttons (you can't control sound with the device's volume rocker)

  • Neverputt (never tried to compile it)

  • large screen support (for "true" tablets--i.e. Motorola Xoom, not Galaxy Tab--the video does not draw to the 1280 screen)

Except for Chinese, localization support is complete, which makes me very happy.

68

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

Great work gjtorikian! I am very happy to see this coming along so well.

I think your take on the input problem sounds very good, it might just be the solution.

I would be happy to beta-test, provided the installation process is simple enough (haven't gotten into rooting/modding/compiling on android yet). I have a desire vision / z.

69

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

You don't need to root or mod, it's a simple file to install.

I will clean some stuff up this week and add you to a list of testers.

As tmm noted, this does not meant the code is ready to be public, but it's quite close. If I have time I'll make a development video to prove I'm not just talking nonsense smile

70 (edited by gjtorikian 2011-05-04 14:29:26)

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

Well, here it is, the third development video for Android: http://www.youtube.com/watch?v=NmtxeD3SylI

This is going to be the final video, most likely, because these are too damn hard to make. You can see what a terrible player I am with one hand. I didn't get to show off some fun things, like localization, or playing the unlocked cheat levels   wink

Suffice to say this game is about 1:1 with the desktop version. You can take screenshots (using the Camera or Search button on your phone), switch the camera angle (using the Menu button),  increase/decrease volume with the phone's volume rocker... There are still some very noticeable performance issues, and these are present in the gles branch on the SVN as well.

I also ended up getting a new device. Per lazrhog's comment above, the issue was that my old phone did not have full OpenGL ES 1.1 bindings. I knew this and thought I could swing by without it. I couldn't. I've tried the app out on a variety of Android devices, and performance is equivalent. I also wanted to show off the HDMI out capabilities on the new phone, so this video shows my t.v. in the background.

nue, could you send me a PM with your email? I will email you the APK for some beta testing. I'll also be posting request in various other forums I know.

71

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

I sent you an email (I think). The video looks great, this is going to be a lot of fun big_smile !!

72

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

Based on conversations with beta testers (nue included), and my own experiences, there are a couple of really glaring issues with this port before it can be released:

  1. The title screen looks "warped"

  2. Some levels are unplayable, due to drop to single digits in framerate

I think the first issue is an easy problem to fix--it wasn't always warped like that.
The second one is a bit tougher. I think the drop in frames has to do with the maps--but I haven't an idea of whether I should optimize the map or refactor the code.

I'm waiting to hear from the experts on the matter, people who've dug into the code years longer than I have.

Post's attachments

2fps.png 226.1 kb, 54 downloads since 2011-05-11 

40fps.png 232.28 kb, 39 downloads since 2011-05-11 

title_blur.png 374.73 kb, 53 downloads since 2011-05-11 

73

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

That chrome texture is not being applied correctly?!

Currently Playing:
Celeste and Electronic Super Joy

74

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

Love the psychadelic title screen! Let's have a version of the game where everything goes left field like that.

And yes, 2fps.png reveals a problem with the chrome texture. (but you knew that already)

75

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

Wow, I didn't notice the chrome texture until now. I wonder if it's just a result of the screenshot / slow framerate.