Tuesday, 30 June 2009

Woof woof!

Well well well, we now have a powerup system in place. Currently, every kill results not only in the ship's actual cargo being released so you can chase it down and capture it, but also in a special "powerup" crate, which is lit in yellow (the normal cargo has red, green and blue lighting) and labled on the HUD as "POWER UP". When you capture it (i.e. fly into it) you get given a powerup. You can hold more than one powerup - they're displayed at the top of the screen, and by moving left and right with the D-Pad, you select the one you want to use. Pressing B then activates it. There are three powerups: Laser Boost, Missile Restock and Cargo Teleport. Laserboost gives you two lasers each shot - from either side of your ship - and you can really cut through swarms of enemies with it. It only lasts for 60 seconds though (HA! 60! It'll be less than that soon enough!). The teleport is great - every floating but of cargo within 50k of your ship gets beamed into your hold - including powerups. Funtastic! Here's a couple of shots from tonight's build.
Nice little planet. I've got some very high poly count spheres in the game now. Don't think they need to be any rounder! The atmos glow looks great there - I'm drawing it in alphablend mode so the "night side" atmosphere is transparent. Not realistic, but it looks good.
Big ol' fight going on here, which I started. You can really get stuck in to these dogfights now, and the payback makes the hard work well worth it. Takes about 30 seconds to shoot the first ship down, but then you get on the powerup treadmill and they start falling like ninepins!
Here's the powerup display. If there were more than one, then the "active" one would have the red border. The HUD text (top left) is working nicely too - I toyed with the idea of a "screen" graphic but I'm glad I didn't. There are a couple of lighting/FX things to tidy, and I need Charlotte to do some "real" graphics for the powerups and shield map, but I think by the end of the week I'll be ready to add the trading engine...and that's where the fun really begins!

G'night!

Saturday, 27 June 2009

Well behaved aliens a must

Pah, impudent things, flying thither and yon on a whim! I'll have 'em under the yolk by God! And i almost have already. I re-wrote the AI routines for the enemy ships today, with the happy result that they are pretty accurate with lasers but can be chased down or avoided without having to jump through too many hoops. There's a little weird rotational problem sometimes but I should get that licked over the weekend. They fight over cargo, which is nice.

Also in now are commodity classifications, with 13 tradables, and two special types for mission cargo and the soon-to-be-coded powerups. I can feel some fun splash graphics coming for that and some big sound effects. Which reminds me, I need to get an audio sample of my telescope motor drive, it's the perfect sound for a missile reload.

No images tonight since I'm already in bed and I'm emailing this one in...I'll try to post a longer update, with pictures, tomorrow. Chin chin!

Friday, 26 June 2009

And finally...

Just a quick pre-bed post. Poker was a great laugh but I played like a disadvantaged pigeon as usual. Ho hum. But the guys spent about 10 minutes fiddling with the game, and as a result we now have a yaw control on the bumper buttons. It's pretty nice actually, so thanks to Charlie for the idea. The laser collisions are now all up, and the player shield level indicator and recharge rates are also working nicely. I tweaked the AI "FIRE!" relfex - basically when they've got a clean shot at you, they take it. It's not exactly a fight for your life as soon as the game starts though, and I'm going to spend part of tomorrow tuning their other behaviors, and adding an "orbit" behavior since I'll need that for orbial trading with the planets. I'm also going to add the commodity types so when you bag some cargo you know what you've got.
Not only that, but powerups are on the horizon. For each 5 "attacking" ships you destroy, you get a temporary powerup to your speed, or to your laser, or you get the short-range teleport (see previous post for more on what that is and what it's for). That should see me through until next week, which should see the close of business on the basic space-based engine. Then I'll be moving on to the trading screens, since by then I'll have cargo coming out of the wazoo. The obvious next step after that is getting the AI players to trade inteligently, shipping goods from planet to station, selling, buying new goods with the proceeds, restocking on missiles or whatever, and deciding where to go and sell their new stock...then off they fly! Simple! Yea, well, ask me about it next Friday eh?

Thursday, 25 June 2009

Another day, another dead alien...



Bugh, boy this is good fun. I'm making reasonable progress, but I've been deliberately slowing myself down to polish stuff as I go along. I've changed the HUD display this morning because what I came up with last night looked like cat poo and wasn't really giving the user what they needed. Now, when your reticle is highlighted in yellow (i.e. an enemy lock is available), then an icon for the "lock" button pulses on the missile panel. Press that button and get your lock, then the button icon changes to the missile launch button, pulsing faster. Cancel the lock, or launch the missile, and the icon goes away with your lock. The general look is much better, and I think it makes it clearer as to what's going on. Have a look!



Not bad looking. There's more alien laserfest 2k9 action going on now, and watching AI ships dogfighting, with all the laser effects and explosions, is really cool. I've got the first "public viewing" of the game so far this evening (before the weekly poker game begins) and I'm keen to work in as much feedback as possible from the goons. Before they arrive I need to get the player ship "attackable", but this won't involve drawing any additional models or doing "per mesh" collision detection, I'm just going to use an arbitary range of 150 meters (yes, I'm working in SI units, of course, I'm a physicist!) for impacts. The shield display is already visible in the right-hand panel onscreen, and as the shield level drops, the shield icon glows more and more red. Of course you start the game with a shield charger (unlike the AI ships, for the moment anyway) so as it recharges it'll do back to green. When it's been green for more than 5 seconds, the display will change to a summary of your cash balance, cargo load, legal status and whatever. The other "holes" in the right-hand panel will be for the missile-jammer upgrade, a short-range cargo teleporter (fly into a cloud of crates and activate it - booom you got 50 tonnes of free shit. The upgrade won't be cheap though!), Mining Droid status, and race/mission status. The teleport will have a dedicated controller button, which will flash alternately with it's action icon, when a crate or crates are in range. That'll be the Y button. For the missile jammer it'll be B. Mining droids and races/misisons will be controlled from a shipboard computer screen, which will temporarily replace the normal HUD and some of the playscreen when activated. Any button on the D-pad will activate that screen, and you use the D-pad again to navigate, A and B having their normal menu functions.


There will also be four navigation "helpers" below the radar screen - one telling you if you're in a position to enter planetary orbit, another for station docking, and finally one for hyperspacing to another system. It's amazing how, when you choose the right code and design paths, features just seem to leap out at you. By the time next week in finished, I expect to have all of the free-space functions finished (apart from hyperspace), and when that's done it's time for the "market" functions to be added in. At that point technically, I suppose it'll be a game in it's self and I think it's important to focus on the freespace game as if it were a stand-alone project. I really want the entire experience to be as exciting as possible, as polished as possible, and as smooth as I can make it. We're not really running into any framerate issues yet provided I keep things to sensible levels, as I said in a previous post.


Anyway blathering on about features won't get them written, so I'd better get back to it if I'm going to be ready for the testing this evening. One more screenshot to keep you going:



There will be a rendered image of the alien "pilot" where there's a gap in the info panel on the left there. That's what you see when your target is locked in. Fun eh?




Wednesday, 24 June 2009

Mid-day break

Right, I'm about to take a break for a couple of hours. I've been working on cargo capture, heads-up info for your locked target, and some general tidy-ups. We now can open a family-size can of whoo-ass at a moment's notice:

Not bad. That's the remains of about 5 ships which I just lay into with the ol' laser cannon and a couple of missiles. Note the panel, bottom left, showing your 4 missile tubes and the status of their occupants - grey means the tube is empty, green means it's available. If I had taken other piccies you'd see that yellow is a missile locked on to another ship, and red has been fired and is actively trying to kill someone.

After my little tea break, I'll be adding cargo capture info to the heads-up, assigning (for the moment) random bounty on AI ships for similar updating, and being thinking about other fun in-space stuff, like races. All good stuff. It's starting to look and feel pretty playable!

Until we do,

Careful where you point that thing!

Aaaghroo, another hard day in my code dungeon. This won't be a long post, I'm knackered and it's been a busy day.

I've managed to get homing missiles which work, and look great, along with the HUD panel for them. This took far longer than I thought it would, but we got there in the end. I do however need to graft a new particle system lump for large explosions. The current components are great for smoketrails and rockets, but just not beefy enough for large-scale kabooms. Didn't get time to do any sound effects though, which is a bummer. I'll get on it tomorrow. Oh, and I,ve fixed a little texture problem I've been haunted by for days.

Pip pop, more to follow...

Tuesday, 23 June 2009

Holy Phew! Naughty spaceships ahoy!

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 has 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...

Wednesday, 17 June 2009

I didn't even want a day off!

Well, nothing at all achieved today. All Xbox Live services have been off-line all day, as has the XNA website, so no new code today, but lots of new ideas - or rather more detail to existing ideas. I'll actually blog about them tomorrow, because I'm tuckered out and want to get some sleep. Spent most of the day playing Star Wars: The Force Unleashed and I have to say it's a great game graphically, but the replay value is miniscule. The game is fun enough I guess, but it's so linear in gameplay that I had little or no empathy or sympathy for the characters. The HUD system isn't great either - in a game which, in parts, relies heavily on moving between platforms at different heights you would think it reasonable to have some indication of if you should be heading up or down. Sadly not, although I think I would have finished the game in about 2 hours if that were the case. Bummer.

What I do like about the game is the control model and the way that player moves are always well choreographed in both main action animation and in transition between moves. Really very smooth. Also, the shaders and the texturing are great. And the character kinematics are great. Terrain collisions are a bit frustrating, especially coupled with the flat sector map on the HUD. But my biggest frustration is that for all the obviously excellent code and art, this game is cripplingly limited by the linear storyline, short levels and inability to wander around, maybe coming a en ememy from behind or avoiding them all together. And for all it's intrusion, the story is predictable, underdeveloped, and I could see no reason for most of it aside from providing a segway to the next level. The characters behave unrealistically, their deeper motivations hardly touched on (despite a promising start) and the perrenial Star Wars choppy dialog is everywhere.

I'm hoping that there's more freedom and variation in the online play, which I'll have a look at tomorrow when I take a break from coding. I'll also be migrating my old blog posts from www.mstargames.co.uk to here for the sake of completeness.

I bid you good day sir!

Tuesday, 16 June 2009

Pirates Ahoy!

Well, I've properly started the re-write of Space Pirates from Tomorrow, and it's been a very productive day. I have a working solar system generator, player flight controls, and a nice gravity system that includes a nice, smooth way to stop people crashing into planets. And I added a bloom post-process. The ship controls are like an airplane - you can dive/climb and rotate your ship around it's forward axis. Bombing round the solar systems is good, they're not too big but there's enough room for plenty of trader ships and pirates, which is good news! Even better, the game is wrapped in a tidy animated menu.

So, over the course of about 13 hours today I've got more done than I thought I would. The only disappointment has been with an atmospheric diffraction shader, which seems to operate on a different origin to all the other shaders - but that's been put on the pre-beta fixlist, and will be dealt with after all the base functionality has been put in place and before we go for initial playtesting.

So, the plan for tomorrow is to add manufacturing, imports and exports to each planet, a way to shift goods from one planet to another at a profit (and in a realistic, dynamic market) and a spacestation to allow extra-system imports and exports. That means also adding trading ships and an "orbital trading" interface. And an in-flight HUD, including a scanner. That sounds like a DrawableGameComponent to me.

That's it for dev day one. I'm off to bed to think about commodities...yawn!