Uncategorized

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.