New Year’s Resolutions

No Comments

  1. Teach myself using GIT for source control. Start the move away from SVN
  2. Start using Unity for my game dev noodling. Especially now that it contains native support for 2D. Finally wean myself off XNA.

Check back in a year and see how I’ve done.

Some Poker Chip Artwork

1 Comment

For a long time I’ve harboured thoughts of doing a poker game. This probably seems quite silly given the plethora of poker games currently available on any given platform. But, believe it or not, I’ve not been able to find one that captures all of the features that I would like. I mean, I’ve seen all of those features implemented in some way, shape or form, but not all together in the one package.

So with that thought floating around the back of my mind I tend to keep half an eye out for art assets that may or may not come in handy should such a project ever grow legs. Said assets need to be of the appropriate price and licensing though. So far I’ve picked up various styles of chips, some decks of cards, some buttons and some felt / tables. Basically the reason I look for assets rather than creating my own is because my drawing skills are bloody hideous.

I’ve not been happy with the chip assets that I’ve accumulated. They are either a bit meh or not marked with denominations or too few denominations are available. I had a more concerted look over the weekend to see if I could turn up any better. While I couldn’t generate the correct combination of key words to get the result I was after (It’s pretty hard to not have search results spammed by gambling site hits), I did happen across this post made in the forums: Linky

I previously had no idea that plugins like this existed, or even how to figure out that I actually needed them. So anyway, I had a bit of a hack around and created my own chips of the denominations that I wanted. And given that I struggled to find any, I thought I’d post what I did here in case others had a use for them. So the below images are 96px png versions free for your use should you want to.

Dev Diary–Retrospective II

No Comments

AKA The Beauty of Design

Or something like that. Whilst this wasn’t the first game I’d designed by any stretch, it was the first one I’d done where I actually had a strong idea of how I was going to complete and then release it. I even registered for last year’s Dream, Build, Play competition when the game was about halfway done (the easy half, natch) thinking that was a reasonable goal (entering only, not winning, obviously).

As stated previously.I had written a few clones, read a few books and done a bunch of tutorials so I was reasonably confident of the approach. When I laid out the design I was careful that there weren’t any of what we used to call SMHH boxes back in my consulting days. SMHH standing for “Something Magic Happens Here”. I was very conscious of not making the typical noob mistakes of biting off more than I could chew or scope creep. I was far too smart for that! (Yeah, right.) So I drafted out the design and for the most part ruled a line under it. That was the scope of work.

I want to talk more about the philosophy and tools that I use when scoping out a game, but it feels like there is an entire post there, so I’ll hold off for now and talk about that next time.

At it’s core, this game was a retro space shooter. It borrowed gameplay elements heavily from Galaga and 1942.

For game progression, I wanted to take a discrete levels approach. Like in Galaga, the aliens would fly in in groups and form up into a squadron formation prior to commencing their attack. Once the player had killed all of the aliens, the level would be cleared and the player would progress onto the next one.

Back in the day, when I was in the military, we always used to joke that there was a cell at headquarters whose sole job was to think up stupid names for Operations, Exercises and Projects. I mean, there was actually an annual exercise with the US Marines called “Tandem Thrust”! Based on that experience, I thought rather than just having “Level 23”, etc. be displayed when a player started a new level, I’d display “Battle 23, Codename: Operation Desert Credenza” for example. Something that would add some humour and hopefully help encourage the player for ‘one more level’.

One of the things I loved from Galaga was the little insignias on the gameplay screen to denote the current level, and how they ramped up at milestone levels. I decided to leverage this approach also, coding the current level number into variations of military rank insignia and displaying that in the bottom corner of the gameplay screen.

I decided to add the ability to fly up and down, as well as just side to side. I thought this was necessary given my intent to release power ups to be collected by the player.

I wanted to increase the difficulty as the player progressed through levels in different ways. One way was to make the aliens gradually stronger, meaning it took multiple hits to kill them. Incorporating the concept of health or damage in enemies means I needed a way of communicating this information to the player. I didn’t much like the idea of including a little health bar display for each enemy. I thought it would add too much clutter to the screen. The idea I ended up settling on was a simple custom pixel shader where I would pass the health value of the enemy to the shader through the tint alpha channel during the drawing of the associated sprite. The shader would adjust the saturation of the sprite’s colours from full colour down to monochrome, depending on the health of the enemy, i.e. 100% healthy meant full colour and about to die was completely monochrome.

To help the player combat these strengthening enemies, I planned on having a choice of four weapons to be available to the player; normal bullets, spread shot, laser and incendiary. The player would be able to change weapons by collecting a weapon changer power up. The power up would cycle through the four weapons encoded via colour (blue, red, green and yellow) and the displayed colour at the time of collection would determine the weapon now in use.

As well as the weapon changer power up, the game would periodically release power ups for health, 1 up and weapon power up. The weapon power up would increase from an initial level of 1 to a maximum of 10. This would be represented by multiple bullets or more power as appropriate to the weapon type.

In terms of designing how the game releases power ups, I was in multiple minds of which approach to use. I reduced my options to three:

  • Levels have “magic” enemies. The level design denotes which enemies are magic, being when they are killed they drop a predetermined power up.
  • Event based manager sub system. A more holistic approach over the entire game, releasing power ups as certain criteria are met. Allows for easier tuning and taking into account player progress for different difficulties.
  • A Diablo style loot drop algorithm. Each enemy type would define a chance to drop value. Should the number come up, a power up would be dropped. I was leaning in preference of this technique, but that was more because I wanted to try implementing this type of system. Winking smile

There was a game I remember playing a heap of on the Amiga 500 called “Flood”. One feature of this game was that periodically when you went to shoot, instead of drawing your gun, you would draw a chicken! This concept has stuck with me for the better part of two decades. So I wanted to incorporate some sort of chicken gun, which turned shot enemies into chickens or something.

I wanted to have different types of enemies, each with certain characteristics, e.g. strength, speed,  and attack style. All enemies would be based upon the bug theme visually. I figured 10 types would be plenty. If a new enemy type is introduced every five levels, that’s 50 levels before everything is seen!

Typically these types of games use the concept of ‘lives’. The player gets hit, they lose a life. I decided to implement player lives through a continuous health / damage representation to make it more realistic. Yeah, I know.

For explosions I wanted to use a particle engine rather than animations.

Achievements / trophies / awardments are a necessary part of any modern game. I wanted to incorporate some internal ‘cheevo’ system as I think they encourage repeat play. Continuing with the military theme, I designed up each cheevo to be represented by a medal or service ribbon.

I played an awful lot of Diablo 2 over the journey. Having a ‘secret cow level’ seemed like something that would be fun to include as an Easter egg.

I deliberated about including shields and a shield power up for some time. I had it in and out of the design for some time. Eventually I removed it. After all, a shield is essentially identical to a 1-up in terms of game play, so I went ahead with that philosophy.

So there we go. A nice simplistic design with no hint of scope creep. Smile with tongue out I decided to name the game “Super Space Mega Boom”.

Dev Diary–Retrospective

No Comments

Development diaries for independents are a funny old thing. A lot of people do them and they can provide a terrific source of information to other like minded developers. I always thought I’d write one should I ever do something I felt was interesting enough, but at the time I always thought everything I had done was pretty mundane.

However, recently I’ve had cause to reflect over what I’ve done the past year, to consider what I’ve actually achieved versus what I was “gunna” do. And as such I think some of what I experienced might actually be worthy of mention. So I figured I might write up some ‘retrospective’ dev diaries and hit some of the high points from the last year as well having a laugh at some of the low points.

Back at the start of ‘11 I was just finishing up in my current gig as the Systems Development Manager at a tertiary college. In gamedev terms I had trodden the usual noob path. I had come across XNA game studio late in ‘08 and was dabbling in it as a fun way of maintaining my C# skills while working in management. I had done a bunch of tutorials. I’d written clones of games like Pong, Tetris, Space Invaders and Yahtzee. Heh, when I did the Pong clone, I called it “Stink”! Get it? Yep, I’m here all week, try the veal.

So I figured the time was right to try something a little more creative.

One early piece of advice I remember getting was “write the type of games you like to play”. This makes a bunch of sense, how else would you know what’s fun and what’s crap? Trouble was the games I like to play are strategy and simulation type games. Pretty complex and at this stage of proceedings I knew anything like that was well beyond me. I’ll talk about how I came to that realisation in a future post. It’s a wacky adventure chock full of typical noob assumptions.

Back in the 80’s, Galaxian and then Galaga were my favourite games. Later on I got into the vertical shooters like 1942 and the subsequent clones. In 1990 when I first joined the Air Force, we had a vertical shooter video game in our barracks rec room. It was essentially a space themed clone of 1942 and I’ll be dammed if I can remember the name of it, but all of us pumped plenty of 20c coins into it. Apart from the usual collectables for weapon power ups, shields, bombs and 1ups, this game also would release a weapon changer collectable. This item would pulse between the colours red, blue, yellow and green, with each colour relating to a style of weapon. So it required an element of tactics by the player to time their collection of the item to gain a preferred weapon. The weapons were normal bullets, spread shot, explosives and lasers, each with their strengths and weaknesses.

So I decided that the first “proper game” that I would write would be based on Galaxian while incorporating the power up collectable features of vertical shooters.

And I’ll talk more about the design of that game in the next post. Smile


Alien Aggressors Tutorial

No Comments

Here’s a vid of the result after I completed Nick Gravelyn’s excellent Alien Aggressors tutorial. You’ll notice that I used my own artwork instead. You won’t notice that I also used my own sound effects because I haven’t yet worked out how to record sound with the video capture software I’m using.

My Alien Aggressors Video

I can’t recommend this tutorial highly enough for someone just starting out in the world of XNA programming. It covers a number of key concepts and Nick has done a fantastic job of explaining the process in the text. I don’t know how he had the patience!

I still had trouble getting the penny to drop in regards to visualising game states, but this post from George Clingerman gave me the leg up that I needed.

I plan on coming back to this game later in the year. I want to try to expand it to incorporate some ideas from a vertically scrolling shooter. So we’ll see.


Back on the XNA Horse

No Comments

Well after the house move, I finally got back into some XNA coding. It’s probably been close to two months since I last did any. So I picked up where I left off, being working through Nick Gravelyn‘s excellent Alien Aggressors tutorial. I was up to the stage where I had the basic gameplay implemented and was ready to start on adding the menu system. So on Sunday I was able to get a reasonable chunk of time into it. I’m now not too far off done – I’ve just got scoring, continuous levels, sound and options to go, which I’m aiming to finish this week after work.

I want to use my own sound assets rather than the ones provided to practice how to do that (I’ve done the same with art assets). I’m not going to implement any background music, as the first thing I do with every game I play is to mute the background music, so I’ll be enforcing my Nazi like disdain of background music on games I write myself. At some point down the track I’ll figure out how to stream local mp3 files and that will be my sole foray into background music.

I was pleasantly surprised that even after the downtime, and that I am still very much learning the basics about XNA, I seemed to pick things up again quite quickly. I think it helped that in the interim I kept reading and regularly visited the XNA Forums. There are still a couple of things that aren’t quite instinctive for me yet, but these are mainly in the area of logic used for graphic placement. This doesn’t concern me too much as I think once I start working without training wheels, bugs in that area tend to be visible in nature and the logic required to get it to work correctly will quickly become intuitive at that time. I think this is just due to the nature of working through a pre written tutorial. You (at least I) don’t get a mental picture of where the sprites will appear purely based on the logic I type in.

All this is a precursor to me getting to the skill level required where I can attempt to implement my own turn based strategy game. Once I complete this tutorial, I want to work through the 2D tutorial from the MSDN library. Both these tutorials are similar in genre (2D Space Shooter) but I want to contrast the programmatic styles between the two. A dude who programs XNA regularly and is an MVP vs the official MSDN style.

After that I want to take the training wheels off and try to develop a very basic pre existing game to see how I go. Under advisement I’m looking at a Pong recreation for the first go, and Tetris for the next go around. From there I will revisit Alien Aggressors and have my first attempt at implementing original (read my) gameplay ideas.

I have a wiki where I note down various ideas about the various XNA developments that I’m undertaking as well as some basic completion status once I break the ideas down into a task list.

I’m following the Alien Aggressors tutorial faithfully (except background music) through this first phase even though I’ve picked up a couple of irritants. I’m holding off on addressing these until I come back to extend the game with my own ideas. These are only basic, minor things and I hope it’s a sign of my growing understanding that I’m picking it up. The first is checking for valid user command actions in the various state classes, for example in the menu, checking for Gamepad1 Button A or Gamepad1 Button Start or Gamepad2 Button A or Gamepad2 Button Start or Keyboard Space or Keyboard Enter to handle a menu selection. I’d prefer to abstract this away into a helper class and then only query a user input valid selection from within the state class and let the helper class work out what actual buttons constitute that command. I conceptually think that this will also help if I get to the stage of implementing user defined keyboard controls. The other quibble is that if you play in co-op mode without a gamepad, both players are synced to the same keyboard input. It confused me early as it appeared that my player 1 ship had stopped rendering, but it was only due to the fact that the player 2 ship was rendered on top of it and their movements were identical based on my keyboard commands. Once one died and re-spawned the ships were separate, but still moved to the same commands. Also, while the ships occupied the same space, a bullet impact would only kill one of them. I’m not sure whether this is logical in a purely 2D world. So I’ll look at changing these when I come back to it.

A final note, I departed from my title while coding this and had a glass of the bear instead.


Yay – Holidays for me!

No Comments

So yah – now that I actually have some money again, I’m in the position where going off for a brief holiday is again a fiscal possibility. I’d sort of promised myself that I would get  away for a bit once the house sold and I settled in in the new digs. So I’ve been there for about 6 weeks now (although unpacking has progressed pathetically slowly, but that’s another story).  So looking through the work schedule for the rest of the year, I found that if I didn’t take leave before the end of September, then I wasn’t going to be able to take any before the end of the year. So I needed to move fairly briskly. So with the leave secured I needed to figure out where I wanted to go.

As I’ve been feeling pretty run down, and been sick through a lot of winter, the idea for this holiday was just to go somewhere to kick back and re-charge the batteries. So I was never planning some great overseas bonanza where I would feel obliged to make the most of it and trek around taking in all the sites and doing the general tourist thing. So I was thinking along the lines of somewhere I’d been before and enjoyed. I was thinking of places like Darwin, Cairns, the Gold Coast, the Sapphire Coast, etc. I had a shortlist of about 10 that i was working through to come up with a winner. Spoke to some friends for advice. But when I was quietly pondering, I decided on an area I hadn’t been before but always wanted to go to – The Blue Mountains in NSW. I had wanted to visit here for years, particularly when we lived closer, but never got there for reasons, various. So I’m off up there for a long weekend – Friday to Tuesday.

Now – how to get there. Simplest is fly to Sydney and then hire a car. Would be nice if I can use frequent flyer points and fly for free. But there are no frequent flyer seats into Sydney of a Friday unless you want to arrive in the middle of the night or at sparrows fart. And I was a whisker short of points to fly business class so Booo!

While I pondered that, I thought I’d sort out a hire car. I wanted to hire something interesting, but to my dismay, all the hire companies basically all hire the same cars these days, which are shitbox pacific rim cars, or shitbox Australian cars. It’s really bloody annoying. I mean I understand the Hyundai Getz as a cheap super mini, but the next layer up was all Kia Cowpats and the like. Those types are the only choices unless you go full size, which I didn’t. Full size though was no better, with standard Falcons and Commodores the norm. And that’s what I drive now, so boring! The luxury / prestige option was a Statesman, which is huge and still a shitbox. What’s wrong with offering a 3 series BMW or C class Merc? Only a few years ago you could hire an X class Jag, but no more. So Booo there as well.

I tried Europcar, which is a misleading name as most of their cars were the same list of shitboxes as elsewhere, but at least they had a few different offerings. A bit of unintentional comedy from their website, listed the Audi A3 Diesel class, where a typical vehicle was a Peugeot 307 :)

So I thought an Audi A3 would be just the job. The daily rate was OK – about $77 per day so I worked through a quote. Then the extras started to pile up. $80 surcharge for a ‘prestige location’. This is apparently because I wanted to collect and drop off from Mascot, and this is a transference of the fee Sydney airport charges for the hire company to have an office on site. At $80, it would be cheaper for me to get a taxi to the CBD office and collect it from there, tolls and all. But they probably have a different charge for that! There was another charge for some other bloody thing. And then there was the insurance!. Now I’ve never used Europcar before, and I haven’t hired a car for ages so the memory is a bit hazy, but I seem to remember that insurance was a flat amount on top, and while a rip off, was bearable. These guys quoted about 4 different flavours and were an additional per day charge. So if you wanted cover against flat tyres, and broken windscreens or headlights, as well as reduced excess in case some uninsured fucktard drives into you, then it was an additional $35  per day! Or to put it another way, 50% of the starting hire cost of the car. All this added up to about $650 for 4 and a bit days of hire car, which smacked a bit of a rip off. I’m mean, I’m happy to pay for quality, I’m happy to pay for convenience. I’ll even cop a rip off if it serves to my end. But this felt a bit like copping one up the date without a reach around.

So that leaves me with the option of the road trip, which I really didn’t want to do. I mean, I like driving and I enjoy the road trip, but this is a fair distance to and fro and will cut into my sitting on my arse having a scotch time. I’ll see what else I can manage.

For the second long weekend, I’m catching up with some old mates to stomp some brain cells and howl bare chested at the moon. Had the same story with frequent flyer flights on the Sunday, but this time I did have enough points, so yes please I will fly business class. Thank you.

As I wanted to have a computing capability while I was away, I was looking at laptops. Now I’m firmly of the school of thought that a portable computer should be truly portable first and foremost. If I need a big beefy computer, then I’ll just get a desktop. I have a work laptop, but it’s a massive Tecra A9 and weighs about 3 tonnes so I wasn’t interested in lugging that thing around. I was looking at a tablet, but those things are a bit pricey still. After talking with a few people and isolating exactly what I wanted to use it for, a beefy netbook with increased RAM looked like it would would be just the story. So I picked up an Asus eeepc 7000HE and upped the RAM to 2 GB. It’s light and has a long battery life and will be able to handle all I want to run on it. I can even run Visual Studio on it.

Part of what I want to do while off is to do some XNA stuff, so I’m planning on finishing off the tutorial process over the next couple of weeks and then try my hand at a game with the training wheels off. The first attempt will likely be a recreation of the classic ‘Pong’.

Now I just need to work out what bottle of scotch to take to the Blue Mountains with me. Or do I buy a new one specially? Might be time to pick up a PC7 perhaps…