Cathode Tan - Games, Media and Geek Stuff
logo design by man bytes blog

Friday, December 17, 2004

Dev Night Diary

So there's this wonderful eclipse of time I get when I get home from my normal work, the girlfriend isn't home and there's little to do but code games (and take out the garbage, feed cats, make dinner - but let's focus on the positive).

I've been modding the Unreal engine for a few years now, starting with Bounty War for UT, which became Freehold UT, then the XXXpaks for UT2003 and then Riftwar for UT2004. My latest is Unreal Defense Squad, a single player design, although a multiplayer variant might follow, which shares heritage between the classic X-Com and Unreal's Darkmatch. Basically, you manage a squad of soldiers to take back a station from hostile forces which have this tendency to hide in the dark.

Last night I replaced the old flashlight with a new one. The old one was based on an early version of Frag.Ops's flashlight and while very pretty, would crash the game when ever the player would die (on death, you can take control of a bot's pawn and this made the flashlight code cranky). So I used a much simpler design which creates an object at the end of the player's line of sight which illuminates light. This has a couple of advantages. One, I can now place the control indicator - which tells you where you can order a bot around - in view for the player. Two, the bots correctly use the flashlight without even knowing it. Three, when the player assumes a bot's control, the code easily manages it.

I don't know how well this will work online or if it will lead to performance issues down the road. Time will tell.

The other task was to clean up some of the campaign code. In UDS, you alternate between running missions and doing management back at HQ where you can request new soldiers, read incident reports, etc. To make this seem realistic, the campaign reacts to how the player is doing - so it tracks missions won, lost, ignored ... or players killed, etc. I had an early version of this in, but it was ineffective in getting all the info. One function was calling Epic's code first, for instance, and that would actually remove access to the pawn in the game ... so I simply had to move this until afterwards.

I'm a little concerned with the complexity of the framework itself. It occured to me last night that it would be neat that if when the player loses a mission, the enemies collect the squad's equipment and that increases the chance of those weapons showing up in enemy hands later on. My first reaction was cool ... followed quickly by ouch.

No comments: