Thursday, 23 July 2009

Breakneck speeds!

Holy oilcans, another cracking day of progress. The shipyard menu code is more or less done, I've added a fun new effect for player taking damage - the screen shakes, fuzzes up and goes red. It's a really simple little tweak of the motion blur postpro from the old version of the game and the impact of the effect is lovely. If you're viewing the on board menus at the time, the screen goes crazy!
The control icons on the shield panel have been re-ordered, and I'm going to make them multi-function tomorrow. More details on the control model soon - it's almost finalised and in-flight is fantastically smooth, even on a standard def TV.
Some optimisation also done today, and we can now run 50 enemy ships with only occasional slowdowns when there's a lot of cargo crates knocking about, and this now means it's a real struggle to just wander about without getting attacked. Knocking enemies off is doable, but you really need to lean on your missiles. When I knock the power ups down to every third kill, it'll be quite a challenge in the busier systems. Suffice to say I'm really happy with the speed the game runs at - it gives me confidence when considering processing non-local enemies and markets in real time. Finally, the market screen now shows the total value of each type of cargo you have in your hold.

The game is so playable, the UI is coming along so quickly and hangs together beautifully and - amazingly - the packaged game is LESS THAN 7 MB IN SIZE. That's right. Less than 7 meg. I've got a tonne of PNGs for the HUD, and it's only about 5 floppies worth of stuff. I'm going to have so much room for music, and maybe even some video! Speaking of music, I've started to get the old muse tickling the back of my neck, and I'm going to set aside a couple of days next week to start on the music. I'm thinking of doing a programmatic sound engine, which reacts to your ships speed, laser fire, impacts and maneuvers. I wonder in fact if I could use all of the user input and game telemetry to drive music, so that the soundtrack is unique in your current play situation. The velocity of the ship could control the density of drums and bass line, laser fire controls a guitar riff, missiles flying around trigger an arpeggio, explosions introduce percussion breaks...now that's something to think about...

Anyway, must stop getting sidetracked like that. This is always the problem when I'm in top gear. I have so much mental energy, and my body can't keep up, and everything seems all bright and shiny and interesting. I'm not posting images today, but I'll have a load of them tomorrow, when I'll go through all the features so far.

Wednesday, 22 July 2009

Galloping code-chimp strikes again!

My name is DrMistry, and I'm going to show you something nice this evening. Something that's only taken me and my good wife two days to add in to the game. It's the menu system for the game and we're really motoring on it now! The same menus are used for both the "shipboard" computer and "trading station" modes - the only difference is that some activities can't be done in free-space, like trading and buying upgrades. If you're floating around then you can see all the prices and stock levels, and you'll even be able to set your hyperspace destination and, if you have enough fuel, be on your way. Important for missions later in the game :0)


But let's have a little recap before I introduce the menus. I've finally got round to adding police to the mix, and I've rebalanced the enemy behaviours so that there is pressure on the player to fight but you can actually catch and kill those gunning for you. That's pretty vital to the game being playable, and I've already got everything in place for different systems to have different levels of traders, pirates and police while maintaining good combat levels. The police get called in when a "non-hostile" ship is taken down - they fly in from a random position, hunt the perpitrator down, and when the job is done they fly back to the space station to stock up on missiles. Nice stuff. We're running at 25 enemies at the moment, and that's pretty playable. Sadly I'm going to have to turn off the missile screens (or at least find a faster way to draw them) because the framerate drops too low when they're active. Shame, but if it means I can reliably have 30 or 40 enemies on the rampage at the same time, it's a price worth paying. But I'll try and speed up the missile screen draws, and in fact eveything's up for optimisation when all the menus are complete and before we go multi-system. I'm also still at a loss as to wha to do about the shield effects, but that's for another day ;0) Let's move on to things that are working eh?


This is a look at the Ship's Log screen, which is accessed via the main status screen (i.e. the first tab) by pressing X. You'll also be abled to view the ship's handbook when I've written Charlotta a brief and given her the assets to use. You can scroll up and down the list in the log using left stick, and the details of the event are shown below the list, a la your favorite email client. Very navigable.

This is the Messages screen. At the start of the game there are 5 messages in the player's inbox - one from your Great Uncle's lawyers explaining what the hell is going on (you've inherited a ship and a little cash, you can do what you want with them but if you make it to either Public Enemy Number 1 status or Enforcer status, with the maximum Arch-Privateer ranking, you get another 1,000,000 credits. Nice. Anyway, you can mark messages as read or unread, delete them, and (soon you'll be able to) reply to a message with set messages, so you can ask the lawyers for help if your legal status is going the wrong way and you need to clear your record, or ask local heavies for work, or any number of things I haven't yet thought of. VERY nice.


Here's the main status screen, seen at the start of the game.


And here's the meat of the thing thus far - the market screen. This is in Freespace mode, so you can't trade, but you can see what's what. There's a list of 15 items to trade, you can pick all of them bar one (mission cargo) up from combat, and you can make a massive amount of money from this part of the game. Each commodity has an icon, furnished by my locely wife, which is displayed along with a little description of the item and hints on who buys and sells at the best rates. You will be able to "map" the commods to systems in the navigation chart to boost your chances of making a profit. At later stages in the game, when you gain contacts in various systems, you'll be sent info on big price shifts. This is one thing I always thought was missing from that classic game Dope Wars.So the last couple of days have been massively productive. We're rapidly approaching the point where the game is ready for playtesting - recon it'll be about 2 weeks should do us, certainly for trading, fighting and hyperspacing. Missions are obviously going to take a lot of work, because I want them engined rather than hard coded, so there's always something to be getting on with. That means lots and lots of thought and testing - but luckily the hit, taxi and courier missions can be lifted from ye olde version of the game, because it worked really nicely. Almost everything in the game is bug free - I just need to track a problem with solar system creation which causes some instability (LocalPlayer.Position goes NaN because of some bizzare gravity problem) I think it's probably a combination of large mass and large radius for some planets. That aside, things are really rocking on!



Monday, 20 July 2009

Get the message?

Hullo my old fruit! Check MY moves! A solid day of coding today (well, evening anyway) has delivered up the message screen and engine. It's not graphically 100% yet, but I'm not going to over-dress things. The status screen looks nice and crisp (even if the text positioning needs a little shove) and I want to keep things as clean and clear as possible. I've also added a new ship model - a heavy freighter. I intend to revisit all the models once the game logic is complete, and in fact all of the visuals will be retouched and improved once the frame of the game is complete, but it's playing like a dream so far. With the Docking License thing added, there's a real motivation to get blasting, and the status screen now shows how many kills were legal and how many were murders. This is vital when you're concentrating on your legal status and ranking levels and it's really nice that things are starting to hang together. I've got the messages nailed much quicker than I thought, so tomorrow we start the "creative meetings" for the game, where Charlotte and I start working together on the visual elements of the game. I'm going to need lots of graphics for commodities, ship upgrades, missions, and the sector map. From a code perspective, I honestly will get the police and races in tomorrow...honest!





A few screenshots from the latest build:



Sunday, 19 July 2009

Getting deeper...

Phew-wah, here comes the main course! Following a few days away, I'm back on the treadmill and today has been slow progress but rewarding. The menu system is now well and truely under way - you can access it in freespace by selecting either the Home or Messages icon using the right thumbstick. All 8 tabs are in place, but only the Status tab is populated. I'm going to work my way through them in order, which means the Messages tab is next.

When you kill a ship, your kills, legal status and ranking are altered. When your legal status improves from 'lawful citizen' to 'collaberator' you get granted a docking license. the player gets sent a message to that effect, which will be viewable on the message tab. You also get police warnings, race notifications, major news events,mission info and a little fun spam too. The main message handlers won't take long to write, but the UI will take some serious work. I think it'll be done by stumps on tuesday.

I've made another round of tweaks, and improved the HUD, as well as coding in some sound fx for powerups and target locks. In short, it's going very nicely indeed...i still need to make some decisions about shaders and shield impacts, but that's going to come later. AI is behaving nicely and the flow of gameplay is coming together nicely.

Anyway it's sickeningly late, so time for sleeps...

Monday, 6 July 2009

And another monday rolls around...

I've had a lovely, relaxing weekend away from the keyboard. I haven't checked my mail, I haven't written any code, I haven't watched XNA Roundup. I've just powered the laptop up to listen to something on Spotify and to quickly post what I'll be working on this week.

I've been toying with the idea of having some semi-random radio transmissions throughout the game. I was watching a documentary about the Apollo program last week, and some of the chatter when there wasn't much in the way of mission work going on is abolutely hilarious. Not intentionally for the most part, but if you take them out of context there are some absolute jewels in there. I'm not thinking of just ripping released NASA audio - that's just not right - but just jotting down 4 or 5 word phrases when they occur to me and fiddle them in some nice audio software I have knocking around (Spectrum Lab if anyone knows it, the radio technicians freind). But that's just a side idea.

The main dish tomorrow is going to be Law Enforcement. This will end up being an important part of the game as we move toward multiple star systems, reputation, smuggling contraband and even in missions. Basically, the local fuzz will react to the firing of missiles against ships which are not attacking the ship which fired them, laser impacts, and arming missiles within the orbit of the local space station. They will be based IN the station, and have VERY fast ships. They'll mostly come in ones and twos, but since systems all have their own "law strength" variable this will be different in some systems. If you're a bad chap, and they catch up with you, there are a few things that can happen:
You can outrun them (maybe, if you're light on cargo), you can be stopped (in a tractor beam) and fined or have cargo conviscated, you can try and shoot them up but if you fail, they will track you down and kill you. That I expect to take most of tomorrow. I'm away on Tuesday so I need to get a crack on with it. I'm also away most of next week, so the pressure's on to get a few other things done too. This break wasn't really planned, so everything's going to slip a week.

The other things on the list for the week are fleshing out the Pause/in-flight computer, giving enemy ships the ability to fire on the player, and sorting out the atmosphere colours on the planets. The gas giants are currently a horrible yellow (a bit of a failed experiment to be honest) and I want to add a sea "shine" to the water planets, finalise the enemy ship shield effects, and finish the HUD. I might also start on programmatic free-space skybox textures, but that's going to be a big job I think. The enemy Ai is pretty much done, the missile cameras need a couple of hours of testing, laser collisions are just how I want them, and the flight controls are lovely.

Well, it's half one in the morning, and I've got a lot to get on with tomorrow. Hopefully I'll have something nice to show you by then.

Friday, 3 July 2009

Holy cow, who wrote that?

Hot momma, things are going amazingly well over here. I'm still ploughing on with the space-bourne part of the game at the moment - I've just spent an hour putting 4 pic-in-pic displays in for your missiles - you get to watch them hurtling toward the enemy, swinging around and generally behaving like homing missiles. It looks really great.


See the lovely screen there, on the right? About 1/4 of a second after I took the frame, the missile hit and there was a real free-for-all, resulting in many many deaths. I would feel bad, but it's only code. I'm not really a god.

It'll need a little gentle "teasing" into position so it fits on stadard def TVs, but this was really a "proof of concept" thing so I'm really glad it fit in so snugly -and no significant drop in frame rate. Amazing. I've managed to have 3 out of 4 missiles flying at the same time and it looks incredible. Tomorrow I'm moving the cash and cargo indicators so they're above the HUD panels (cash on the left, cargo on the right) and they'll do *something* when the totals change -some funky transitional thing. The space station is in place, and I also put a pause button and some new (placeholder) sound effects in today. And improving laser collisions, making attacking enemies flash on the HUD along with powerups and missiles and making the AI guys powerup aware and able to fire missiles at eachother. Once everything's in it's right place I'm going to add an "awardments" engine, for things like "kill 10 in 5 minutes", "kill 50 enemies", "capture 100 items of cargo" and blah blah, which means adding a save feature. I'll chuck it on the pause menu which, incidently, is going to double as access to the shipboard computer, which will let you save/load, restart, view your cargo and weapons status, kills, cash, ranking, achievements, activate other HUD features (navigation arrows for targets and space station) and (gasp) activate races. I'm looking forward to doing the race engine, that's going to be a great laugh and a lot of the checkpoint and route methods will be reusable for the mission engine. So things are going very, very nicely. It makes me wonder why Carrum took so long ;0)


Spit spot!