Friday, 14 August 2009

A short intermission...

I did say I would have to write a general introduction to Space Pirates, and here we go with it now.

In some far-distant future, in some far-distant part of the galaxy, life bumbles along and makes a mess of things, just like it does here and now. But through progress, development and carefully nurtured rage, lifekind is now equipped with spaceships, orbital trading outposts, and enough weaponary to vaporize the sector 4 times over. You find youself thrust into this exotic and dangerous life when your Great Uncle dies during "trade negotiations" and leaves you a new ship, 1,000 Credits and the oppertunity to spend it as you will. The game begins as you're beamed aboard your new ship in your home star system.

So what are you to do? Well, there are lots of things you can do to earn a little cash for life's finder things. You can become a trader by visiting space stations, buying and selling commodities and zooming off to other systems to buy and sell more, taking advantage of different prices in different systems. You can also engage in combat, and for three reasons: You get bounty for every "hostile" ship you destroy which can add up to thousands of credits in each system. You also get "reputation" points and additions to your legal record for kills. For killing hostiles the law will support you - giving you awards for bumping off a number of pirates - but for destroying other traders or police ships you get punished but you also gain the oppertunity to work for the criminal underworld. Finally, when you destroy a ship, it's cargo is released into space and you can scoop it up in your ship, fly off, and sell it. Nice!

Besides trading and fighting, there are other profitable activities. You can buy a pack of 4 mining droids, and deploy them in space. They'll fly to the nearest asteroid and mine it, ejecting pre-packed crates of ore or heavy elements which you then capture in your ship and sell on. This is profitable but risky - you'll almost certainly be attacked, and other ships will try to grab your crates. Being a fun part of the universe, each star system also features a challenging race around the system against other ships, with 1,000 credits to the winner - with a bonus of 250 credits for each competitor you dispatch on your way round!

There are also a large number (well, an infinite amount in fact) of jobs and missions to try. You can taxi people between star systems, act as a courier for "special" cargo, or turn hitman for the local law enforcement or criminal underground. There are other more complex missions too, such as kidnapping specific people from specific ships and delivering them somewhere, stealing cargo from ships in flight without destroying their ships (using a short-range teleport upgrade, onyl 35,000 credits!), sabotaging shipyards and space stations, and all sorts of other nonsense. Completing missions also boosts your rep. The higher your rep, the bigger and richer the missions available to you.

Finally, there's a military and political element to the game. Each star system is either neutral, or part of one of the three political groups in the sector - The Empire, The Commonwealth and The Collective. These three forces occupy large, contiguous areas of the galaxy and there are numourous battles on the frontiers between them. You can fight as a mercenary in these actions, for huge reward (including a cut of spacestation profit at specific systems, which you collect when you dock at the right station). These battles will be huge, with dreadnaughts and battleships broadsiding eachother, small fighters scrapping in squadrens, and you flitting around with some tasty weaponary (a railgun, proximity mines, and an awe-inspiring Plasma Shroud which spreads over a huge distance, destroying everything in it's path) taking out the enemy. Your influence could lead to one side gaining dominance over the sector, which would mean riches and power beyound your wildest dreams. Or you could encourage chaos in the sector, keeping prices high while war rages on.

Throughout the game, you develop relationships and contacts with other characters, who can help you if you help them - go a good job for the local mobster, and he'll give you information about valuable shipments which may be worth "investigating". Deliver a package for your Great Uncle's laywers and they'll see that you legal status is just the way you want it. This is acheived using you on-board computer which includes an email system, as well as navigation, trading, upgrading and mission functions.

All of this happens in a huge area, featuring more than 4,000 star systems. Your final objective is to gain the highest reputation - and highest or lowest legal status. When this mighty challenge is met, you get 1,000,000 of your finest credits, which opens up the possibility of buying a bigger ship, and warping into an entirely new sector to start all over again...

As things stand at the moment, I think we're about a month away from the first full beta test, which will be carried out on the XNA Creator's Club website. I've got all of the free-space functions up and running solidly (enemy ships, mining, races, hyperspace, combat) and I'm working on the last of the shipboard upgrades (a rail gun, cloaking device and the plasma shroud) and then we're on to the mission engine. That'll be followed by the "war engine" which will manage the tactical swings and battlegrounds. At that point we enable network play, iron out any problems with it, add the options screen and music, and we're good for testing. Doesn't sound like much when I put it like that ;0)

Well, the troublesome software install I was doing on my main dev machine is finished, so I suppose I'd better crack on with this rail gun! I'm looking forward to blowing up some asteroids with it, should be a laugh! mmmmWahaha!

Wednesday, 12 August 2009

Oh my my my, now we're getting pretty close to something like a game old man...

An excellent few days, yet again, and rock solid progress is being made. Where to begin? I'll go in the order that the uploader put my photos - back to front, which is nice.
This bizarre looking screen is the player going into hyperspace. Yep, you heard it right, you can now hyperspace between systems. All 4,000 of them. Enemy ships can also hyperspace out, once they've docked and fueled up. They also sell and buy when they're docked. It's ace. The market moves as they buy and sell, which is just the way we like it. Speaking of trading, the markets are now procedurally adjusted to reflect the technical capability of the system.
Here goes some fella off into hyperspace. Just about kept pace with him. The "warp bubble" effect isn't quite bang on in this image, because I was fiddling with scale matrices trying to get the bubble to deform, like a drifting large soap bubble. I decided I wanted to keep that effect for the plasma shroud effect, so I just need to reset the scale factor to...ohh, I'd say 40ish.
This might look like a dull shot at first, but let me explain. The green arrow in the middle of the screen is pointing directly at the space station. If it were behind me rather than in front, the arrow would be red. Also, if I don't have a station license it won't show up at all, unless I'm in race mode. Not only that but you can toggle it by clicking the left thumbstick. This funky little addition has made flying about 75% simpler and more enjoyable. Good tweak that. I'd been planning to do the colourswap for a while, but I was getting sick of the damned thing getting in the way myself, so I just chucked a simple toggle into the controls code.
Again you may not be too impressed with this screen. But note the new background style. That there skybox, full of galaxies, nebulae and stars is rendered IN GAME from a library of astronomical images, some from my own observatory and some from the Hubble archive. The smaller areas of colour, and more regular small "signpost" images makes complex moves in dogfights much less tough. Now you can really get a grip on how fast and far you've looped round looking for the attacking enemy, or cargo, or whatever.
Finally, the navigation screen. Tomorrow I'm plopping the code in for System Data (a proc-gen potted history of the system), Large Map (showing the entire sector, where you are, where you're going and where you've been before. When this goes live we'll really start to see the scale of the game. I know already how big it is, but I've only seen areas about 20 LY square, which is 1/10,000th of the game, or something around there. And there's every chance that we'll increase the number of systems to around 10,000 in the final build. Blammo! Not sure about that background image - I may use that for the large map and just have a grid system for the main map. The position of any tracking limpets you've deployed will also appear on this screen, telling you what system the enemy is in, how much swag and cash they have and other mission specific details.

Today has largely been a day of tidying up code, improving AI behaviour, cleaning up the nav screen and making sure it all fits on a standard def TV. It does. I've also changed the "blip" colours to make them stand out a little better, although this still needs a little work to make sure we get the right colours. The system name generator is working admirably, as is every other aspect of the sector/system generators. A new type was added to the particle system today too - a nice blue plasma ball effect. I'll add another (green) one for the railgun I'm going to code this week too, which means running collision detection on asteroids because you'll be able to blow the living pooh out of 'em with a railgun. Tasty.

The basic "fly, fight and trade" stuff is pretty much there except the more advanced powerups. Once they're done it's on to the mission engine, which means also adding the following:

"Reply" to an email, asking for work or help;
Military powers distributed through the systems, with frontier systems being very active and violent and having shifting "rulers";

Large-scale battles in frontier systems, which of course you'll be involved with once your ranking is high enough.

Semi-permanent enemy ships, which "stay alive" in other systems;

Once those are in, then the missions can begin. Taxi, courier, hit, meet, hijack, kidnap, harrier, incursion and battle are the main mission types, some of which will be random, some character-driven and some market and battle driven.

I think I might have to implement the game save and load stuff tomorrow too, but that's no great hardship. The same display code as the markets and upgrades will be used to show saved games and free slots (limit of 8 I think), you can mark one as "autosave and load" so that your current game-in-progress file is loaded at game start if you like.

Away from the coding work, Char's making great progress with the alien character graphics and I've written another 2 tunes - one for a gameplay trailer (a weird, 1980s take on The Impossible Dream with a vocoder) and a "Pirate Theme" which is another Kraftwerk pastiche which might replace the existing theme tune, "Fortitude" - but that'll be used somewhere anyway. The idea of a programmatic sound engine is on hold at the moment, mainly because I have to draw the line somewhere ;0)

I must get round to writing a proper intro to the game...

Thursday, 6 August 2009

Splash and Dash!

Say ooh, la la, c'est something, come on!

Been beavering away over the last few days, as has my good lady wifey wife Charlotta. She's been working on icons and onion-skin alien characters, and I've been working on setting up multiple star systems and the navigation screen. Now what I've got so far is a procedural system generation engine, and I can build as many systems as will fit into memory. Right now I'm running with 3,000 systems, all with unique names and characteristics.

You can zoom and move a pointer around, and the system info below the map is updated to show the info for the system cloest to the pointer. I had a bit of a turn when coding the goverment types, and we've ended up with "Jelly Republic", "Rock-paper-scissors", "Cage Fighting" and "Shouting" on the list. It's nice to be able to start adding the real fun stuff in now ;0) I just have a few more little info items to code in, then we'll be good to allow the user to select a system, fuel up and hyperspace out. I'm paricularly looking forward to writing the shader for the hyperspace transitions - it's going to be very cool indeed. Should be glued in for next week. Once the multisystem code is in place, it'll be time to work on the mission engine. Given how well all the other engines are going, I don't think it'll be too tough.

Races are completed, and have been pretty well tested. This led to an enemy AI tweak which has really brought them in to the game more, and they're pretty much ready to be allowed to dock and trade in their own right. That'll be fun, to see the market volumes change when someone else docks.

Char's icons are now also in the shipyard menu, and they add real character to the game. I've seen the alien stuff she's working on and it's absolutely perfect for the feel I'm going for. I've been thinking about new ship designs, leaning more towards Loonie Tunes and Futurama than 2001, Alien or Star Wars - much more slapstick, cartoony and "fun" than lumps of shiny metal. Char's icon for the fuel tank extension - a ship flying atop a huge SRB-like rocket - really clicked all this into place for me. Anyway better post off and go now, got to go play poker with the boyos. When I get back tonight I'll post some images and tell you about the plans for the first gameplay trailer...

Monday, 3 August 2009

Shady Tree and his Acorns

"Shady Tree, we just adored your act!" Yup, I've spent the evening (and early morning) working on some fun new shaders for the game. Firstly, I was really unhappy with the state of the central star. The glare was too heavy, and there was no texturing at all. This was mainly due to the fact that I was dreading writing a shader for it, with all kinds of funky plumes and glow and all sorts and I had no idea where to start. Happily, as usual, I'm not the first person to come up against this particular shader challenge. Following a little research, I decided on the following approach:
Make a nice "main" sun texture, which will form the basis of the rest of our texture work. This will be used as a) the texture for the raw sphere of the star, and b) the colour map for a shader-rendered texture which takes a new alpha channel from 2 other texture files. Basically all three textures are clouds or difference clouds from Photoshop, the alpha textures getting some level tweaks. Render the main sphere, with just the "vanilla" texture, followed by the 2 rendered textures which are rotated indepentently round 2 axis. These form structured, semi-transparent shells around the main sphere. All this is rendered to a 2D texture, which I when put a very subtle bloom post effect on. Not too heavy, because this gives us a lovely, cartoony sun:

These two are from this evening's build. This has really added something nice to the game, and is well in keeping with the appearance of the planets and other ships. Great fun.
Having dealt with the sun, I wondered if something similar would be good for shield "hit" effects, so I knocked together 3 more textures, this time in blue and with finer detail in the alpha source images. It's pretty tough to capture an image of this effect, becuase you're normally mid-dogfight. To get this one I had to go buy a rear-mounted laser and keep the enemy just behind me while firing. Eventually I got his number.The effect leaps into life and then cools down smoothly, the alpha levels slowly dropping. The alpha layers also revolve in this version of the effect, but much faster than the ones on the sun. A really nice, simple, quick shader which has solved two problems I'd been worrying about for ages. It looks great in standard def, and amazing in high-def. The bloom is a little lower for this one too. Sorry about the state of the skybox background - I seem to have forgotten what order the faces go on the cube :0\
No major changes to the onboard computer code, but I have recoded the police ships in to their own class, and improved the missile launch AI of the enemies. Had some massive scraps this evening - the gameplay balance is getting tighter and tighter. Soon it'll be a perfect fit :0)
Anyways, away to bed - it's half three in the morning man! Chop chop!