Platfomer Progress Update 5

Platfomer Progress Update 5

Progressing faster now. Im putting in around 2-3 hours a day, mixed in with Skyrim, arduino projects and various other activities.

I’ve added infinite looped parallax backgrounds, tiered sawblades because they look better, text popups above the player to keep the hud clean, coins that behave as expected, powerups that play with the physics, an animation state machine to make player animations really easy and I’ve also cleaned up almost every aspect of the code, for cleaner, faster and more satisfying gameplay.

Ground state, with temporary sprite, also, parallax background

Screen shot 2011-11-26 at 6.55.07 PM.png

“Flying” state, as above…

Screen shot 2011-11-26 at 6.55.16 PM.png

Tiered sawblades, backing layer, and other stuff

Screen shot 2011-11-26 at 6.55.39 PM.png

So thats it for now. As a passing gift, I will share my code for easy, infinite looping parallax backgrounds. Images must be power of 2, like 128×128 etc or black banding occurs. I really need to figure out this syntax highlighter

CCParallaxNode * parallax = [CCParallaxNode node];
CGRect repeatRect = CGRectMake(-1000, -1000, 1000, 1000);
NSString *loadParallax = [NSString stringWithFormat:@"Parallax%i.png", stage];
CCSprite *background = [CCSprite spriteWithFile:loadParallax rect:repeatRect];
ccTexParams params = {  GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT  };
[background.texture setTexParameters:&params];    
background.anchorPoint = ccp(0,0);   
[parallax addChild:background z:0 parallaxRatio:ccp(parallaxRatioX, parallaxRatioY) positionOffset:ccp(0,0)]; 
[self addChild:parallax z:-10]