About Store Forum Documentation Contact



Post Reply 
iOS SDK
Author Message
Driklyn Offline
Member

Post: #1
iOS SDK
So, other than the limitations listed on the Mobile page of the Wiki, I'm curious to know more about the iOS SDK:

  1. Does first/third party libraries work with the SDK? For instance, can you enable Game Center support if you wanted to enable multiplayer, achievements, and/or leaderboards? Would I be able to add third party libraries such as ShareKit? I assume I would be able to, just want to know for sure.
  2. What are the major differences in coding a game using the PC SDK vs the iOS SDK? Is it the same syntax-wise? Or, is it more like Objective-C? I assume it's the same, but want to confirm this.
  3. How often does the iOS SDK get updated? Is it updated simultaneously with the Mac SDK? Does it contain the latest changes? When was the last time it was updated?

I am not a total iOS n00b. For those who remember, I have created an iOS app before using cocos2d and Objective-C (for those who don't). Just wanted to know more about the iOS SDK, as I'm sure, not very many people have used it.
08-08-2011 12:01 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
RE: iOS SDK
Waiting patiently... smile
08-11-2011 01:48 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: iOS SDK
1. yes you can include custom libs and headers, but by default there is no access to some global iOS specific system handles (like NSApp, NSWindow, etc)
2. you can do typical C++ just like on Win/Mac (objective-c is not required)
3. it's always updated when in version history it is mentioned "released for mobile" (not often, but if someone requires some critical functionality from latest sdk, I can always upload new sdk on demand, within some days)
08-11-2011 12:20 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #4
RE: iOS SDK
Okay, thank you. Payment sent. Been here for 16 months, I guess it's about time I actually purchase a license. grin

(08-11-2011 12:20 PM)Esenthel Wrote:  (not often, but if someone requires some critical functionality from latest sdk, I can always upload new sdk on demand, within some days)

Get ready, cause requests will be coming! pfft (I can only assume I will have some, at least...)
08-11-2011 10:14 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #5
RE: iOS SDK
So, this is probably going to act as my mecca for all my iOS questions. I've spent a few hours messing with the SDK so far tonight and, after a bit of fixing project settings, have successfully deployed the tutorial project and my own custom project to my iPod Touch.

Now begins my questioning:

  1. How do you have the app not display the title bar during the loading screen? I tried using APP_NO_TITLE_BAR and a few others, but that didn't seem to do the trick.
  2. How do you have the app ignore UIInterfaceOrientationPortrait and UIInterfaceOrientationPortraitUpsideDown modes altogether? Removing them from the *-Info.plist file does make the app start in UIInterfaceOrientationLandscapeLeft mode (with the exception that the Esenthel logo still appears in Portrait mode), however, when rotating the device, it still goes into Portrait and PortraitUpsideDown modes.
  3. How do you fix the text quality when in LandscapeLeft or LandscapeRight modes? The text quality is much worse when compared to Portrait or PortraitUpsideDown modes. Is this because of D.scale?
08-12-2011 07:59 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #6
RE: iOS SDK
Solved #1 and #3 on my own, and found out some more information on #2:

  1. To do this, add a Boolean property named UIStatusBarHidden to your *-Info.plist file and check it.
  2. According to Apple's iOS Docs, you have to override the main UIViewController's shouldAutorotateToInterfaceOrientation method in order to specify which orientations you wish to support. I wish to support landscape modes only. Assuming the SDK uses a UIViewController behind-the-scenes, would it be possible for you to add some orientation flags that we can specify during InitPre() so that we can specify the exact orientations we wish to support?
  3. This is, in fact, due to D.scale. Simply executing D.scale(D.w()); does the trick.
08-14-2011 02:54 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: iOS SDK
2. I'll check this
08-14-2011 08:58 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #8
RE: iOS SDK
4) I created a PVRTC4 texture using the Converter tool and added it to a dynamically created box mesh. Works fine on the iOS Simulator, but when I load it on the actual device, it's like it's not being tiled or something - 80% of the mesh is invisible, so to speak. You basically see a non-tiled version of the texture on the top and bottom on the box, the sides are invisible. Plus, it's like the view range is really, really low (even though it's not), you can never see the entire texture at once - only a portion, changes based on the camera angle. I've attached a ZIP file containing the GFX and original PNG files. Forgot to mention: The brick material included in the Data.pak file of the tutorial app works flawlessly, so it must have something to do with how I converted the texture.

5) How do we save files to the device? For example, calling mesh.save("box.mesh"); works on the iOS Simulator, but does not work on the actual device.

6) Just out of curiosity: Are nearly all effects unsupported in the iOS SDK because of device limitations or because you haven't coded them in yet?


Attached File(s)
.zip  concrete.zip (Size: 414.5 KB / Downloads: 3)
(This post was last modified: 08-15-2011 07:19 AM by Driklyn.)
08-15-2011 07:07 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: iOS SDK
4) I'll check this

5) http://www.esenthel.com/wiki/index.php?title=Mobile
Quote:Application can write files only to "application documents folder", obtained by "PathSys(SPT_DOCUMENTS)"

6) 90% is device limitation
08-15-2011 11:32 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #10
RE: iOS SDK
4) Okay, seems like I got it working now. Not really sure what happened. I went ahead and reconverted it to PVRTC4 again (under a new name, so I didn't overwrite the first one) and now it seems to be working. The filesizes of both files are exactly the same, but only the second one seems to work. Also tried converting to both PVRTC2 and B8G8R8A8 just to see if those types will work as well, and they did.

5) Got it. I forgot to mention in my last post that I actually had already tried mesh.save(PathSys(SPT_DOCUMENTS) + "box.mesh"); but it didn't work. Turns out, the documents path does not have a / appended to the end (I assumed it would). This works: mesh.save(PathSys(SPT_DOCUMENTS) + "/box.mesh"); Maybe PathSys should automatically append the / to the returned path?

6) Okay. Any chance of adding support for Decals?
08-15-2011 07:45 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: iOS SDK
6) it's not possible, you can only draw them manually using Mesh made from quad in blend mode, or use VI to draw quads also in blend mode
08-22-2011 05:28 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #12
RE: iOS SDK
6) Okay, sounds good. Will try this if/when the time comes.

7) For my project, I need to be able to send POST data to my server (things like the map's name and a .pak file containing the user-created map). Is there any built-in classes in EE that will allow me to do this? I don't believe there is, so I figured I will have to use some iOS classes, such as NSURLConnection. Trouble is, I get errors (in the file, MacTypes.h) when including it:

Conflicting declaration 'typedef char* Ptr'
'Ptr' has a previous declaration as 'typedef void* Ptr'
Reference to 'Rect' is ambiguous
Expected initializer before '*' token


I am currently including it in the tutorial project like so:

Code:
#include "stdafx.h"
#include <Foundation/NSURLConnection.h>

Also, I have told the compiler to "Compile Sources As" Objective-C++ instead of "According to File Type" as described in this post.

I have tried including several other iOS classes and they all give the exact same error messages, which I find to be strange. Any ideas?
09-08-2011 08:43 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #13
RE: iOS SDK
Try including system headers before EE headers

Why not use Download class?
It can be used to access links with parameters
09-08-2011 10:16 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #14
RE: iOS SDK
7) I've tried this in stdafx.h earlier but ended up with 366 errors, if I remember correctly:

Code:
#include <Foundation/NSURLConnection.h>
#include <EsenthelEngine/EsenthelEngine.h>

Like this, the errors occur in EE headers as things like Ptr and Rect have already been defined in MacTypes.h.

I've considered using the Download class, but I don't think that's even an option. I need to send a .pak file and a screenshot from the device to my server. I'd be surprised if that even worked via GET. Not only that but GET surely must be less secure than POST for this type of data.
09-08-2011 08:29 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #15
RE: iOS SDK
you can send binary data using Download class in hex format:
link.php?data=0x11223344..

you can also connect to server.exe based application using Connection class

try including headers in Mac/iOS in this way:
Code:
#define Ptr      ApplePtr
#define Point    ApplePoint
#define Cell     AppleCell
#define Rect     AppleRect
#define Button   AppleButton
#define Cursor   AppleCursor
#define FileInfo AppleFileInfo
#define gamma    AppleGamma
#define ok       AppleOk
#define require  AppleRequire
#define Class    AppleClass

// here include system headers

#undef Ptr
#undef Point
#undef Cell
#undef Rect
#undef Button
#undef Cursor
#undef FileInfo
#undef gamma
#undef ok
#undef require
#undef Class
#undef MIN
#undef MAX
#undef ABS

#include <EsenthelEngine/EsenthelEngine.h>
let me know if that helps
09-09-2011 05:49 PM
Find all posts by this user Quote this message in a reply
Post Reply