Pebbl Updated

by Developer @ pebbl.co.uk on Thursday, 9 June 2011

I put the latest changes live to pebbl.co.uk today - this list covers just a few of the new abilities that my CanvasTheory library now supports (thanks to the Pebbl project). Please bear in mind that this library is completely "work in progress":

  • Redraw Regions : before I had gone the lazy route of just clearing the entire canvas prior to the next redraw. I knew at the time that I was going to have to be un-lazy later on - but I didn't quite realise how quickly I would have to make the change. Initially I was developing on my Mac Book, but when I tested the game on a widescreen monitor the slow down was drastic. So CanvasTheory now supports clearing only the regions it has drawn. The next step will be to add intelligence this so that CanvasTheory knows whether or not the Sprite has changed.
  • Pixel Perfection Collisions : This is something I knew would always be needed for a game that involved a little blob bouncing on floating rocks - hence the reason why I chose to build Pebbl using Canvas rather than using any old DHTML. So to cut along story short Pixel Collision Detection is now a supported feature - but only partially - don't go rotating the Sprites and expecting things to work just yet ;)
  • Sprites & Layers:

    I've implemented a flexible sprite based system for CanvasTheory to use - backed up by a weaker layering system (something I hope to improve upon as time permits).

    What makes CanvasTheory's Sprites flexible? The fact that they are each uniquely tied to a HTML element. This allows for jQuery animate and selector support, for future DHTML fallback (if Canvas support fails) and for handling native DOM events and event bubbling. The way CanvasTheory is coded - with it's ExtendTheory counterpart - the Sprite code is also extendable, so Specific Sprites can be created quickly and easily.

  • Pixel and Shape Masks : This is a brand new feature that is still work in progress. It was developed to support the "Black Holes" in Pebbl, allowing the main character to seemingly fall through holes in the scenery. Whilst "Pixel Mask" definitely needs optimisation work, the Shape masks are working well.
  • Hotspots and easy translation : A somewhat untested feature is the ability to shift a Sprite's positional hotspot (and whilst this seems to work, it may cause problems when mixing translations). I've also tried to make the Sprite interface as easy to use as possible, allowing for quite a few shorthand functions.

Leave your comment