iPad Development Thread

For code related discussions and questions
TechWiz
Trained
Trained
Posts: 33
Joined: 01 Nov 2009, 02:37

iPad Development Thread

Post by TechWiz » 09 May 2010, 05:37

Just thought I'd put together this here thread so that anyone interested can pitch in and help out some.

So far we have:
Specs
Apple iPad
1024 × 768 px (aspect ratio 4:3) @ 132 ppi
1GHz Apple A4 Processor (ARM7)
PowerVR SGX 535 GPU
256 MB RAM (250MB available for all apps)

Software:
OpenGL ES 1.1 (as of 3.2, maybe 2.0 for OS4?)
SDL for OS2 available (maybe an easy port to OS3?) http://svn.libsdl.org/branches/gsoc2009_IME/SDL/
Cocoa and all the other Apple goodies
iPhone and iPad frameworks differ in name but have similar functions (verified by XCode)

Sources:
http://developer.apple.com/ipad/sdk/index.html
http://www.apple.com/ipad/specs/
http://www.ifixit.com/Teardown/iPad-Teardown/2183/1
http://www.ifixit.com/Teardown/Apple-A4-Teardown/2204/1
http://www.drdobbs.com/mobility/209600498

Anything else that anyone might need just drop a line. So far with my work on the port I have 100K+ errors to correct before XCode will so much as think about compiling the app.... I don't know how to work with OpenGL or SDL however I hear that OpenGL and OpenGL ES only differ in that ES cannot use immediate commands (or something like that). The rest of the stuff seems like it would work as soon as replacement code is put in place to retrofit the old code with new frameworks. A lot of linux C and C++ scattered around, don't know how well that will fly on the iPad so I'm replacing it as I see it just to be on the safe side (replacing "uint16_t" with "unsigned int" and so forth).

User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: iPad Development Thread

Post by Buginator » 09 May 2010, 07:31

TechWiz wrote: A lot of linux C and C++ scattered around, don't know how well that will fly on the iPad so I'm replacing it as I see it just to be on the safe side (replacing "uint16_t" with "unsigned int" and so forth).
Bad move. You should use a typedef to make sure the size is what warzone expects.
If not, you will run into issues, and worse still, all patches / merges will conflict, which is very bad in itself.
I highly suggest you use stdint.h, it should be available...
and it ends here.

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3776
Joined: 03 Aug 2006, 19:39

Re: iPad Development Thread

Post by Per » 09 May 2010, 11:04

OpenGL ES 1.1 uses a subset of OpenGL immediate mode. If you use 2.3 branch, that should work fine.

Warzone is already being successfully compiled with Xcode, so if you are getting errors, you are doing something wrong.

TechWiz
Trained
Trained
Posts: 33
Joined: 01 Nov 2009, 02:37

Re: iPad Development Thread

Post by TechWiz » 09 May 2010, 16:14

Per wrote:OpenGL ES 1.1 uses a subset of OpenGL immediate mode. If you use 2.3 branch, that should work fine.

Warzone is already being successfully compiled with Xcode, so if you are getting errors, you are doing something wrong.
Yes compiled for OS 10.4+ using OS X Frameworks not iPad with iPhoneOS Frameworks. And I also think you are mistaken in that ES can use immediate mode code.

http://stackoverflow.com/questions/1179 ... ily-ported
http://stackoverflow.com/questions/5389 ... s-opengles
Wikipedia wrote:Several versions of the OpenGL ES specification now exist. OpenGL ES 1.0 is drawn up against the OpenGL 1.3 specification, OpenGL ES 1.1 is defined relative to the OpenGL 1.5 specification and OpenGL ES 2.0 is defined relative to the OpenGL 2.0 specification. Version 1.0 and 1.1 both have common and common lite profiles, the difference being that the common lite profile only supports fixed-point instead of floating point data type support, whereas common supports both.

OpenGL ES 1.0 had much functionality stripped from the original OpenGL API and a little bit added. Two of the more significant differences between OpenGL ES and OpenGL are the removal of the glBegin ... glEnd calling semantics for primitive rendering (in favor of vertex arrays) and the introduction of fixed-point data types for vertex coordinates and attributes to better support the computational abilities of embedded processors, which often lack an FPU. Many other areas of functionality have been removed in version 1.0 to produce a lightweight interface: for example, quad and polygon primitive rendering, texgen, line and polygon stipple, polygon mode, antialiased polygon rendering (with alpha border fragments, not multisample), ARB_Image class pixel operation functionality, bitmaps, 3D texture, drawing to the frontbuffer, accumulation buffer, copy pixels, evaluators, selection, feedback, display lists, push and pop state attributes, two-sided lighting, and user defined clip planes.

OpenGL ES 1.1 adds to the OpenGL ES 1.0 functionality by introducing additional features such as mandatory support for multitexture, better multitexture support (with combiners and dot product texture operations), automatic mipmap generation, vertex buffer objects, state queries, user clip planes, and greater control over point rendering.
Buginator wrote: Bad move. You should use a typedef to make sure the size is what warzone expects.
If not, you will run into issues, and worse still, all patches / merges will conflict, which is very bad in itself.
I highly suggest you use stdint.h, it should be available...
Alright, I'll restore the code then. Thanks for the assist on that.

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3776
Joined: 03 Aug 2006, 19:39

Re: iPad Development Thread

Post by Per » 09 May 2010, 22:01

My bad. I forgot what the difference between ES 1 and ES 2 was - which is fixed or programmable pipeline. I would be a good idea for us to be moving toward ES 1 compliance in any case, so feel free to post patches to help out.

User avatar
macuser
Regular
Regular
Posts: 1052
Joined: 19 Mar 2010, 23:35
Location: USA
Contact:

Re: iPad Development Thread

Post by macuser » 09 May 2010, 22:03

So have you actually started porting it yet techwiz? and is it official?

-regards macuser
ArtRev Website

ImageImage

System: AMD Phenom II x4, 4GB RAM, 640GB HD, Nvidia GeForce GT 240 1GB, Mac OS X 10.6

User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: iPad Development Thread

Post by Zarel » 09 May 2010, 22:19

Great! Feel free to consult dak180 and me for help; we're the resident Mac guys. And join the IRC channel; we'd love to talk to you in realtime!

TechWiz
Trained
Trained
Posts: 33
Joined: 01 Nov 2009, 02:37

Re: iPad Development Thread

Post by TechWiz » 10 May 2010, 01:04

Maybe if dak180 wasn't blocking PMs i would contact him...

And yes macuser I got started however it will take me myself ages cuz its like a billion lines and 20k files... I really hope hope to get some help on this lol

User avatar
Blakeanator
Rookie
Rookie
Posts: 21
Joined: 05 Nov 2009, 06:20

Re: iPad Development Thread

Post by Blakeanator » 02 Aug 2010, 07:34

I can possibly help. I have made a few iPhone apps but nothing with open GL ES. If you want, send me the code and I'll take a look at it. Maybe I can be of some help.

Thanks,
Blake

Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3776
Joined: 03 Aug 2006, 19:39

Re: iPad Development Thread

Post by Per » 02 Aug 2010, 10:53

If you intend to distribute by means of the App Store, I suggest you take a look at http://lwn.net/Articles/396535/ before you start, to see if you will get into license troubles with Apple's not very open source friendly attitude in their store.

User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: iPad Development Thread

Post by Zarel » 02 Aug 2010, 20:16

I, for one, will not be suing you as long as either:

1. The app is free, or:
2. I get paid at least as much as anyone else involved in the project is being paid.

I, of course, cannot guarantee the same for any other dev, nor for Pumpkin.

TechWiz
Trained
Trained
Posts: 33
Joined: 01 Nov 2009, 02:37

Re: iPad Development Thread

Post by TechWiz » 02 Aug 2010, 21:34

@Blakeanator:
Source is in the Development area. None posted for iPad yet... (this thing will surely take me ages to port alone lol)

@Per:
Well the project does not have to be released for the iPad as "Open Source" but it can still be distributed about in our inner circle as a "development network" vs pure open source. I'm positive Apple allows that and won't have an issue. If all else fails, go Cydia!

@Zarel:
I was going to post it free anyway because it's not my project. However Apple wants to charge a $99 fee to register for their Developers Connection crap... Although it should limit the amount of crap on the App Store, theres still an ungodly mess of crap on the App Store cuz Apple's pre-release screening process sucks.

As for Pumpkin, weren't they disbanded like 10+ years ago now? I doubt they would have renewed their copyright throughout the 10 years after they disbanded and released the source code.

User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: iPad Development Thread

Post by Zarel » 02 Aug 2010, 22:32

TechWiz wrote:@Per:
Well the project does not have to be released for the iPad as "Open Source" but it can still be distributed about in our inner circle as a "development network" vs pure open source. I'm positive Apple allows that and won't have an issue. If all else fails, go Cydia!
Oh, we will be demanding that you open-source the port.

Anyone who says that Apple does not want open-source in their App Store is lying. Only the copyright holders of the app can get the app pulled. In this case, that would be the Warzone 2100 Project devs, and Pumpkin Studios or whoever owns their IP nowadays.
TechWiz wrote:@Zarel:
I was going to post it free anyway because it's not my project. However Apple wants to charge a $99 fee to register for their Developers Connection crap... Although it should limit the amount of crap on the App Store, theres still an ungodly mess of crap on the App Store cuz Apple's pre-release screening process sucks.
Well, I can pay the $99 fee and publish on your behalf if you can produce a working game. We'd need the working game first, of course.
TechWiz wrote:As for Pumpkin, weren't they disbanded like 10+ years ago now? I doubt they would have renewed their copyright throughout the 10 years after they disbanded and released the source code.
Copyright is perpetual and does not need to be renewed. Companies never release intellectual property to the public domain when they disband; they usually just transfer it to some holding company.

TechWiz
Trained
Trained
Posts: 33
Joined: 01 Nov 2009, 02:37

Re: iPad Development Thread

Post by TechWiz » 03 Aug 2010, 06:03

Zarel wrote: Oh, we will be demanding that you open-source the port.

Anyone who says that Apple does not want open-source in their App Store is lying. Only the copyright holders of the app can get the app pulled. In this case, that would be the Warzone 2100 Project devs, and Pumpkin Studios or whoever owns their IP nowadays.
Dunno how that will work but we shall see how things unfold.
Zarel wrote: Well, I can pay the $99 fee and publish on your behalf if you can produce a working game. We'd need the working game first, of course.
Not liking how this is aimed at me as if I was alone lol
Zarel wrote: Copyright is perpetual and does not need to be renewed. Companies never release intellectual property to the public domain when they disband; they usually just transfer it to some holding company.
If thats the case, then how did WZ2100 become open source? I'm sure whatever company got rights would just hog the source and go sue crazy...
Also it seems that copyrights do expire at some point but its longer than I had initially thought (50ish years for "intellectual properties") and the laws are more skewed than those of a divorce :?

User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: iPad Development Thread

Post by Zarel » 03 Aug 2010, 06:56

TechWiz wrote:Not liking how this is aimed at me as if I was alone lol
Look up "you" in a dictionary: http://dictionary.reference.com/browse/you

It can be a second-person plural pronoun as well. (e.g. "you guys")
TechWiz wrote:If thats the case, then how did WZ2100 become open source? I'm sure whatever company got rights would just hog the source and go sue crazy...
I believe it was open sourced before Pivotal Games closed down.
TechWiz wrote:Also it seems that copyrights do expire at some point but its longer than I had initially thought (50ish years for "intellectual properties") and the laws are more skewed than those of a divorce :?
Actually, in the United States, it's life of the author plus 70 years.

Post Reply