Posts

Showing posts from May, 2011

[python] 'gcc-4.2' failed with exit status

Solution:
add the following before the python command
ARCHFLAGS="-arch i386 -arch x86_64"

example:
ARCHFLAGS="-arch i386 -arch x86_64" python setup.py build

The Error occurs because the compiler tries to make the app for ppc architecture but after Xcode 4 the ppc compiler has been removed.

Using Accelerometer for Sprite Movement

via: http://www.cocos2d-iphone.org/wiki/doku.php/tips:using_accelerometer_for_sprite_movement

init{

self.isAccelerometerEnabled= YES;

[[UIAccelerometer sharedAccelerometer] setUpdateInterval:1/60];
}


#define kHeroMovementAction 1#define kPlayerSpeed 100-(void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {// use the running scene to grab the appropriate game layer by it's tag GameLayer *layer =(GameLayer *)[

Great collection of iOS Resources