Blockshooter is the third game to come out of Kotaku Australia's Game A Week feature. If Game A Week is new to you, I suggest you give Zafehouse and Wizkill a go. Both of these (and Blockshooter) were coded in seven days by your resident Kotaku AU editor (in other words, me).
Blockshooter is a combination of Breakout and Space Invaders. It's your job to pilot a little ship, shooting at coloured blocks that come your way. Shooting multiple blocks of the same colour will award you a point multiplier. Destroying entire segments will drop a "piece", which can be collected and added to your ship. You lose points by getting hit or allowing blocks to slip past you.
That's the nuts and bolts of it. If you'd like to give it a go, hit the jump for a download link and developer's diary.
PS. Yes, this has come out on Monday instead of Friday. I've decided to shift the Game A Week schedule by two days, so I can have the weekend to playtest and debug. Don't worry, I'm sticking with the whole "seven days to code" requirement.Download Blockshooter V1.0.
If you're running Vista, you're ready to go. If you're running Windows XP, or get the error "App failed to initialize properly (0xc0000135)", you will need to download the .NET Framework 2.0.
Blockshooter was by far the most painful game to develop. Not only did I have gameplay issues, but technical ones as well.
In the perfect world of game design, one should be able to come up with a concept and be able to implement it without having to worry if it can actually be programmed. Case in point: I wanted to code a shoot em' up that combined Breakout with Space Invaders, but at the same time, not use graphics.
Fortunately, I had a solution - I would use controls in place of sprites. If you're not familiar with the term "control", it simply refers to any element of a Windows "form". This can be a button, picture box, text box, label, etc. All you have to do is set a background colour, manipulate the control's position during runtime and bang - you have graphics... of a kind.
The trouble is, controls aren't really supposed to move during runtime, so I had significant performance issues. Even on a dual-core 1.8GHz PC with 2GB of RAM, early prototypes would slow to a crawl if more than 16 blocks were moving on screen. I had to find a way to either a) optimise the movement of blocks or b) reduce the amount of blocks. In the end, I placed blocks inside group panels, and just moved the panels instead of individual blocks. Of course, this broke the collision detection code, and I had to make a custom control to fix it.
Sadly, Blockshooter became a collection of these "hacks" to make the Windows GDI a gaming platform. As you can see by playing, it all works, but I get a little sick in my stomach when I look at the code.
I'm also not happy with the shipbuilding interface. It could be a lot more user friendly. I'm hoping everyone gets the hang of it, but I'm not expecting them to. I had to rush it, thanks to the technical issues I had with the GDI. I might do a revamp in the next few days, but I'm really keen on my next game, which I'll tell you about soon.
Long story short - don't use controls as sprites. It's messy.
If you'd like the source, just hit me with an email.
Download Blockshooter V1.0.