Monday, 11 January 2010

Deleting Code

I've learnt that keeping old stuff around is handy, but dangerous.

I've been a hoarder for years, but over the last few months I've come to appreciate reducing code even more than I'd thought possible. I've never been one for liking big bloaty code, but in the end, our company engine at Broadsword got a bit large. Working on a new engine has given me the freedom to destroy. It's been fun and educational. You spend less time maintaining and more time making only the right stuff work right. Join this with my new approach to problems (code it first and fast, then refactor optimise refactor), my game has come along at a startling pace.

Now, any time I want to do something I've done before I'll try to copy in from the old engine (code reuse), but if it's novel, it gets given a bit of time, not much though. Time is the only asset I have available to me, so I always take the very shortest route to the solution, and at the moment I haven't hit any horrible problems because of it. In fact, after only 58 hours of coding (and design and photoshoppery) I have a game demo up on my development blog. I'm both pleased and surprised at how quick I can code (and art and design) when I don't think about the bigger picture all the time. It might be that I've been doing games so long I don't do stupid things any more, but it also might be that "future thinking" is pace destroying. I'm not sure which, but I think that my experience has helped reduce the amount of time necessary to make things happen.

Does that mean we should all train up in large companies then go out and make small applications forever more?

1 comment:

wererogue said...

I'm a big fan of keeping the flexible code, and ripping it down to size for a specific application.