Sunday, August 13, 2006

Marching cubes

Still spending all my spare time working on the game and have made good progress. Particularly proud of implementing path finding and 3D object picking in the last week.

Path finding has always been something I'd been interested in implementing but never got a chance in my previous projects. For the uninitiated path finding is basically calculating the best way to get from one point to another. This is especially important in an RTS game like this one as players will constantly be issueing orders to their units to move to sections of the map or attack the enemy.

I've utilised a modified version of the A* algorithm to solve my path finding problems in the game. The basic gist of it is to partition the area into sections which the unit can move through. Then move through all these sections prioritised by proximity to the end point while ignoring any obstacles along the way. Thanks to my decision to compose the map as a grid of 19x19 squares and elimination of diagonal movement the search space actually turned out to be fairly small and simple.

After finishing that I had to take a break from the game engine to add a few more features to the graphics and local interface. My main focus was to add functionality to the mouse cursor.

You would think that calculating what a user clicks on with the mouse wouldn't be too hard. All my previous games which supported a mouse have been two-dimensional. It's fairly trivial to determine if a user has clicked on an object in two dimensions as you just take the mouse screen coordinates on the click (x,y) and check to see if this coordinate falls within a rectangular area.

In three dimensions however the screen doesn't translate well to object positions in the world due to the current position of the "camera". In order to determine what a user has clicked on in this case a ray has to be calculated from the camera origin into the world space and intersection tested against all objects. The closest intersected object is the object clicked on. Sort of like using a laser pen to point at something in the room.

With that out of the way and a few graphical improvements (still all placeholder textures mind you) I'm now about ready to get back to working on the game engine logic. Next steps are to support unit attacks, unit creation and capturing structures. Phew, going to be busy.

Saturday, August 12, 2006

He eats again

Alison and I decided to head into the city yesterday night to have dinner and do a little shopping. I ordered a few books from Amazon some weeks back and haven't received them in the mail yet. Impatient as usual I decided to pick up some reading material that's a little out of my league at the moment but interesting to flick through none the less. Can't wait to get most of my game engine running so I can concentrate on the eye candy.

Anyways, on to dinner. I've been eager to try this new-ish steak bar called SSS BBQ Barn in the city that's supposed to have decent slabs of meat on the menu. Main draw point for me was the "Challenge" which requires you to eat an entree, huge beef shank and dessert all by yourself in order to qualify for the honour roll and a complimentary hat. I've always been up for a food challenge and after the 15 pieces of chicken I must say that I was feeling fairly confident at the time.

Then the meat came out...



I swear, there was about three to four large steaks worth of meat on the darn thing. Which wouldn't have been a problem if the shank was nice but this was just plain dry and stringy. My jaw cramped up halfway through from all the chewing as the meat grew cold and harder by the minute.



It took about two hours all up I think for me to finish that cow leg and I have to say that I'm seriously considering a switch to vegetarianism. At least pesco or polo. Alison was very supportive all the way through and refused to let me give up after wasting her evening watching me eat half a block of meat.

In the end I was finally triumphant and polished off my dessert before wobbling into a cab to get home. Due to technical difficulties (accidentally deleted them) I don't have any shots of the bare bone of the meal but I do have photographic evidence of my "health" and hard won hat.



I gave the waitress my name so it should appear on the website honour roll in a few weeks hopefully. Check back later to share my glory. Definitely the hardest food challenge I've ever had to do.

Tuesday, August 08, 2006

What's up buttercup

Haven't written a decent ramble of miscellaneous events in a while so I figure it's about time to torment the cyberworld with an update.

We attended Tom (Alison's cousin) and Kelly's weekend on Saturday which was a good excuse to dress up swanky. I've been trying to be good over the past few months and have cut down my daily consumption of unhealthy consumables from "life threateningly hedonistic" to "grossly overindulgent". As a result I've had the good fortune of rediscovering some breathing room in the previously restrictive confines of my daily attire. My weight loss in fact has been effective enough to allow me to fit into an old Armani (which I wore to the wedding, there's a point to all of this you know) that I haven't worn since my graduation in Canterbury some five odd years ago. Must say I was rather chuffed with the result.


Oh and Alison looks pretty good too...

The vendor that we bought the unit from has returned from his round the world trip and saw fit to contact me directly last week to arrange access for some tradies to do some work on the unit. After much pointless bickering I agreed to take the day off work yesterday to let his people through to get the work done. I don't have the time or the energy to convey the magnitude of our dislike for this man so it's an understatement to suggest that we'd be glad when we don't have to deal with him anymore. Alison has pulled the short straw and will be staying home this Monday to let more people through to install some fly screens and hopefully that will be that.

Other than that, the other bit of business that's been taking up the majority of my spare time is a new personal project that I've started. Most people who know me will be familiar with my ambition to one day work in the Games Industry. Previous attempts (some of which were fairly recent) to apply for such positions have been met with unencouraging silence so I have decided to "get off my arse" as it were and put some work together to demonstrate my motivation and perhaps some talent.

To this end I've decided to begin work on a solo game project that will in all likelihood take me the better part of a year to complete. Hopefully it will be an entertaining and educational experience with a fun final product and a shining flagship for my portfolio. It's going to be an RTS (Real Time Strategy) game that's been heavily influenced by numerous boardgames which I love. I don't actually have a name for it as yet but I figure that part can certainly come later. For now I'm just concentrating on fleshing out the documentation and writing as much code as I can so that I can get to the good stuff later on. Now this is still early and it's about as pretty as a baboon's chocolate starfish but here's the first chronicle screenshot I've taken of the game in progress.



With luck I'll be posting further updates as we go and won't give up this phase too soon. Hey, I originally thought this whole blogging business would be a phase but the anniversary of this blog will be coming up on the 20th of August. :)