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…