Latest Posts

  • PixelBlitz: New package, new domain

    Yesterday I completed the move to re-package PixelBlitz. Norm agreed, and we registered a new domain (pixelblitz.org) and I went through and updated the library to use the new package location.

    I think it makes it cleaner and easier to type :)

    The domain name will be used to point to a PixelBlitz web site, once we’ve got some time to actually build it – in the meantime I’ll redirect it to point to the Google Code site.

  • MindCandy Volume 2: Amiga Demos

    I just had to write something to say that the oh-so-excellent MindCandy Volume 2 DVD has been released! Volume 2 is all about Amiga demos and contains 30 full productions spanning the range of the Amiga scene, from the Red Sector megademo and Enigma, right up to Fat Fits Karma by MadWizards, and Silkcut by The Black Lotus.

    All of the demos were captured and rendered using genuine Amiga hardware, and then painstakingly stitched together for the best possible viewing on DVD. There are loads of extras as well, so for just €15 I urge you to consider buying this – I just ordered 3 copies :) (1 for me, 2 to give to friends at the forthcoming TGC Convention)

  • BlitzKeyboard is live!

    After a mammoth coding session tonight I have committed the first version of BlitzKeyboard into the PixelBlitz Engine.

    I’m really happy with this work – it’s pretty much everything I’ve ever wanted from an advanced keyboard handler :)

    So what can it do for you? In short it’s about saving you time. At the core is an extremely fast keyboard event handler, so all you need to do is ask it if a key is pressed or not:

    [as]
    if (keyboard.isDown(BlitzKeyboard.LEFT))
    {
    player.x -= playerXSpeed;
    }

    if (keyboard.isDown(BlitzKeyboard.RIGHT))
    {
    player.x += playerXSpeed;
    }
    [/as]

    Simple. Fast. Efficient. Of course if that was all it could do it would be nothing special – but it can do so much more …

    Multiple Key Support
    Accurate detection for one, two or three simultaneous key presses, including Location support. That means you can check for the difference between the left shift key and the right shift key. A full range of constants are built into the class, so rather than remember which keycode relates to which key, you just use our constants list. This list has been extended to support Enhanced keyboards, so you’ve got it detecting the Windows (or Apple Command) keys as well as the Application key.

    Set the Key Rate
    In an arcade game you need to pick-up the key presses as fast as possible, and BlitzKeyboard does just that. But you can also configure a Key Rate, so if you only want a certain key to fire once every second then that’s no problem.

    Bind Events or Functions to Keys
    You can set a key (or key combination) to fire an Event or call a Function. You control if the Event should fire when the key/s are pressed down, or fire on the release (when you let them go again). You pass in the Event and then set an event listener to listen out for it, and it handles the rest. It even takes the Key Rate into account, so your Event will only fire at the frequency you set.

    Wait Key support
    Say you need to wait for the user to press a key before proceeding with your game – then just use the waitKey() function! You pass it an Event and a type, and the next time a key is pressed the Event is dispatched, no matter which key caused it.

    Key Hit Counter
    Want to know exactly how many times a key has been pressed? Then call keyHit() on it and this method will tell you just that.

    I’ll be adding a few final features, and preparing the demos in the coming days. But the core class now exists in Google Code for the curious.

    Next up is BlitzMouse which will handle advanced mouse events – things like mouse zones, reporting on how fast the mouse is moving, scroll wheel handling and more.

  • PixelBlitz Update – addLimit() and removeLimit()

    While chatting to Norm on MSN we were both quite surprised at the lack of Game specific libraries / frameworks for AS3. Things that make creating a game as easy as possible for the developer. That is what we really want PixelBlitz to turn into, and I made another small step towards it today.

    I’ve commited r22 to Google Code, which contains two new commands: addLimit() and removeLimit(). They are as easy to use as this:

    [as]
    //    The Player
    player = new PixelSprite(new Bitmap(new plane1BD(0, 0)));

    //    Limit the player to the region starting from 100,100 down to 450,300
    player.addLimit(100, 100, 450, 300);
    [/as]

    Essentially all it does is limit the PixelSprite to a set region of the stage (in this case a 350×200 block in the middle). It’s far from earth shattering, but PixelBlitz is about helping you make your game quickly, with as clean code as possible, and all these little things build up over time.

    It means that when checking the keyboard to see if you can move the player, you no longer also need to check the X/Y position, because that is being handled for you.

    I’d post a demo, but I figure you can work out what it looks like already :)

  • PixelBlitz Engine Update: AutoScroll support with demo

    Just a small update to the PixelBlitz Engine today, but a pretty cool one!

    I’m creating an intense shoot-em-up game as my water shed test of the PB engine. Each day I get to add a few more features to PB that makes the game closer to reality. Once I have reached that point I know we’ll have something truly useful on our hands :)

    Today I added in a backdrop behind my ships and thought “damn, that ought to scroll” – but I figured that PB ought to handle the scrolling for me, automatically – just set it and forget it. So that is what I’ve added to the engine tonight.

    It’s a piece of piss to use:

    [as]
    // Continuously scroll this PixelSprite to the left by 4 pixels per frame
    pixelsprite.autoScroll(PixelSprite.SCROLL_LEFT, 4);
    [/as]

    Which allowed me to create the following demo in around 20 lines of code:

    I’m quite pleased with how this is shaping up :) You can autoscroll any PixelSprite, with full transparency preserved (so they can be overlaid on-top of other PixelSprites for true glass-window scrolling effects). The PB engine takes care of making the scroll seamless for you, and you can modify the speed on-the-fly (although I’d recommend not to do it every frame if you’ve got a lot going on).

    The only issue is that scaling an auto scrolling PixelSprite will mess it up, so I’ll need to remedy that.

    It’s now the weekend, but if i get some spare time I plan on continuing my task of fixing the left over issues before cracking on with collision groups and sprite mask tests.

    Here is the source + FLA.
    You’ll need to checkout latest revision (v21) of PixelBlitz from Google Code to compile it though.

More posts to tickle your grey matter ...