Bah!! Stupid mistake. I fixed the bug where by the first turret couldn't be shot. Turns out I was doing a BNE loop rather than BPL - DOH!! Oh well, that looks like the turrets are all fixed and working now. I might need to add a new bullet vector, but I'll wait and see how it all plays. So, now its back onto writing the supporting docs for Luca....
I've also been thinking about the demo Luca want's to release.... perhaps it shouldn't be playable, but just scroll by to show it all in motion - we don't want to spoil things too much! Once we have more path's completed - and weapons added in - I guess we can discuss it further.
Thursday, September 28, 2006
Blog...
I've decided to reformat my Blog into a slightly wider format. The old layout was all very pretty, but the narrow window didn't allow for pictures and text very well. This layouts also much better for code to be displayed - hope you like it and it doesn't get you blue.
Wednesday, September 27, 2006
KillClip...
Mmmm.. Not quite done yet. Its about 10 lines of code, yet its not working... damn. For some reason the top bit in the Y coordinate is being set of some sprites, and this is leading them to get killed off as that takes it over $c0 which is past my kill line. It looks like it's suddenly jumping from $62 to $ca the first time the circle command is run - it also looks like its only happening because of the order the sprites are being allocated in - very odd.
Ahhh.... the wonders of debugging. Turns out that the PathLastCommand variable wasn't being reset when I reallocated the sprite to a new path, and the first time this sprite was being reused it had been killed while doing a circle command. This means it was never being initialised properly and so wasn't setup right. The circle command is pretty cool, but has a couple of issues. The first is that when you initially run the command it has to work out where the center of the new circle is - this allows you to start anywhere on the arc and smoothly run around it. The problem is it requires twice the work! First you need to do an inverse circle, then you need to do the command properly. Still it's a small price to pay for such a great script command.
I'm also busy doing a script tutorial for both Luca and anyone else that wants to do Shoot-Em-Up's with this game framework once its released. With any luck, it should mean that we get a steady supply of great shooters comming out from folk - and pretty quickly too. They should have the choice of simply re-skining it with different backgrounds and sprites and possibly different music+effects. Aside from things like animating turrets, it will mean that you get a completly different game without any coding at all. Of course, if you dont want turrets, you just don't put them in! The goal here I guess is to make it as data driven as possible.... but when that fails, then coders can go in and just change whatever they like!
I'm now having a look at the turret bug - they don't always restart once your dead. This turns out to be a simple one with the FreeTurretIndex not being reinitialised on a restart. However this has now taken a funny turn.... The first turret on screen is active and shooting, but I can't kill it..... how odd.
Ahhh.... the wonders of debugging. Turns out that the PathLastCommand variable wasn't being reset when I reallocated the sprite to a new path, and the first time this sprite was being reused it had been killed while doing a circle command. This means it was never being initialised properly and so wasn't setup right. The circle command is pretty cool, but has a couple of issues. The first is that when you initially run the command it has to work out where the center of the new circle is - this allows you to start anywhere on the arc and smoothly run around it. The problem is it requires twice the work! First you need to do an inverse circle, then you need to do the command properly. Still it's a small price to pay for such a great script command.
I'm also busy doing a script tutorial for both Luca and anyone else that wants to do Shoot-Em-Up's with this game framework once its released. With any luck, it should mean that we get a steady supply of great shooters comming out from folk - and pretty quickly too. They should have the choice of simply re-skining it with different backgrounds and sprites and possibly different music+effects. Aside from things like animating turrets, it will mean that you get a completly different game without any coding at all. Of course, if you dont want turrets, you just don't put them in! The goal here I guess is to make it as data driven as possible.... but when that fails, then coders can go in and just change whatever they like!
I'm now having a look at the turret bug - they don't always restart once your dead. This turns out to be a simple one with the FreeTurretIndex not being reinitialised on a restart. However this has now taken a funny turn.... The first turret on screen is active and shooting, but I can't kill it..... how odd.
Tuesday, September 26, 2006
XeO3 scripting...
So, I started to document the scripting engine for Luca (The artist/musician/designer/programmer chap that's helping me) and I was trying out some of the sample I was putting in the document for him, only to discover that my KillClip flag isn't actually implemented yet - doh. KillClip is a great little tool. it allows you to write a script and set it off into an infinite loop, the script engine will first wait until its come on screen, and then when it goes off - it'll kill it. This helps make scripts easy, and removes some timing problems you sometimes get.
So, first I have to write this, then document it again. It's one of these simple but irritating little things as it does chew up a few instructions, so its just a matter of keeping it small. The usualy way is to do a bounding box check to the screen, but thats too much, so I've opted to try and be clever about it. I simply check for >320 and >186. This is because the sprite is still visible when its >0, and once its <0 we've wrapped around to 511... which IS >320. This means I only have 2 compares, and then its just a matter of keeping track of the bits and flags.
So, first I have to write this, then document it again. It's one of these simple but irritating little things as it does chew up a few instructions, so its just a matter of keeping it small. The usualy way is to do a bounding box check to the screen, but thats too much, so I've opted to try and be clever about it. I simply check for >320 and >186. This is because the sprite is still visible when its >0, and once its <0 we've wrapped around to 511... which IS >320. This means I only have 2 compares, and then its just a matter of keeping track of the bits and flags.
XeO3 - Begins again...

So, I thought I'd post some stuff I'm doing in my spare time. I'm currently writing a retro game called XeO3 (surprise surprise) which can be found at XeO3.org. This little game started life some 6 years or so ago in an effort to make a comunity sprite routine of all things. The problem with the Plus/4 is that unlike its big brother the C64, it has no hardware sprites, and unlike the Spectrum, software sprites are a nightmare to write due to its character map screen. So, I decided to try and apply some modern methods to this old problem and then release it out to the comunity so that there was a chance that some new games might get done - something beyond the simple ones that were currently being written.
I was getting on fairly well and had a few sprites running around so I started to think of a simple game to show it all off. I had suggested doing a breakout clone since it wouldn't take me very long but the community wanted more... much more. So, I then suggested a shoot-em-up since the plus/4 didnt have any good ones due to the lack of real sprites. In fact, whenever there were some real sprites, there was usually only a couple of baddies, and a very small play area. And so it began, and the long process of doing an old style game got underway.
Now, due to work and family (and boredom) limitations, it doesn't get worked on very often, and so has taken a long, long....LONG time. But its now getting to the point where real progress is being made, and its looking pretty good. The technology behind it is also pushing out what people thought the plus/4 was capable of as well which is good.
So, from here on.... I'll start to describe what Im doing to it.... The graphics/music/gameplay are documented via the main XeO3 blog, but I'll document the programming stuff here. Hope its of interest.
Thursday, August 24, 2006
Scrubs and TV
I've been sitting watching scrubs again, and I just keep cracking up at it. Since Stargate's now been cancelled, its good theres still something on thats still worth watching!
I had to stay late at work tonight which wasn't bad.... I think thats the first time in the 2 1/2 years since I started! Russell and I are determined that we won't work the insane overtime that usually goes with being in the industry. I think once you have a family, it all changes, and you just don't care what the hell they'll say..... As long as the work quota is reasonable, and you make it - you shouldn't have to do overtime.... This doesn't seem to be the way the rest of the office is working..... They're gonna lose people over that.
I've been working with C# at home in preperation of Microsoft releasing the XNA stuff, so I've been building a games framework - and my understanding of what you can do! Its quite nice, very Java but without the pish java has to deal with. About the only issue was getting a timer to automatically update the window every 50th of a second. Its never gonna do Unreal3 on windows.... but it might on the 360!
I had to stay late at work tonight which wasn't bad.... I think thats the first time in the 2 1/2 years since I started! Russell and I are determined that we won't work the insane overtime that usually goes with being in the industry. I think once you have a family, it all changes, and you just don't care what the hell they'll say..... As long as the work quota is reasonable, and you make it - you shouldn't have to do overtime.... This doesn't seem to be the way the rest of the office is working..... They're gonna lose people over that.
I've been working with C# at home in preperation of Microsoft releasing the XNA stuff, so I've been building a games framework - and my understanding of what you can do! Its quite nice, very Java but without the pish java has to deal with. About the only issue was getting a timer to automatically update the window every 50th of a second. Its never gonna do Unreal3 on windows.... but it might on the 360!
Wednesday, August 23, 2006
The EIEF
So I did my bit at the EIEF (http://www.eief.co.uk/) and it seemed to go okay. I can never tell what Im actually like, I always think I sound like a total pratt. Still, this year, I'll be able to tell coz Channel 4 recorded it!! (audio only - thank you god!). You're only supposed to have 5 min to talk (which isn't a lot really), but I've no idea how long I went on for.
I met I knew someone from CodeOp's who was doing a talk on freelancing, and she was terrified! And you know, for a male dominated industry, I was the only guy on the panel. I suspect its male dominated in the ranks.... but its the women pulling the strings - as we all know they like to.....
Good fun though - I do enjoy public speaking, even if I do tend to waffle on a bit, and I can't wait to hear what I was actually like!
I met I knew someone from CodeOp's who was doing a talk on freelancing, and she was terrified! And you know, for a male dominated industry, I was the only guy on the panel. I suspect its male dominated in the ranks.... but its the women pulling the strings - as we all know they like to.....
Good fun though - I do enjoy public speaking, even if I do tend to waffle on a bit, and I can't wait to hear what I was actually like!
Sunday, August 20, 2006
DMA Design....
I've spent the week updating my DMA Design site. It takes ages to get some of the material together for it, but I wanted to finish off the rewrite of the Lemmings page's. I also decided to put up a couple of pages from the next chapter (1991) since they were sitting around doing nothing as well.
I really need to start writting 1992 as well - before I forget it all! Once I hit 93-94, there should be a lot more people that can give some input and keep things fresh.... so far its just me. Anyway it's worth a read, even if it is to see just how badly I spell.
DMA Design Web Page
I'm in Edinburgh on Tuesday talking at one of the Edinburgh International Games Festival (EIGF) things. Its being held at the Odeon on Lothian Road at 11:15, so if your bored - come along....I suspect it's going to be a lot emptier this year. Last year, abo8ut 1/2 were kids with paretns - but schools are now back so....
I really need to start writting 1992 as well - before I forget it all! Once I hit 93-94, there should be a lot more people that can give some input and keep things fresh.... so far its just me. Anyway it's worth a read, even if it is to see just how badly I spell.
DMA Design Web Page
I'm in Edinburgh on Tuesday talking at one of the Edinburgh International Games Festival (EIGF) things. Its being held at the Odeon on Lothian Road at 11:15, so if your bored - come along....I suspect it's going to be a lot emptier this year. Last year, abo8ut 1/2 were kids with paretns - but schools are now back so....
Friday, August 18, 2006
C# and .Net
So.... I'm doing a tool to build textures. Last time I did this I did it in C++ as usual but since I need to update it a bit, I thought I'd have a go doing it in C#. Now C# is pretty good in some cases, really easy to do GUI stuff - just like visual basic is, but still has some problems when dealing with memory. I had a bug that showed this up - I thought I had to make millions of textures, but it turns out that was wrong - obviously. But it did show up that C# was allocating twice the ammount of ram to do the job. Now, for 16 byte allocations, that wasn't bad, but if I was doing this in c++ I'd allocate a huge chunk of memory, and then just point to it. But in C#, you can't do that. "fixed" arrays actually have to be constant, which I don't want, which means you're buggered. This is pretty bad really for a "new" laungage.
Still, after I fixed the bug memory wasn't an issue so I was able to proceed as normal, and it's pretty good - in general. The other reason for trying this is that with Microsoft doing an open devkit for the PC and 360 in C#, these are the kinds of problems I might hit.
I'm really looking forward to using this new SDK (Software Development Kit) and being able to do little games on a 360 - perhaps even sell them....I just need to think of one - preferably one that won't take a year of my spare time to do! I've been doing several projects at home. One is a retro Commodore Plus/4 shoot-em-up (www.xeo3.org) and then theres my DMA History site (www.dmadesign.org), and then I have a few other smaller personal projects. Between all these - and family - I have almost no time to do "small games"....but I live in hope!
Still, after I fixed the bug memory wasn't an issue so I was able to proceed as normal, and it's pretty good - in general. The other reason for trying this is that with Microsoft doing an open devkit for the PC and 360 in C#, these are the kinds of problems I might hit.
I'm really looking forward to using this new SDK (Software Development Kit) and being able to do little games on a 360 - perhaps even sell them....I just need to think of one - preferably one that won't take a year of my spare time to do! I've been doing several projects at home. One is a retro Commodore Plus/4 shoot-em-up (www.xeo3.org) and then theres my DMA History site (www.dmadesign.org), and then I have a few other smaller personal projects. Between all these - and family - I have almost no time to do "small games"....but I live in hope!
Wednesday, August 16, 2006
Long time no typing......again.

Been a while... whats new. I was in Boston for a week while attending a large graphics confrence (SigGraph) which was great fun. Boston's really nice, lots of green things, and very walkable - unlike most other US cities.
Sitting in a dark room for a week is a bit much, but at least we were able to get out and about in the evening.
Joe started school yesterday as well, and he was looking very grown up in his new school uniform - I'm feeling old now.... :(
Subscribe to:
Posts (Atom)