Basically ( If you don't want to leave us ) an asteroid passed pretty damn close to the earth the other day.The weird thing was that the concept of the game I was working on was to use maths to target a missile at an earth bound asteroid. So when I was in a meeting hearing how it was canned, we were all just a couple of hours away from starting over again and living in caves.

If you wrote it in a story it just wouldn't fly.

There's another game I'm close to based on the whole asteroids as the bad guys theme, and today I had a good crack at it again.

Where the development has been paused for such a long time, I'm not a 100% sure what's new and what's kinda new. So forgive any repetition.

The final flv is on the title screen now, and it looks great. It's really large in terms of filesize and ideally we'll be able to cut that down somehow and retain the quality, but it is a thing of beauty, nGFX has done some great work there ( It's worth watching all the way through, trust me ).The player movement is less, well, shit, which is always a plus.Options are in there now. Well, a button saying Options, I really wouldn't press it as you'll probably have to reload the swf ( Although you'll be able to look at our logo rather than a blank screen again, which is another new thing ).( Adding that options button was a ton of work due to the curved text and the set in stone way I'd set things up. That'll teach me ).The "play" options are in. They're all unlocked now so you guys can check them out easily, but in real life you won't see those options if none of those features are unlocked ( ie, pressing Play will just make the game play as you'd expect without an extra click ).Notes are gone. They weren't that great so sod it, they're dead and buried.There's a lens flair in the game now, although it's pretty subtle and is based on a "Chroma fan" rather than a usual flare.

I'm sure there must be some other bits and bobs, but those are the main things that spring to mind. As always, the latest build is here, thanks for taking the time to give it a bash.

Since I started on X+++++ I've always had it in my head doing it as a d/load game too ( That's why it's 800x600 ), using Zinc to wrap it up in.

I'm blowing hot and cold about this. I really want to do it, we could do something really cool. All the sounds and images would be a lot clearer and better, the title screen flv ( Which is in the current build, although it's only the first attempt ) could be HD quality etc. Basically it'll be a mega-mix of the game.

So I'm thinking about this, both of us are liking the idea, and the cost to the gamer is going to be a really nominal fee, $0.99 - $1.99. In all honesty, after seeing the game so far, and being friends just by the virtue of coming here, would you pay that ? Would you go through the hassle of getting money into your paypal account and all that extra hoop jumping ? Is it far too much trouble to do ( I'm thinking that no one here registered at the NFL site to play our Gameball Maize Maze game, and that's nothing compared to handing over money )

Is the game not worth $0.99 ? By that I don't mean slag it off ( I've had a pretty dog shit couple of days as it is, don't twist the knife any deeper ) but is just a prettier full screen version no big deal over a free online one which may have ads in ?Is it the sort of game that is all well and cool to play in your browser, but not one you'd fire up to take over your machine for 20mins ?

Flipping it the other way around, what would you expect from a d/load version of a Flash game ? More game modes, regular updates, some other cool feature ?

Has anyone else given this a try ? To be honest every previous attempt I've seen has died on it's arse ( I was even checking out the donations feature on Kong last night, and games with 5 million plus plays have had about 20 people donating towards them. If I made $19.80 for 5 million plays I wouldn't be over the moon ).

I'm thinking this is a pointless and very naïve idea, I know it is and it's just an ego thing on my behalf that I want to see the game maxed out and sexy as fuck with it ideally paying for that extra love, but with all the talk recently of diversifying your revenue streams when it comes to Flash games, maybe it is worth just throwing the idea out to you guys.

So I have rencently finished a bigger update on a client's website, dealing with all the nasty and ugly shit one would rather like to avoid (to name just one: css - what was wrong with the good old table layout? OK, I know what was wrong, but dealing with all the browser's shitty problems to make it look nearly the same is just ... well, shit)

Meanwhile Squize was hammering out post after post so I didn't felt too bad being quiet.

Now today I actually have something to post, so here we go ...

This is a single frame from the X menu/background animation I've been doing. It'll take a while to render so I have to set up the network renderer on Monday to get the 30 seconds movie out to an flv file (which then will be played in the X menu) ...

If you're a fan of that game already, why not use that image as wallpaper? You can grab the 1024x768 version here.Bigger Versions are rendered tonight and will be posted later this week - and maybe (if rendertimes for hi-res vids aren't that high there might (really just might) be a screensaver ... we'll have to see).

X is on hold for the time being, but it doesn't mean I'm not thinking about it. I think being denied the chance to work on it is making me think about it more, it's like smoking.

Quite a few people are feeding back that the controls stop being responsive on lower end machines. This is due to the main loop it uses. Rather than me go into depth about it, have a check of the great tutorial at the other end of that link.The only downside to it is that so much of Flash's time is spent actually updating the display that input listeners can be missed, making it feel that the game is being unresponsive ( I'm guessing a listener buffer within the vm is checked every frame, and if the mainloop over-runs due to the sheer amount of data which is being plotted then the listener handler misses it's chance to check the buffer for any triggered events for that frame. That happens 60 times or so and that's two seconds where the game is ignoring you ).

One of the ways I'm looking to fix this is to add an options menu to the game, so people can turn off the eye-candy to suit their set up. The downside to this is, do I default to the game not having everything turned on by so anyone can just come to the game without messing with the options ( As it should be really, a game shouldn't expect or force a user to jump through config hoops before you can play it ), or do I max it out and put some comment in the game telling people that if it's slow to go and mess with the options ?

My current thinking is to run a cpu speed test at the start of a game. So some text explaining what's happening, that the user can go to the options page etc. and a counter runs down whilst it does it's thing ( So we can get an average of say 5 seconds ). This generates it's own problems though ( Doesn't everything ? It'd be so much easier to just be making banner ads for twice as much money ).The first being, what test do I run exactly ? Should it be a maths formula in a loop and it running some bitmap plotting at the same time ? Is that the best way to judge a machine ? Then, should it be running under a normal enterFrame, or using the timer loop ? Next up, how much can you trust this test ? I don't know where this game will end up, so in theory whilst the test is running something could be happening in the background ( From the user opening a new tab to a nasty chat window to the right of the game doing something ).Finally where do I get a good spread of test figures from ? I can tell you how quick a quad core pc running FP10 in FireFox 3 with 2 gig of memory will run the test at, but from there we only have so many other test machines. Are there going to be enough of you good readers of this blog willing to give good feedback on such a test ?

Even so, using the figures themselves isn't totally clear cut. To try and explain that, let's say a test on my machine comes back with a value of 10. I know X plays perfectly on my box, nothing I've thrown in there has affected anything at all, so 10 <= is a perfect machine in terms of playback. Great. Say you test it, and you get a rating of 20. What does that mean in real life ? I really doubt it means your machine is twice as slow as mine, 'cause it's just too much of a generalisation. But let's say it means that, what options do I turn off ? Do I kill the particle effects and leave the others running, or can I get away with removing something else.

I'm thinking the way to do it is run the test, output your machines rating, and then turn all the options off. Then when you're playing it, ask you to turn each bit of eye-candy on 1 by 1 until your machines screws up.Quite a big ask.

I'm really throwing this open to all of you guys, what do you think ( About any of it ? )

The final power-up, the pulse weapon, is in now. It's a big old powerful shot, slow to move, slow to reload, but two hits from that and anything is dead.To try and make it bigger and give it a bit more wow, I've used the particles playfield too. The particles are just little images ( Not pixels, they look too small, and it's something a lot of Flash GWars style games do, either that or they add a big ol' blur effect onto them. Neither being very nice ) which are blitted into a canvas bitmap.Every couple of frames I run a colorMatrixFilter on that bitmap canvas to fade the alpha down, all straight forward stuff we've all been doing since F8 came along.

With the pulse I just draw() it's image into the canvas bitmap so it creates a trail / thickens it up ( For want of a better term ). Draw() is a bit costly, but I'm only ever running at most 10 pulse bullets at once ( They were always going to be slow to reload, that's why I figured I could get away with doing this extra trail effect ).I'm really happy with it, it's in keeping with the very glowy nature of the game. BlendMode.ADD is the best thing to happen to Flash for a long time.

Once that was all in and working I did even more tweaking to the difficulty curve, the flockers now get nastier as you go, which is based both on the current level and the number of lives you have left ( If you're not doing so well there's no need to make it even harder ).

Then back to the power-ups again, and the space bar now swaps between them, which works a treat.

It's all going to plan so far, and seeing how we're on what, around 12 ( Full days ) development time, it's pretty good. It'll be nice to add the final baddie type ( Did someone say bullet hell ? ) and then the biggest thing should be the sound, which I'm a little concerned about 'cause there's a lot of things going on, and it'll be easy to just overwhelm the player with sound and make it really jar. Some thought is going to need to go into that.From there we're looking at presentational issues and then bugs, love and play testing.

Things didn't work out as planned today, and I've spent most of the day hitting X again.

I think this is going to be pretty brief as it's just gone 2:50 am and I'm pretty dead on my feet. Main changes are the asteroids now use the bitmap technique as mentioned in the last blog ( Not final images, and the way they animate shows up the circle to circle collision checks quite badly, the final images will animate in such a way as to hide that ), the baddies drop an icon which can be shot to select your power-up ( Again placeholders. The final images will be a lot more colour coded to make it much easier ).

I've decided after a long think today, and some great ideas posted in yesterdays comments ( Vex, didn't reply there mate, but I really liked your timer based idea, but I think for a web game I have to strip away complications as much as possible. Too tired to go into depth right now why that idea could be complicated, bug me in the comments if you really want me to justify it ), I've opted for something quite straight forward.A power-up icon is dropped after killing 20 baddies. You can shoot it to change it to a power-up you want, and then collect it. Every time you collect one you boost it's power ( Shown by the 3 new indicators at the bottom left ). Tomorrow ( Today ) I'll add the option to press space to change what power-up you're currently using ( Space was being reserved for a possible smart bomb, but I figure the player is going to have enough fire power as it is ).Also the pulse weapon hasn't been coded yet, so collecting the icon with a little star on will break things. Not every build I post was going to be nice and neat I'm afraid.

I've also played with the difficulty curve a bit, and it's coming together a lot more. I've got at least one more baddie type in mind, maybe two ( And a third has just come to mind, but I've got to draw a line somewhere ), and then I should really be able to have a big push to finalise when things are triggered, how many shots they take to kill, how much energy you lose etc.Also the asteroids themselves may drop point based collectables, as there's no combo system in this game, and I do want to give the player an incentive to move rather than just spin on the spot.

Despite my bloodshot eyes it's coming together nicely now, I'm finally starting to get a real feel for how I want it to play. A couple more days of giving it a really big push and we should be looking at something a lot more final.

I'm starting a reskin of the bowling game I was working on last year ( Working on a reskin of a game which isn't even live yet, that's weird ) tomorrow, the holidays are over so I've spent a good couple of hours this weekend working on X whilst I've still got time / energy.

Some minor things to start with... the credits have been updated slightly to reflect your input, there's a new section on the title screen called "Notes", which is basically just this blog repeated there. In an ideal world there would be a nice audio commentary but that would take an insane amount of bandwidth, so this is the next best thing ( Maybe a youTube clip with developers commentary at a later date ? )It's a nice touch and isn't hard to do. It needs some love as I'm not a 100% happy with the presentation ( It's annoying that it's height > 2880 pixels, which means I can't cacheAsBitmap, which in turns means I can't use a gradient mask on it ), but I think it adds to the game overall.

Next up, the explosions are in their final state. Shoved into tilesheets and dropped onto the stage by directly adding the bitmap ( Rather than using a sprite or mc as a container for that bitmap ), which is a sweet tip that Pany posted here. They're animated by using scrollRect ( To just show a small "window" of the tilesheet ) and look pretty damn good. I've got to convert the player's explosion frames to a tilesheet ( It's painfully boring ), but I'm still mulling over exactly how to blow the player up, so that can be put on hold for a little while.

Along with doing the explosion tilesheets FireWorks was fired up and a lot of the existing final images were compressed as 8bit pngs, which dropped the filesize down a bit.

The homing missiles have been optimised too, seeing how no one flagged up any issues with them from the other build it wasn't really needed but it all helps.

Finally, the first baddie type is in. Nice and small "Flockers", which strangely enough are exactly the same as the Flockers in Orbs. Weird that.

They teleport in waves of 5 in a circle, and I'm pleased with them. I need to tweak triggering the player's shield if they teleport in on you, but aside from that they're pretty much done. Oh, the images are place holders before anyone asks.( Also as I've stressed before over and over, the game play balance isn't done yet. So some levels you'll have cleared all the asteroids and just be sitting there waiting for the baddie waves to appear, other times all the waves will have been destroyed long before you manage to kill the remaining asteroids etc. ).

Next up a bit of a tricky one, ideas are more than welcome. I need to allow the player to get power-ups one way or another.My current thought is to just level up the power-up every level ( The power-ups will all max out at level 5 ), but I'm going to have 3 different types ( Spray, missiles and another one I've not quite sorted out in my head yet ). So how would the player pick which power-up to use ( The mouse wheel would be nice, but then Mac owners are left out in the cold ) ? I'm still in two minds about having a smart bomb, which means the space bar would be used for that.My original thoughts were to have power-up icons dropped like in Polarity, and the player can shoot them to change the type before collecting them ( Think of the old 19xx shooters ). Perhaps that's the way to go, and just level up the weapon every, or every other, level.

I'm loathe to have a shop in there were you can buy upgrades to your power-ups. It's a lot of extra code and design, and will break the flow. This isn't a game of strategy and missions, it's pure score attack. Even with a shop, it would mean the baddies / asteroids dropping credits for the player to collect, and then there would still be the issue of being able to select the power-up you want to use.

The old style collecting tokens and then selecting a power-up from a list is out ( Nemesis and it's sequels ) because there just isn't the real estate on the screen for a list.

I need to play some old shooters and have a think, but really if you have any ideas please comment me up.

This isn't really a "I did all this last night" build, it's what I've squeezed in during the holidays, and is I guess around 8/10 hours work in total, so counts as a 1 day-ish. I'm not trying to be totally anal about how long each build takes.

Now I've actually got to remember what I did. The first main thing I managed to drop in there was the asteroids bouncing off each other. The small ones ignore each other as I think it'll be far too cpu tasking, and too much of a head fuck to be honest ( It'd be like pinball with 30 balls ).It all seems to work quite nicely, it's pretty subtle, you've got to be watching for it, but I know it's doing it and that's enough for me.

In saying that, I think on later levels ( Level 6 seems to be the first real "kick off" level, around that level it feels pretty sweet ) I may have to drop the checks, or at least test for the number of objects running and skip them when there are too many to test.

Next up I added the "waves". Basically, not all rocks come at you at the same time, there's a trigger point where extra ones will be released. This will need some balancing ( Like all the gameplay, which for me is a long way from being done ) when the baddies are in there.

I guess the biggest thing, in terms of the blog title anyway, is the power-ups. Firstly I added the spray power-up ( I don't think I'm going to stick with that name, it conjures up images of dogs and lamp posts ) which is your standard weapon, plus friends. It looks really good when you've maxed it out at [ Weapon ] level 5.For all the power-ups there's give and take. For example with the spray power-up, yeah you get 5 shots at once, but the reload time is increased to try and balance that out. It helps me as the coder because it means the games not running as many bullets as it would be if I didn't increase the reload time and will also hopefully bring some balance to the game ( If you max out your power-ups and you're as hard as hell, how do you still make the game fun ? Do you make the baddies that before died with one shot now take 5 shots to keep the challenge going ? If that's the case, you've not actually got a useful power-up, you've just got more sprites on screen. Do you increase the sheer volume of baddies ? Then you could slip into a grind if their easy to kill. It's always a tricky tricky problem ).

The spray PuP didn't take too long, so I moved onto the homing missiles ( Which I knew would ). I've optimised these quite heavily already, but I still think with 4/5 running with a lot of objects there's a performance hit, and that's why I've left them unlocked and maxed out in the current build, so if anyone whose got two mins could give the game a quick play ( 'til around that magic level 6 would be good ) and feedback on their performance and specs that would be great.If they are generally running crap for everyone ( Fine here, but quad core machine. This baby could run seti@home on it's own, so testing a swf in a realistic enviroment is tricky at times ) then I've still got some ideas to try and claw back some speed whilst still keeping the same look to them.

Hope you all had a good Christmas and got lots of new things to play with ( Left 4 Dead was the best thing Santa gave me, it's the best marriage of "proper game" and multi-player I've ever ever seen. Everyone is going to copy that soon and just ditch the single player mode all together ).

I'm still in a holiday frame of mind, so the posts here may be sporadic as I alternate between working, and eating crap food / watching tv ( I think Olli's the same too ).

There's a new update to X. This is more of a "presentation" build, where I just can't be bothered to try and code anything clever.

The pause mode is in, which is always a nice thing to have done. To try and make it less drab, there's a bit of eye-candy in there, which is a Lorenz Attractor and was ported to as3 from the code at the always excellent Levitated ( I had played with this a couple of weeks ago using setPixel, and just wasn't happy with the results. Rather than let it go to waste I used the bubbles from the depth of field vector effect in 651 and a bit of blur and the add blendmode along with the old faithful infinite bob effect, and it looks ok-ish now. One thought that came to me was the code may be handy for running some types of baddies, could be quite a nice movement pattern and wouldn't require me to think of any more code ).One thing is that I don't kill the animation during pause, so asteroids keep spinning, explosions keep exploding. This is because the use of movieclips is only a temporary measure, I'm going to wait til we've got final assets before ripping that code out and using tilesheets instead.

The other major chunk of work done is the stats / medals. The medals needs some images drawing for them, and then code to actually trigger them in-game, but all the internal guts is in there. The stats I think are done now, which is cool. Just don't get too attached to them, as every new build will reset them.I've also added some stats to the level complete section ( I've been brainwashed waiting for things to load on the 360, where they display tips / stats to help you forget you're waiting ) which I'm really happy with.

Following on from a comment from Tonypa, the current level is now displayed, and a level progress bar. I've noticed a lot of casual games show the level progress ( Zuma, Luxor2 etc. ) and it's a simple nice thing to have. It's maybe not that useful now, but perhaps if the asteroids were to come in waves later in the game ( That's a clue btw ) ?

Always a great milestone, when you can play a game, complete a level, die x number of times, read "Game Over" and start it all again.

This to me is when a game is a game, and X(++) has just reached that sexy milestone. Ok, it's not a great game yet, it needs a lot of balancing, and it needs some fun desperately, but it's a game.

Adding the asteroid to player collisions was pretty straight forward, just simple circle to circle checks. I wanted the player to be forced away from the impact, and it works quite nicely. Seeing how the code was written, I used the same bounce code again for when you're shooting an asteroid ( So your bullets actually push the asteroids away slightly ).It's a little bit weird shooting an asteroid via the screen wrap, as you kind of suck it back towards you, but hopefully shouldn't be too much of a pain to fix.

Next up was making the energy bar decrease. Simple code. Looks nice. Just how code always should be. After that the next logical step was to blow the player up. It's a movieclip, it doesn't get any more straight forward.That left me with the issue of what to do with the asteroids still on screen, and as I've done in what feels like far too many games, I've added a heat shimmer / wave to the explosion, which blows up all the rocks as it grows.

Another nice simple solution ( I'm not trying to get a rocket into space here ).

From there, it's not much more than

if(--lives<0){ gameOver();}

And we've got a game. Sweet.

I don't know how much work I've got in me before Christmas, a couple of days off eating like it's my last day on earth and sitting in front of the tv sounds just perfect right now. Even if I don't do anything tomorrow, we've got a really great guest article to post up, which we're really excited about.It's nice and apt for this time of year too, I mean Zombies are good all year around aren't they ?