Sunday 28 April 2013

Art with Audio


So, another weekend gone. This week I've put art and audio together, by which I mean I applied some of the algorithm to the arty-farty elements of the game.

Bare in mind the beats are not synced correctly and obviously they don't yet have any collision detection for them to be collected. But for the most part, I guess you can get a better understanding of the concept =).

Here's the badly recorded, 30 FPS video:


Friday 26 April 2013

Fullscreen 60 FPS - The ultimate mobile milestone

60 FPS is that magic number that makes gaming look and feel great, but achieving this on mobile devices has been a rather large challenge for a game that has fullscreen, graphically heavy gameplay.

There were a number of ways I tried to get it running at 60 FPS on iPad 2 / iPhone 4 and after the 4th attempt I've cracked it!

Attempt 1 & 2:
Firstly I started out thinking that all I have to do is create a bitmap the size of the screen and then let the built in actionscript "bitmap.scroll" method do the leg work. But no this was probably one of the worse results I received during the tests (around 21 - 25 FPS on iPad mini). Shortly after this I thought maybe making the bitmap size a power of two, so rather than 1024*768, 1024*1024, but nope, still no good, in fact worse.

I assumed that the GPU would automatically handle all the lengthly calculations - which is does in a sense but the blasted Flash DisplayList kept on rending it's dirty regions - filthy displaylist!

Attempt 3:
I then looked into using Stage3D (AKA Molehill), as using the stage3d features in AIR on mobile directly utilises the GPU. So the theory is that I generate a quad from two triangles and texture the quad with bitmapdata.

It worked a dream, but it was the "uploadTextureFromBitmap()" method that killed it this time. Even though there was no display list being used, parsing the bitmap data each frame to the texture on the quad was still too heavy but was a vast improvement - 31 - 40 FPS.

Attempt 4:
So scrolling bitmapdata is too heavy as the fullscreen displaylist has to be updated every frame, stage3D doesn't quite meet the mark - what's next? Fullscreen? does it need to be? Yes, but wait...

I went back to the original method but this time rather than scrolling the bitmapdata, why not scroll a bitmap object- or more accurately, why not scroll multiple bitmaps objects? Turns out creating more bitmaps was the key.

I've created a grid/array of bitmaps, each bitmap being 256*256, enough to fill more than the screen, each bitmap object is then cached as a bitmap (bare with me). This means that when the bush is over a section of this grid only a 256*256 section of the screen is being updated because of the display list, the rest is cached (because i set the object to be cached) and handled directly by the GPU. 60 FPS - BOOM!

All that was left to do is to reposition the bitmaps when they go offscreen to wrap around again so stop the need to create new ones every time a new row or column of bitmaps is required.

I've put together a short video to demonstrate how the new method is working (also offset the bitmaps so you can see that they are being removed and repositioned, and also coloured them so you can see the individual bitmaps themselves).

The video is recorded at 30 FPS, but a promise you it's running at 60 =).



Sunday 14 April 2013

New Brush!


I've cracked the brush technique, it's 4:07am here and I have dentist at 9am, gonne grab some sleep and I'll explain later!

Comparison Video:


Saturday 13 April 2013

The AudioBrush Blog

Hey Everyone,



Doesn't every indie game have some sort of blog? Well at least all the good ones usually do, so I guess to make AudioBrush good I need a blog? - RE-turd logic.

Anyhow, for those of you that don't know AudioBrush it's something that has been in my tremendously lacking arsenal of games for a while, it's a rhythmic, artist, beat detection game. Back when AudioSurf was released on Steam I couldn't stop playing it simply because every time I played one of my favourite songs on it i thought - "man, why didn't I come up with something as awesome as this".

Meanwhile in my jealousy I learned ActionScript and started playing about with sounds, waveforms / FFT etc. Whoopty-do I made a few EQ bars bob up and down.

Eventually (2009) I was able to put together something which at the time I thought was a few levels higher than Superman 64, which is pretty shyt for those who don't know.

It wasn't until the beginning of 2012 when some random Mancunian guy that I was working with said - "dude, this game is pretty awesome - why don't you put it on iOS".

IDIOT!!!!

Upset by the fact that this; unable to speak properly, guy from manchester, came up with a somewhat good idea I pursued this chance and the next day AudioBrush was on iOS (privately).

To keep this shorter than it's going to be if I continue on with life stories - cutting a long story short, I;ve been on and off the development up until now and much more progress will be made in the coming weeks.

Here are a few links should you be interested:

AudioSurf Website: http://www.audio-surf.com/
AudioSurf Gameplay: http://www.youtube.com/watch?v=LRlHcAhUMY8

Superman 64: http://www.youtube.com/watch?feature=player_detailpage&v=1dJXgJ1c4vY#t=274s

AudioBrush Playlist: http://www.youtube.com/playlist?list=PL5BADA93CB15EEAA1

Below is a video of how the new algorithm for AudioBrush works.