iPhone game development coming

Moderator
Posts: 623
Joined: 2007.09
Post: #46
reubert Wrote:My turn to quote myself... it would appear that there is no 2.0 beta released to any indie developers yet. Which I'm thinking means that no one (except EA etc.) can actually test OpenGL ES content in any way. Which actually makes me happy because I don't feel so disadvantaged.

I'll hold my breath a little longer Wink

Ha! I live in the US.
Sad
I say; "The guy made Chopper! Give him some respect!". Oh well, maybe it'll become available wherever you live soon. I want to see Chopper on the iPhone.Wink

- Lincoln Green
http://www.binkworks.com/
Quote this message in a reply
Member
Posts: 320
Joined: 2003.06
Post: #47
PowerMacX Wrote:This sucks. Let's hope that the "coming months" mentioned in the small print is actually "before July, just like US developers". And that "other countries" includes mine, which I seriously doubt considering that the "Apple Design Awards" list of allowed countries of residence does not. Sad

And the reality is, Apple has made no promises of this, or that developers based in any particular country will ever be able to sell an app via the store.

So you and me and any developer not based in the US would be taking a huge gamble doing any iPhone work we actually wanted to see on an iPhone.

It's even more of a gamble because Apple completely control the sole distribution system and can turn down any app they like for any reason. So there is no guarantee your app will ever be available from the store.

We'll have to wait and see, but I for one will not be using the SDK until I have more assurance I am not wasting my time.

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #48
I made a little windowed OpenGL ES "sim" as per FrogBlast's suggestion, but instead of compiling against the Khronos header I simply compiled against the actual iPhone header. There isn't anything wrong with that legally, as long as I don't distribute or talk about anything I do with it, is there?

So far, I think this might actually serve the purpose for now -- getting a feel for what could be done with OpenGL ES. I just made a little 320 x 480 (or 480 x 320) NSOpenGLView and chose the software renderer to throttle things back a bunch, and held the fps at 30 for further restriction, although I have no idea what the iPhone's native screen refresh is (nor would I say).

I suppose that compiling against the Khronos header would be a little safer if I wanted to ask specific questions about OpenGL ES. And I would even surmise that as long as we didn't mention anything about iPhone, either in the program or in conversation, there really wouldn't be anything wrong with talking about writing games in a little window using the OpenGL ES header under the software renderer, would there?
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #49
AnotherJake Wrote:I think this might actually serve the purpose for now -- getting a feel for what could be done with OpenGL ES.

There are a few differences between ES and GL that you'll need to work around. For example, the ES header defines glOrthof, while you only have glOrtho to link against with desktop GL. But in general, yes, that's a good way to "get ready" for ES development.

To point out some resources: ES Specifications, including the difference spec, which is very handy if you're already familiar with desktop GL.

There are also ES discussion forums, although the traffic is a bit light.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #50
Thanks for the info! Smile

So far I'm getting mixed results. On one hand, the compiler is correctly figuring out that the constants I want it to use are in the ES header, but on the other hand, it's still picking up the function names for desktop GL for some reason. So for instance, it will tell me that GL_COMPILE is not available, which is found as a parameter to glNewList, which is great because it tips me off that I don't get to use display lists, but it still thinks that glNewList itself is available. Or more importantly it'll say that GL_QUADS isn't defined, which is correct, but it won't complain about glBegin/glEnd(). I haven't been able to figure out why that's happening, or how to fix it (yet). Originally I had problems getting it to compile against the ES header at all, but then I remembered that Cocoa.h was being included from the precompiled header, which winds up including the desktop gl.h. Taking that out of the pch got me compiling against the correct constants, but I just wish I could figure out how to get it to be dumb about the functions. I must be totally forgetting or missing something simple...

Otherwise, it's been kind of interesting. No quads, so I've had to convert a lot of that code to using arrays instead, which certainly isn't hard, but kind of weird to send a vertex array for only four vertices. No GL_INTENSITY textures so I've been converting those to GL_LUMINANCE_ALPHA textures. Just little things like that. I've always kind of wanted an excuse to play with the software renderer, so it's been fun this afternoon.
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #51
Yes, that's exactly the sort of problem I meant. Using the ES header will limit you to using the API defined in the header-- but you're still linking against the desktop framework, which has the full GL symbols. So you'll end up using the intersection of the two, probably with a few macros to redefine i.e. glOrthof etc. You also won't be able to use any ES-only extensions which aren't linkable on the desktop.

But the point is to do exactly what you're going through-- stop using glBegin, QUADS, and anything else which isn't supported in ES. The philosophy behind the ES design was to remove all the redundant, "slow path" API, along with anything deemed to be rarely used by applications or that imposes a large burden on driver writers. So in the process of converting your application to ES, you'll probably improve your GL usage as well.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #52
Cool, then that's what's up. It's a bit of a crude approximation, but reading some of the specs, and also studying example code in the iPhone SDK, along with compiling against the ES header is definitely instructive. It looks like there's plenty to do for now until iPhone OS 2.0, or a simulator/emulator comes out. Heck, there's still the rest of the iPhone SDK to check out too!
Quote this message in a reply
Member
Posts: 320
Joined: 2003.06
Post: #53
Sounds good, keep us posted on anything you discover, no harm in getting a head start eh?

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Member
Posts: 87
Joined: 2006.08
Post: #54
AnotherJake Wrote:On one hand, the compiler is correctly figuring out that the constants I want it to use are in the ES header, but on the other hand, it's still picking up the function names for desktop GL for some reason.

By default, C is dumb and doesn't require function prototypes. Any function you invoke without a prototype is assumed to have any type of argument list, and return an int. There are some cases where this can really burn you in strange ways. I know there are some gcc options which tighten up that behavior (which I highly suggest you always use in every project).

I don't recall the exact option, but try adding "-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations". Xcode has built-in Build Settings for some of these.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #55
Frogblast Wrote:I don't recall the exact option, but try adding "-Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations". Xcode has built-in Build Settings for some of these.

Arghh... I had some of those warnings already set earlier (plus some others) for the Release config and then I switched over to Debug for some reason, so they obviously had no effect (because I hadn't also set them for the Debug config). I *knew* I was missing something!

After your post, I got to thinking that I should at least have had *some* warnings pop up, so I dug back into it again and found the problem with the wrong configuration being set. Xcode bites me with that all the time! I shoulda' known better... Annoyed

Anyway, so yeah, now the fidelity with the ES header is pretty tight. Thanks again! Smile
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #56
I know we're all still NDA and stuff, but I just wanted to publicly say thanks to you guys at Apple for adding OpenGL ES support to the new iPhone simulator! Still downloading beta 4, so I haven't been able to try it, but I'm sure it rocks... And even if it doesn't, it is still definitely much appreciated out here. Grin
Quote this message in a reply
Member
Posts: 320
Joined: 2003.06
Post: #57
+1 thanks. Looking forward to giving it a spin.

Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote this message in a reply
Moderator
Posts: 771
Joined: 2003.04
Post: #58
AnotherJake Wrote:I know we're all still NDA and stuff, but I just wanted to publicly say thanks to you guys at Apple for adding OpenGL ES support to the new iPhone simulator! Still downloading beta 4, so I haven't been able to try it, but I'm sure it rocks... And even if it doesn't, it is still definitely much appreciated out here. Grin

Don't worry, this is on one of Apple's a public pages and is therefore public info:
Quote:The fourth beta version of the iPhone SDK includes Xcode IDE, iPhone simulator with Open GL ES support, Interface Builder, Instruments, frameworks and samples, compilers, and Shark analysis tool.

Also... YAY!!!! Grin (particularly because the simulator is all Apple allows me to use since I'm not in the US...)
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #59
Good news for sure. Uploading a binary onto my touch seems to take forever.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #60
/takes vacation
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  framework for 2d game development? MikeAlive 2 940 Jul 17, 2014 05:39 AM
Last Post: IceD34ler
  3D game development socialrender 4 6,347 Jan 2, 2013 12:50 AM
Last Post: NikG
  Win a copy of: Beginning iPhone 4 Development: Exploring the iOS SDK @iOS_blog 0 3,304 Oct 1, 2011 04:23 AM
Last Post: @iOS_blog
  [Game Engine]Orx coming to iPhone iarwain 6 11,389 May 17, 2011 02:31 PM
Last Post: iarwain
  iphone 4 game development andynov123 2 7,324 Jan 18, 2011 01:27 AM
Last Post: JohnEdward