siat

LD27

Progress bar library for LimeJS

I’ve made a small sprite scaling library for LimeJS, inspired by CCSpriteScale9 for iOS.  It’s good for speech bubbles, progress bars, health bars… anything with rounded corners and variable sizes.  You can download it from Github.

To use, save spritescale9.js somewhere in your LimeJS project and run python bin/lime.py update to get the new namespace. Then add something like this to your code:

require('kchodorow.lime.SpriteScale9');
 
 var spriteSheet = new lime.SpriteSheet('someSpriteSheet.png',
 lime.ASSETS.someSpriteSheet.json, lime.parser.JSON);
 var sprite = new kchodorow.lime.SpriteScale9()
 .setFill(spriteSheet.getFrame('bubble.png')).scale9(300,200);
 scene.appendChild(sprite);

It assumes you’re using sprite sheets, although it would probably be easy to hack in support for “bare” images.

Enjoy!

Progress report

Here’s my game so far:

image

Please give it a try! (Note that you actually don’t have to beat the timer at the moment, you just have to beat the other gun.)

I spent most of this morning trying to get the enemy intelligence working. I think now it’s too hard, going to spend some time this afternoon tweaking level difficulty.

Working on enemy intelligence

Comments

25. Aug 2013 · 17:23 UTC
Looks great!
25. Aug 2013 · 17:32 UTC
Thank you!