Last tuesday we had a charity Poker night at Introversion. Needless to say I didn't win and in fact the night turned out to be a bit of a downer. The Poker was great and the food the hostess provided was even better. The trip home however sucked:
As my train pulled into Clapham Junction I saw that my connecting train was already waiting at the platform so as soon as the doors opened I jumped out, ran down the stairs, through the tunnel and up the stairs onto the platform my next train was waiting on. As soon as I put my foot down onto this platform my calf muscle twisted in on itself and snapped back into place with a feeling that a consultant was later to describe as 'being shot'. I didn't fall over or anything and managed to hop onto the train just before it pulled off. I have to say the pain was intense and I worked out pretty rapidly that if I stood completely still it wouldn't hurt as much. My wife Susan met me at the station with the car to take me home. She wanted to take me to A&E (ER to those across the pond) immediately but I had an email from Microsoft I had to respond to about Darwinia+. So, I got home. Had a quick bath in the hope that the heat would help the muscle settle. Responded the email and waited for the phone call from Microsoft which came rapidly. After the call Susan finally managed to convince me via NHS Direct to go to the local A&E in Croydon. Now, up to this point I think I have just pulled a muscle.
Pretty surprisingly I get seen to pretty rapidly at A&E and you should have seen the colour drain from my face as the consultant announces that I have torn my Achilles tendon and will probably need surgery. So, I spent the next few days in hospital and narrowly avoid having surgery when they discover that the tear is not as bad as they thought and in fact I had badly torn my calf muscle - which will heal on its own. I couldn't get out of the hospital fast enough, however they insisted on me having a plaster cast on the leg which will probably be there for the next 8 weeks

So that's my excuse for not making a build for this blog post - been in hospital. The funniest thing was the response I got from Microsoft when they learned what had happened. I forgot to mention what had just happened to me when I was on the phone to them:
'Byron, you have some serious work focus abilities to have carried on that conversation last night without even mentioning that you were just in an accident! Rest up and our thoughts will be with you.'
I am a bit of a workaholic so thank god for iPhones so I could still do my job as producer of D+ albeit in a limited way.
While getting seriously bored and dreading the next round of hospital food I gave a lot of thought to the AI in Xiotex. I was inspired by the way a few of you modded the builds of the game I provided so I decided to completely open up the AI in the game by making it completely scripted. It's not been coded completely yet but the way it works is:
On load the game scans an AI directory for scripts. Each AI type has a single LUA script associated with it. Inside the script is various event based functions such as 'OnUpdate', 'OnInit' etc. OnInit will be called when the script is first loaded and allows the script to define the starting point of the AI unit such as it's initial state and also what mesh to use to represent it. I am also allowing the OnInit function to create the mesh shape itself. The OnUpdate function gets called whenever the AI unit needs to update itself which at the moment is every frame. This function is the brains of the AI unit. The game will provide an API that can be accessed from the script to do basic functions such as seek towards the player or launch a missile. So the only limitation for the modder is through the limitations of what the API can provide. it's looking cool so far and I hope to have a build ready to play with by the next blog post.
Having the AI scripted actually reduces the amount of work I need to do because previously I was hard coding each AI type. Now all I need to do is build a rock solid base AI type and a useful API. Having lots of AI types available to the game is useful because when the player enters each plane the procedural system picks a set of AI types that can be met on that plane. The AI can also be restricted to certain plane numbers and the current level of the player (i.e. so a level 1 player does not encounter a level 30 AI unit and immediately get tonked). One feature I am playing with at the moment is an online repository that the game can connect to to download new AI without having the player insert them manually or install them. However, there are security issues with Vista that I am not too sure about so for the time being it will be manual install but the basics are there.