State of the iPhone port?

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

State of the iPhone port?

Post by andi75 »

What's the state of the iPhone port?

I'm getting one next week (I hope) and if there's time I'll start working on a GLtron port to it. Now I'm trying to leech some knowledge out of you guys :-)

The main questions are:

- Stick to SDL/SDL_music (or SDL_sound in my case) or use the native libraries?
- Port the whole game to OpenGL ES or use two render backends, an OpenGL one on the PCs and OpenGL ES one on the phone?
User avatar
Z-Man
God & Project Admin
Posts: 11589
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: State of the iPhone port?

Post by Z-Man »

andi75 wrote:What's the state of the iPhone port?
Dunno. Some guy called Voodoo was working on it, basically behind closed doors. If you look around, you'll find screenshots posted here and links to a forum you have to be registered on to read. So my answers to the other questions are based on my completely uninformed own opinion :)
andi75 wrote:Stick to SDL/SDL_music (or SDL_sound in my case) or use the native libraries?
Definitely stick with SDL where available if it does the job (and it should). Obviously, you'll want special code in there for touchscreen/motion sensing, I don't know whether SDL has been adapted to pass those events around.
andi75 wrote:Port the whole game to OpenGL ES or use two render backends, an OpenGL one on the PCs and OpenGL ES one on the phone?
Depends on where you intend to be going. If the iPhone is your only target aside from the various PC stuff and don't care too much about squeezing out the last bit of performance there, I'd basically port the game to ES and use that code on the PC, too, with added glBegin/End calls. OpenGL ES also paves your way to the Playstation family, as far as I know, so using it sounds like the 'most platforms reached with the least code fuss' approach. If you want full platform flexibility, yeah, write different backends.
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: State of the iPhone port?

Post by sinewav »

Related:

Andi, we just had a post here that leads to some guy who has obviously used a lot of glTron in his PSP hack "Light Cycle 3D." Thought you might find it interesting if you didn't know already.
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Re: State of the iPhone port?

Post by voodoo »

Yes I've work on it some months ago. I don't have time right now cause I'm too busy at work. I might have time again in a couple of months or if some1 wanna try, I'm fully available to talk about that.
Quick status :
that was a 0.2.8 port. Some can argue that 0.3 should be better but it needs more libs that are currently not available for iphone (or was not available at the time I worked on it) including ftgl (+ dependencies : freetype/cppunit) ... Additionally, porting 0.3 was more issues to be fixed and that was better IMHO to start with the simpliest option as a "proof of concept" (check if iphone can run it).
So far I have a rough port with :
- basic UI, simulating a few buttons on top of the screen + 3 main buttons : left/center/right to turn and brake. There's still to render it on top of the screen ...
- rough gles rendering using mainly vertex array and a vbo try for cycles. vbo are probably the good solution to reach "playable" fps. there's still issues with texturing but the rendering code should probably be fully rewrite/replace ...
The main issue remains performance :
with 4 cycles on local game, I have 15 to 25 fps
2 cycles on network games, it falls 5 to 10 fps

VBO might be a solution to improve rendering performance as most of armagetron geometry is static but I'm not sure weither iphone is really able to run armagetron properly especially when it comes to network game.
Might be interesting to check with your gles code zman.

btw, sorry to work "undercover", I did not meant to. I was trying that port to teach myself both iphone SDK and arma source code...
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Re: State of the iPhone port?

Post by Tank Program »

Maybe it might be worth letting others fiddle with the code while you don't have time to work on it? I forget the exact rules on iPhone apps and open source, but I would hope it wouldn't be mutually exclusive.
Image
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

Re: State of the iPhone port?

Post by andi75 »

It's strange that the performance falls over when you're networking. Isn't the rendering totally decoupled from the networking? Or is the iPhone doing something stupid like taking a quick pee on select()?

Judging from your FBO reference I believe you think you're geometry limited. What kind of polygon counts are you pushing? What's your average badge size?

Have you looked at fill rate? How much blending is there going on? Are you using RGBA textures or PRVTC?
Word
Reverse Adjust Outside Corner Grinder
Posts: 4260
Joined: Wed Jan 07, 2009 6:13 pm

Re: State of the iPhone port?

Post by Word »

heh i just found BMTron. I suck at it D:
User avatar
sinewav
Graphic Artist
Posts: 6413
Joined: Wed Jan 23, 2008 3:37 am
Contact:

Re: State of the iPhone port?

Post by sinewav »

Word wrote:heh i just found BMTron. I suck at it D:
Word, that post has nothing to do with this thread. Please stop spamming.
Word
Reverse Adjust Outside Corner Grinder
Posts: 4260
Joined: Wed Jan 07, 2009 6:13 pm

Re: State of the iPhone port?

Post by Word »

ooops wrong topic
i'm sorry
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Re: State of the iPhone port?

Post by voodoo »

@Andy: I don't know why networking is making fps down. I did not looked about it and don't even know networking enough to deal with that ...
About geometry limited, I actually don't know neither. I've start profiling the app and considering that I've change only very few things in the code appart from rendering, that's the part I was trying to improve (ie improving my own mess). I have not figured out weither it is GPU limited or CPU limited. On a laptop or desktop, I would have assume it is cpu limited. On a device such as iphone, I don't know so I've assumed the same.

Additionaly, I've started things using vertex arrays and IIRC :
- disabling alpha blending and/or texturing do have an impact on performance but not such a big improvement (max 20 to 30% fps more). I was using RGBA for texturing which is not the best choice for iphone as far as I understand apple documentation.
- memory usage was quite high, so I thought that avoiding duplicating data in both main memory and gpu memory is probably a good idea as well as avoiding copying all vertex data for each frame when basically most of the geometry is static. That's why I was trying to use vbo (again to clean up my own mess).

I've reinstall my comp system and was waiting for iphone OS 3 before reinstalling the whole thing (SDK and so on). I might be able to do it next week and provide you more inputs but I not 100% sure about that. That will depends on my work schedule.

@all:
I was feeling that first thing should be to switch armagetron rendering process from immediate mode to vbo (or vertex array if vbo's are not available as gl extension) before even trying to work on iphone port again and I was about to try that. That might be done keeping current immediate mode abstraction, buffering every gl calls between each glbegin and glend (like in this project http://memo.tv/ofxmsashape3d) but it's probably not such a good way with vbo as you probably want to control the way vertices data is updated instead of fully rebuild the whole scene. That might be a project to work on openly instead of undercover as it follows opengl changes and is opengl 3 and (almost) opengles compliant ... But that's plenty of work and might broke portability on old hardware.
User avatar
pie goes moo
Round Winner
Posts: 306
Joined: Wed Aug 12, 2009 10:42 pm
Location: San Antonio, Texas, USA

Re: State of the iPhone port?

Post by pie goes moo »

I think a nice feature would be to be able to access the forums and wiki (screen sized for the iPhone) directly from said app
Image
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: State of the iPhone port?

Post by epsy »

The iPhone already provides an application for this: Safari mobile.
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

Re: State of the iPhone port?

Post by andi75 »

Browsing phpBB and other forums on the iPhone is somewhat painful. I doubt it's in the scope of this project though to fix that...
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Re: State of the iPhone port?

Post by epsy »

Well, do like me and don't buy it.
Post Reply