Uncategorized

Adding Accelerometer Data

Posted in Uncategorized on June 10th, 2010 by lucy – Be the first to comment

So easy.

Add to the init method

self.isAccelerometerEnabled = YES;

Then somewhere in your class, stick the following

- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration {
 NSLog(@"tilting %f", acceleration.z);
    //accelerator x
    //So tilting to the left goes towards -1, tilting to the right goes towards 1;
    //accelerator y
    // tiling forward goes towards -1, tilting backwards goes towards 1;
    //accelerator z
    // flicking it upwards it goes towards and past 2, flicking it downwards it goes towards and past  -2;
}

NSLog CCLOG Format Specifiers

Posted in Uncategorized on June 10th, 2010 by lucy – Be the first to comment

I can never remember which one to use, so here’s the list

%@     Object
%d, %i signed int
%u     unsigned int
%f     float/double

%x, %X hexadecimal int
%o     octal int
%zu    size_t
%p     pointer
%e     float/double (in scientific notation)
%g     float/double (as %f or %e, depending on value)
%s     C string (bytes)
%S     C string (unichar)
%.*s   Pascal string (requires two arguments, pass pstr[0] as the first, pstr+1 as the second)
%c     character
%C     unichar

%lld   long long
%llu   unsigned long long
%Lf    long double

Detecting touch of a sprite in a sprite sheet

Posted in Uncategorized on June 10th, 2010 by lucy – Be the first to comment

Because I’m going to be doing this a lot, I’m making a note of it.

So at the top of my page.m

enum {
kTagSpriteSheet = 1,
kTagSprite = 2,
};

In my init function

mySheet = [CCSpriteSheet spriteSheetWithFile:@"myatlas.png"];
[self addChild:mySheet z:0 tag:kTagSpriteSheet];

// create the sprite
mySprite = [CCSprite spriteWithTexture:mySheet.texture rect:CGRectMake(0, 0, 200,200)];
[mySheet addChild:mySprite z:0 tag:kTagSprite];

Then in ccTouchesEnded method

BOOL *isSpriteTouched = NO;

UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:[touch view]];
location = [[CCDirector sharedDirector] convertToGL:location];
CCSpriteSheet *mySheet = (CCSpriteSheet*) [self getChildByTag: kTagSpriteSheet];
CCSprite *mySprite = (CCSprite*) [mySheet getChildByTag: kTagSprite];
CGRect myRect = CGRectMake(mySprite.position.x, mySprite.position.y, mySprite.contentSize.width,
mySprite.contentSize.height);

if(CGRectContainsPoint(myRect, location)) {
    isSpriteTouched = YES;
}

cocos2d game tutorial

Posted in Uncategorized on June 10th, 2010 by lucy – Be the first to comment

Great tutorial covering all the basics of cocos2d.  Sprites, animation and sound effects.

http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial

grannies?

Posted in Uncategorized on June 5th, 2010 by matt – Be the first to comment

Photoshop Keyboard Shortcuts

Posted in Uncategorized on June 4th, 2010 by lucy – Be the first to comment

Since I’m doing the background plates I have to do a bit of photoshop work, and I’m a big one for keyboard shortcuts, so I’m putting them here in case I forget.

[ Decrease brush size

] Increase brush size

Shift [ Decrease brush softness

Shift ] Increase brush softness

Apple  Shift  N New layer

tile game tutorial

Posted in Uncategorized on June 3rd, 2010 by matt – Be the first to comment

looks pretty good:

http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d

concept sketches

Posted in Uncategorized on June 2nd, 2010 by matt – Be the first to comment

Done in brushes. Here’s a timelapse (mp4, 580kb)

brushes concept

mr smug.

And a hideous zbrush test sculpt, mainly to get back in the groove after having not used it in aaaaages.

zbrush head

note to self: learn zbrush

First post!

Posted in Uncategorized on June 1st, 2010 by admin – Be the first to comment

Here we are, all blogged up. Only 5 years behind the rest of the world. I hear facebook is popular…

We’ll update this with some preliminary findings soon enough, as well as our setup processes thus far.