Some Questions about GLBasic - iPhone.

Previous topic - Next topic

fjsantosb

Hi all.

I have been using glbasic last few weeks and as professional developer i found this tool extremelly useful to coding games (developing times decreases incredibly), so i will buy soon.
But i have some questions yet, referring iPhone coding.

Data Persistence
That is my first doubt, because, i don't know if i can use as usual dat files saves on iPhone / iTouch for store some data persistence (i.e. saved scores or settings). I don't know if i will find some permissions problems or anything else, or if i need to store persistence data on iPhone in other way.

Call or Stand By
Another question is where to include code, for saving data when user put iPhone to StandBy, or close application, or if any call is made while user is using my software. I would like to save data before application shutdown.

Memory Allocation
I am worried about memory, because i can't use debugging or optimizer tools from xcode, and i know that is a main problem when coding for iPhone (and main problem when trying to certificate your application for market).

Backward Compatibility
Yep, i know that GLBasic is compatible with 3.0 version of iPhone, but i wonder if this compatibility is backwards too (i suppuse yes).

Well, i thinks that's all my doubts.
Thanks in advance and great job with GLBasic.

fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Uncle

Hello,

Some good questions there :)  And ones I don't know the answers to, but will in coming days.

Ref Memory Allocation, you can still use Xcode Instruments to measure the performance of your app.  So you should be able to see how much memory and cpu time your app takes.

Ref the Data Persistence thats a good question and I will make a quick test this morning to see.

Uncle

Ok, made a quick test and I couldn't save data onto the iPhone.

Im sure KP will come along soon and give us a definitive answer on this.  Perhaps we can only save in special folder?


Kitty Hello

Quote from: fjsantosb on 2009-Aug-24
Data Persistence
Next update will have PLATFORMINFO$("DOCUMENTS"), that gives you a write-enabled directory for your program.
Quote
Call or Stand By
SUB GLB_ON_QUIT: will be called just before the program ends. Use OPENFILE to write your progress now, but do it fast. The iPhone has set a thread that will terminate your app in about .5 secs. Don't do any graphics here!

Quote
Memory Allocation
What are you worried about? If it runs, it runs. (IMHO)

[/quote]
Backward Compatibility[/quote]
You can try to link to the 2.2.1 SDK. It "should" work. I suggest using 3.0, though.


fjsantosb

Hi,

First, thanks for so fast answers.

About Data Persistence, i wonder if the path that glbasic will provide, will be common for all applications or dependant to application.
About Shut Down App, will be very usefull the soubroutine provided (I didn't know that), and i use only to save data (no graphics hehe).
About Memory Allocation, all works like a charm so i am not really worried about it.
Same about backward compatibility, this was only curiosity, I will code for 3.0 of course.

Thanks to Mr Uncle for sharing that I can use XCode's performance tools for tuning my applications. I dind't know that.

I have a last question. I have found some not expected behaviour testing my application on real device.
The problem arise when i use the upper button of the device (shutdown button), to put device to sleep in middle of the application. When i awake the device using the same button, i found my application on initial state and nothing work (the applications hangs up). I have to shutdown applications using the main button. That is not the expected behaviour, because testing other applications on appstore, and doing the same procedure, i found application on pause state or anything else, and all works. I dont know if that is a coding problem (if i need to do some special coding for that like GLB_ON_QUIT) or if is a behaviour not implemented for GLBasic yet.

Thanks in advance, fjsantos.
Francisco Santos Belmonte founder of Tip Tap Games.
Website: www.tiptapgames.com
Twitter: www.twitter.com/tiptapgames
Facebook: http://dld.bz/dYVd
iPhone News & Sales: www.gamesappetizer.com

Kitty Hello

iPhone programs are sandboxxed. You cannot share files between them.

About the power button. When you mkae phone calls and push that button Jailbreak devices might act differently than non-Jailbreak devices. Mine (with JB) leaves the program running while there is a phone call. Others reported that it oughta quit. No idea, really.

doimus

Backward compatibility question:

If we build with SDK 3.0 , will 2.2.1 users still be able to use the application?

That is important, since most iPod Touch users are still on 2.2.1.
Upgrade to 3.0 is not free for iPod Touch, and there's no apparent gains...

Kitty Hello

Try it. I have no idea, really. It was designed to work wit 2.2.1, though.

@Ocean: You can't run 2 processes at once. At least not legally.