As a quick follow up to the last post where I was trying to fix the tiny slow down in the game I had a bit of a break through. Reducing the size of my pooled objects made a really large difference ( I was just pre-pooling too many items, mainly as a safety net ).

With those pools reduced it's a lot smoother now, which I'm pleased about.

Set up a twitter account for the game ( @DN8Pulse ) , as I think it's going to be an easy way to get quick feedback from players.

And to hopefully finish off the twitter / social stuff I've added a "Tweet your score" option to the game over screen. I thought rather than just a bland text tweet a custom image may be cool, and that's what you can see above there.( It's all done using Movieclips and Sprites in Flash, so didn't take a fraction of the time to have done it in Starling, and it's just so nice being able to layer and position things in an IDE ).

I've just finished the Orbs power-ups, these are two droids that spin around your ship blocking baddie bullets. If a bullet hits one rather than just being destroyed, it's rebounded back at the baddies, which should hopefully be slightly more than a nice touch.

A bit of a slow week really, more focused on the fluff rather than getting levels and baddies in there. There's still more to do than I'd hoped for, it should be coming to a close now.

On the weekend if I'm working I like to count it as "Treat days", where I get to dick around with things I don't really have time for.

This weekend I updated the skybox to a much nicer collection of 1024x1024 textures and to celebrate I added some parallax stars.

The stars had to be away3D sprites as they needed to go behind the planets ( That took ages, 3D positioning isn't my strong suit ).

It looks lovely with a 100 stars, really nice and subtle, but as ever the iPad isn't going to cope with that. When I was testing though I did notice a one frame hold up when a baddie was killed ( The new stars actually really helped with the testing of this, I could see them jitter, which is something which I was missing with just the planets / skybox in there ).Today has been spent trying to optimise things to avoid that judder. It was a case of removing every element of the explosion until I found the bottle neck, which it turned out are the particles.

So I've removed one of the explosions ( Down to 3 from 4 ), capped their max size as they grow in size depending on the beat of the music, reduced the number of particles which are belched out and done some loop unrolling in Starling itself.

A couple of things I noticed, with the particles I could pre-calc pretty much everything, their speed / rotation / speed and store all those values in Vectors in the constructor so their actual movement / scaling is just a case of getting values from a Vector, which helped. The code per particle is really cut down now.

Also with my alteration in Starling to keep the visible / invisible display objects in their own Vectors ( More here ) I found that there could be really large loops due to the number of children in the game, so I've unrolled some loops there. I think I need to do some more work though, as triggering 34 particles at once means a lot of looping to move the sprite from the hidden to visible Vector. There's got to be a smarter way to do that.

All these amends still haven't got rid of the tiny judder, I don't think it's going to be possible and I'm not that gutted about it, I'm developing on the slowest on the market iPad ( 3 ), and I added an additional check that if there are more than 20 particles running at once then I hide these new sexy parallax stars. It may sound nasty, but they're really tiny and it gives the impression that they're blinking ( Also if there are explosions kicking off on screen you're not going to notice anyway ).

Have I go time to mention retro mode ? No, ok, let's save that for now then.

At present with the game I'm trying to do as many of the boring things as possible, they're going to need doing so let's kill them off in one painful hit.

So yesterday was the pause mode. Now user acquisition is a thing I need to think about as this is a mobile game, rather than a Flash one that will get traffic almost in spite of itself, and the cheapest way to do that is to leverage social networks ( Shit, I'm starting to sound like all the blogs I've been reading recently. Just don't get me started on Customer Lifetime Value calculations ).

Rather than shoehorn a "More games" link or banner ad to the pause mode, I've added the ability to tweet a screenshot.

My never used personal account, a victim of my own spam.

I'm quite pleased with it, it has a nice taking a photo effect along with a picture frame, it looks pretty good. Ideally I'd like to be able to let the player mess around with the image like the screen grab feature in AAA games, but I don't know if only one person in the whole world will use this, so it's best to focus on what will be used rather than what could be.

And that's the Game Over and pause mode done. Hopefully next week will see more levels ( I've got to drop the bosses in yet, which I'm looking forward to ) and the final player power-ups.

Ok adding the Game Over stuff may not seem such a big deal, but it's an essential part of the flow. It's almost a complete ( Rather than finished ) game now, we only need the game complete sequence, which I've not really thought about yet, and that'll be it, the flow from start to finish, which is a great milestone to get out of the way.

The other part of doing the Game Over sequence is that it's a way to test that all your house keeping routines are working, that sprites and particles are being properly killed and put back into their pools etc. I know that happens between levels, but it's still important that the game can transition from title screen > game > title screen again with nothing breaking and everything nice and clean.

You'll notice the blurred baddies. I did try Starlings blur filter in a vain hope that may just be powerful enough, but it gave me 20fps on desktop, and as I keep the level playing in the background it just wasn't going to work. I did find a good looking alternative on the Starling forums ( http://forum.starling-framework.org/topic/code-much-faster-gaussian-blur-implementation ) but by that stage I realised it just wasn't going to be practical to perform a real time blur on a ton of objects.So I cheated, and just exported all the baddie sprites and bullets with a blur, and adding them to the sprite sheet. We're doing fine in terms of GPU memory, so although it's a little extravagant we're no where near to hitting any hardware boundaries.

...where the whole internet seems to competing with itself to be as unfunny as possible.

Fucking April Fools Day, a vacuum of humour.

Anyway we've not posted anything for a while, sorry, I've been a little under the weather, so not been as communicative as normal.

Lot's to update you about, I'm sure I'll repeat myself and / or forget some things, so let's just plough headlong into it.

I had a weird bug where the game broke and baddies just kept exploding, and it looked awesome, so I've actually altered the explosions to emulate that bug and they look much better.Yesterday I altered the particle effects slightly so they slow down and that looks better too ( Had a play of Geometry Wars for inspiration ).

I've started adding in the player weapons, I think I'm roughly half way through that, the "Pods" are pretty cool.

Adding these meant updating the baddie bullets / baddies themselves so they have collision checks against them which doesn't seem to have hurt performance.

So we've got more weapons in there, the first 5 levels are done ( I discovered Flash' BezierSegment which has improved the paths a lot, both in terms of how they look ( As I was only using one control point ) and the speed it's all calculated ), but the big thing was...

I redesigned the level select system. What a massive fucking pain in the arse that was to do in Starling, I think 3 whole days was spent on that.

Yesterday I had a bit of a break and played with getting the game running on Android. It's almost there, but there are some issues with the FLV playback. Because I'm using the normal display list to show it I just can't get it to position correctly on the different sized screens ( The game is 1024 x 768 for iPad, whereas the Nexus7 is 1280x736 and there are a couple of other oddities you have to take into account ), I even tried using percentages like in html, but no joy. So I'm going to have to re-do that. Joy.

So for now it's just a case of throwing data at the game, I need to finish the player power-ups and adding the levels, then it's sound, remaining UI and Game Center / ads integration.I want this gold in two weeks time, so I'm in two minds about adding the challenges, they may be a post launch update just so I can hit the deadline ( It may be a case of skipping the challenges for iOS, putting them into the Ouya version to give some added value as we'll be charging for that, and then retro-fit them back into the iPad game. I'm not sure yet, we'll have to see how we're doing for time ).

Well the past couple of days have been literally too boring to write about, so I've condensed them up.

The game needs analytics and after trying with Google and having no joy I went with Flurry. Something I've wanted to do for ages ( Way back to the CronusX days ) was to have a 3D globe showing the geographic positions of players, so the past couple of days has been spent playing with that.

Check out this pitiful screen shot.

Yeah, that's me right there.

I'm hoping me adding comma's to large numbers doesn't prove to be a waste of time. So the display side of it is in place, next up is handling load errors and giving the player some feedback whilst it pulls the data in, and then the rest of the stats ( Which I've not really thought about yet, in a shoot 'em up like this there aren't too many available ).

After this is finished I'm going to tackle more of the UI stuff, it's the part I like least ( And isn't the most fun in Starling ) so once all that is out of the way it's a case of dropping in the levels and the fun stuff.

Today was the start of the big UI push, which I've been putting off. One thing I really wanted in the game was video clips to show the different power-ups so the player could select which one they preferred and could see it in action.

As we're using a combination of Away3D and Starling, I can't use stageVideo. Because it's always displayed beneath everything means trying to cut a mask out would just be a nightmare and not even worth thinking about.

My first thought was to use a sprite sheet, just load it in on demand and update a sprites texture every frame to make a cheap and cheerful video clip.

I made my grab ( Using Screenflow, OSX only I'm afraid, but the best there is ), imported it into Flash and spat out the png frames. Nope, even with it just being 256x256 it blew the 2048x2048 texture size and it was only a short clip.

Ok, let's try FLV using the native display list. It's probably going to run like a pig but best to test these things. Unbelievably it performs well, the clip is really high quality albeit small, but it worked much better than I thought.

Cool, problem solved. Let's just get it looping and... hang on, what now ? Looping it ( Check for it to be finished via an event and then tell it to seek(0) ) makes it glitch really badly, there's a delay, sometimes a fraction of a second, sometimes a whole second. It's a 68k clip loading from a SSD, and it's not streaming quickly enough at the start. For fucks sake.

The solution I came up with was to make a feature of it ( As I'm not going to be able to fix it ).

I grabbed the last frame and used the excellent ImageGlitcher to make it look distorted on purpose. Not ideal I know, and I'm going to have to screw around doing this for every different clip and manage all that, but the best I can come up with.

I should really comment about what a fiddly pain using Flash's own perspective is and trying to align that with an image in Away3D ( Or just trying to get a grab that's loopable ), but I've been moany enough for one post.

The past couple of days haven't been the most productive. Some of my linked list related speed ups came back to haunt me, so lots of time spent looking at Scout and swearing.

Next week I'm going to have to crack and work on the UI, which I'm not really looking forward to as it means both design and boring coding, so today has just been simple things, code speed ups to try and replace the ones I lost due to the above mentioned weirdness and I added the force field in.

Performance wise I'm happy with the game overall, it's not always able to stick to 60fps but that's on an iPad3 so not the end of the world, and there are still some ways to try and eek out some more performance ( It's never really bad to the point of affecting the game play ).It's going well overall, I'm just spent this week, it's been a long one with lots of bits here and there to deal with ( Fixes to the html5 game, pitches to quote for, Skype chats to have etc. ).

Just a quick update today, in fact I think this grab will pretty much cover off what was added today

The bullets graze the player ship ( See those grey ones ), but don't actually hurt it yet ( The collision checks are in, they just don't call anything ), so tomorrow we'll get the player ship getting destroyed and we're that bit closer to it being a real game.