New pre loading

Most of the HTML canvas libraries I’ve come across make you check for image loading your self before going into the main loop. bHive now doesn’t make you have to do this. All you have to do in your initial setup is create the bitmaps, no need to worry about if it’s loaded or not bHive will worry about that for you and then start the main loop accordingly.

Hurrah!


New thinking.. New bHive

It’s been a while, granted! I’ve been watching the scene and the exciting new developments for HTML5 gaming. It seems that in less than six months HTML5 has literally exploded into the development world and isn’t looking as though it’s going to slow up anytime soon.

I’ve also been messing around with paper.js from Juerg Lehni & Jonathan Puckey which is a stunning library for using the canvas, with blisteringly fast performance. It’s always interesting using other peoples libraries as it gives you insights into where you can change (for the better).

The latest iteration of bHive will get … Continue Reading


Canvas Speed

It’s always good to optimize! And speed within a browser is always a premium. No browser+JavaScriptgame will ever be as fast as compiled code.

Worth a read is the great article over at HTMLwebsite about the speed performance hacks and techniques that can be applied to your canvas apps.

I’ll implement a few of the techniques into bHive just to leverage a bit more drawing speed.

Read the full article over at HTML5rocks


8bitrocket starts HTML5 forum

The guys over at 8bitrocket have started up a forum dedicated to HTML5 and the creation of games and tech. If you want a place to hang out and discuss the HTML5 Canvas then I suggest you head straight on over there and introduce yourself.

Find it online here: http://www.8bitrocket.com/phpbb


Texture Packer Support

I think I need to swing a huge thanks over to Andreas from Code n Web who has incorporated the bHive exporter for the sprite class. If you’ve been painfully putting your sprite sheets together in Photoshop or Fireworks then you’ve been missing a trick. Texture Packer is, once used, a tool that will be forever embraced.

If you’re using bHive, the I suggest you download this from www.texturepacker.com today!

Again, thanks Andreas!


1.0.7 is here!

The savvy people out there would have probably noticed I’ve been using 1.0.7 on some of the demo pages, today I’m happy to say that it’s available for the masses in the form of development and production versions.

Please as usual, let me know of any bugs you come across, I’ve tested it as much as I can but I am sure something will crop up, it usually does!

I’ve mentioned a couple of things over the past weeks that have been included:

  • Audio
  • Tileset
  • More animation control
  • Speed Increase
  • Triggers
  • Tweens

All good enjoy!


Tile sets

Forgot to mention that the bHive.Bitmap class has now been updated with methods to allow for the use of tiles. Instead of calling the normal .draw() method which would just draw the entire bitmap to screen you can now use:

addTile( ident, sx, sy, width, height);

ident – a string identifier so you can reference the saved tile
sx – x location of the top left corner of the tile
sy – y location of the top left corner of the tile
width & height – Size of the tile

drawTile( ident, dx, dy, [width, height])

ident – the string identifier used in addTile method
dx – Destination … Continue Reading


Sprites get a makeover!

Right, the old way bHive used sprites was to have a sprite sheet and animate it using the coordinates that were assigned using the framedata array. This method was okay, but just assumed that the sprite sheet contained only one animation, in reality you’d need a seperate sprite sheet for every animated sprite in your game or application. Boo!

I’ve now rewritten the Sprite class so that you can pass in a bHive.bitmap as the src property which will allow you to load a all encompassing sprite sheet and create multiple animated sprites from it.

The Sprite class also now sports a … Continue Reading


First flash conversion

Have started the conversion of Memory Mess the Flash game I wrote in 2004 for the UK Motorshow. So far all the assets are imported and most of the code has ported straight into bHive.

As you’ll see from the post below, I missed the clone function from 1.0.4.. Sorry guys! It’s now there as I needed it for the scrolling background.

Before I launch this I’m guessing I’ll promote bHive to version 1.0.5, I need to add the sound functions to this game and that is a significant development which warrants a version change.


setInterval bites the dust!

I hold my hands up, there are some really clear people out in the InterWorld (does that even exist?) and I’m just scratching at the surface.

After doing some cramming on how to implement a Corona SDK style implementation of Box2d-Web into bHive I came across the “new thinking” of how to do intelligent animation. The answer, requestAnimationFrame (silent fanfare!).

As usual the browser gods can’t agree on a unified naming convention, so we’re left with the o-moz-webkit combo of functions, Geesh.. Guys, agree on one name for your functions please!

Rant over, and back to the clever people! … Continue Reading