OK, haven't written anything for a few days because I've been either coding or resting - don't think I'm quite over last term and the end-of-year exams yet but we're getting there, and the code work on Space Pirates is going ahead apace! Thought I'd just post a couple of images from the current build, to let you all know how it's going.

Here, we can see there's not too much going on with the player's Heads-Up display so far, but that's OK because I know pretty much where we're going. What we do have is an aiming guide which, while green in this image, will turn yellow when you center up on a ship. Doesn't sound too great, but by the end of tomorrow that will allow you to lock your targetting computer on a ship, or a planet, or (eventually) a spacestation, and either launch a fire-and-forget missile, or be pointed in the right direction so you can follow at your own speed. This'll really come into play for missions in the game but for dogfights it'll be cool. Speaking of cool, the coolest thing in the image is the particle system. I've just clobbered that ship one with about 5 laser shots and as a result, it's spewing gasses and fire into space.
This is cool for two reasons: Firstly, it looks great. Secondly it allows the player to really see that they're doing damage to the enemy which is a big plus. When you actually hit the enemy ships, they chuck out a flare of fire and smoke, and the shields produce a bright blue "spark" - actually a dynamically generated texture - to indicate the hit visually. No sound FX yet, I'm thinking of having a go at some preliminary sounds tomorrow.
I also have our solar system generator engine working OK. The sphere models used need to have a higher poly count but the basic code is good. About 5 seconds to generate an entire solar system of planet textures and attendent bunkham.
One other thing you can see onscreen in the medium-range scanner, which is the green grid low down in the middle of the screen. All objects within a fixed distance appear on this indicator, so as well as the identification tags (like the callsign for the ship I'm attacking in the image) you can get your barings. Your ship is positioned right in the middle of that grid, and it's always aligned so the plane of the grid matches your "horizon". Next up are pitch and roll dials, a text notification area, missile status indicators, and other feedback items. I'm basically going through the feature list and knocking them off one by one, with an eye on the future plans I have for the project. For example, when you finally destroy a ship, a load of wreckage and cargo is released into space - the cargo handling code already ha

s the functionality for any ship to capture the loose cargo and store it in their hold. Speaking of which, to your left here is what the cargo and wreckage looks like shortly after creation.
Lovely stuff. Not so much it just clutters the screen, but enough so you have to pick your way through to grab the cargo.
The last couple of hours today I'm going to use to just tighten everything up so far, and do a teeny bit of optimisation (not too much, I hasten to add) and tweaking. I'm still not 100% happy with the spacing between planets, the sun behaves a little irratically because I've been a mite sloppy with my renderstates, but it's all easily fixable stuff.
All in all it's been a productive first week of work on this 4th rewrite. I'm going to add a frames-per-sec counter so I can keep everything running well within the limit of smoothness but at the moment we're jitter-free until there are about 20 ships flying, fighting and exploding their way around the system. I need to get the system size right for this number of enemies knocking around since 20 is on the limit of playablility - any more and quite frankly you don't know which way to turn next. The next 2 days then are for:
- Finishing AI code for attacking other ships including player, and cargo chasing
- Finishing the Heads-Up display
- Cargo capture
- Auto-follow and FnF missiles
- Auto-orbit around planets
Nothing too daunting there - although the AI ships have already been a little problematic. That's more to do with the normal "where the hell do I start" feeling I always get when begin on a new project. I've only used about 20 lines of code from the old version of the game, so it's all new code and largely new ideas, and while the old versions and Carrum have really taught me a lot about writing games (and the particular problems of 3D games especially) there's still a lot to take in. I used a different model for laser collision detection, using rays and boundingspheres, and it's nice and efficient and allows me to render a light when a laser shot passes close to a ship, so the nice, bright, dangerous red is splashed all over the hull. Looks amazing in the middle of a close dogfight! I'd used rays for the targetting system in the old version, but the actual laser<->ship collisions was all intersecting boundinsphere stuff and frankly, it stank out loud. We're looking good in this version though. It's fast, low-load and medium accuracy which is perfect, especially when you have 15+ ships and 20+ lasers to deal with!
Anyway, teabreak over. It's almost 2am and I want to be in bed by 3, so better crack on with this little tidyup...