May 13, 2012 Leave a comment

I’ve been scratching my head to think about the best way to do a 3D top down scroller where player can still tap on their iOS and move player and still have 3D depth environments being rendered correctly.

I faced 3 problems here:
1. Touch position doesn’t get along with Perspective camera when trying to convert ScreenToWorldPoint, so I have to use orthographic camera.
2. I want it to be 3D rendered, but still have touch conversion and player (must be always visible and no perspective) rendered correctly.
3. I want the player moved with the speed of camera, and yet still can be freely moved around the view port.

So, after spent 1 hour trial and error, the solution is:
1. Make a orthographic camera that only render for player avatar.
2. Make a perspective camera that renders everything else except the avatar, and make this as children to the orthographic camera.
3. I made the player as children to the camera, so as the camera move, player will also move forward and yet we can still control the position of the player with the tap.

So, the root is orthographic camera that has 2 childrens:
1. Perspective camera
2. Player avatar.

This way I can have a accurate touch position conversion that will positioned the avatar everywhere the player want, and still render the environments as 3D in a top down scroller type.

Next phase: Render the avatar and animate

Advertisements

iPhone 4

May 29, 2011 Leave a comment

Got this iPhone 4 white on possession.
It amazed me how Apple made this product. Now have to code for it.

Categories: iPhone

New Website

February 16, 2011 Leave a comment

My new website about iPhone/iPod Touch/iPad is already up and running.

Have a visit: http://www.azacode.com

Categories: General

iShamela finally on the AppStore

January 25, 2011 Leave a comment

Just made a iPhone/iPad Universal app which can load a lot of books from Moslem Scholars, now available on the AppStore for $1.99.

The app contains several books already, you can add it or remove it using iTunes File Sharing or WiFi File Sharing.

Available on the AppStore

Lite Version coming soon…

Categories: iPhone

Cocoa Custom Delegate

December 8, 2010 Leave a comment

Been spending times to port my current iPhone arabic library into iPad (Universal), and some of the codes I made was hardcoded, so there are some repeated codes here and there for SQlite3 query, since I want to overhaul my app, so I was thinking that I must use custom delegate for my DBManager.

On some tutorials on the net, people not using protocol for delegate, but I want it to be protocol based delegate.

So, here are the codes:

DBDelegate:

@protocol DBDelegate

@optional
- (void)dbPrepare:(NSString *)filename;
- (void)dbGotRecord:(NSString *)filename Statement:(sqlite3_stmt *)stmt;
- (void)dbFinalize;

- (void)dbGotBookInfoRecord:(NSString *)filename Statement:(sqlite3_stmt *)stmt;

@end

Then, on my DBManager:

@protocol DBDelegate;

@interface DBManager : NSObject {
id <DBDelegate> delegate;
}

@property (nonatomic, assign) id <DBDelegate> delegate;
@end

It used to be “id delegate”, but since we are making a protocol based delegate, we must make sure that our delegate object conforms to DBDelegate protocol, by using conformance statement of id, this way we don’t need to check if a delegate is conforms to DBDelegate or not.

On the codes where we fetch the records, we can call the delegate:

if (self.delegate)
{
[self.delegate dbGotBookInfoRecord:file Statement:stmt];
}

That’s it we now ready to use the delegate

Categories: iPhone

Final Uninstaller – Patched

November 29, 2010 Leave a comment

Recently, my Google Chrome keep crashing on me, I tried to uninstall it, but still crash, my assumptions is something not wrong with my browsing data, so I tried to remove all chrome related data from temporaries, registries, etc.

Looking around for a good uninstaller, I found Final Uninstaller, but the thing is a shareware.

First, I was going to alter the registration process, but then everytime I fired up Final Uninstaller, I always have UnRegistered version coming up, even after I patched the Registration process. Then I changed my trace into the application start, and look for some string reference of “UnRegistered Version”, if I can’t find it, I will look intermodular calls and reverse engineer some assembly codes to perhaps make a Keygen, based on the Registration process, but I found this string, and everything become simpler, I can then crack it for just a couple minutes.

Fired up OllyDbg, search for strings reference of “UnRegistered Version”, trace up and search for the caller of the unregistered function, got one, changed jnz into jz, and voila, I have a patch address, fired up hex editor, change patch it, save it as a patch binary. Overwrite my trial one with my patched one, then it’s full version now.

This app is bare naked, it doesn’t have protection whatsoever that makes it easier to crack in just a couple minutes.

One more thing, this app created either using Delphi or C++ builder, I saw it uses fastcall calling convention in all of its function call and TXXX class naming everywhere.

Categories: Reverse Engineering

Keygen on iPhone 3G 4.0.1

August 7, 2010 Leave a comment

Have this two software products that shares the same serial generation, marketing people tend to ask me about the activation code for certain license code, and yet I’m always on the road often not bring laptop.

Figure I could generate the serial number using my iPhone, so I fired up Xcode, patch it again (I was reinstalling Snow Leopard), and spent a couple minutes make some scrollable view and build.

Now I have my own serial number generator for my products right in the palm of my hand, I can take it everywhere without having to bring along laptop.

It’s working for iOS 4.0.1 using 3.1.3 SDK, all I have to do is reread my post about live debugging then do the hard way by packaging the ipa file myself on iOS 4.0.1. But hey, it works.

Categories: iPhone