Monday, August 17, 2009

The good, the bad, the ugly.

I've currently been looking at another code base at work and it's brought to light something I've known for a while, but which is now front and center. Not all programmers are good programmers. It's something which is pretty obvious, but what isn't obvious is the split. You would like to think that it's a pretty linear grade with even numbers of coders at each level, but in fact it's pretty biased towards the lower end and the numbers drop off quickly the higher you go.

Now the games industry is pretty hard to get into in the first place, so truly bad coders in our industry are exceptionally rare. Thats not to say we don't get them (and I think we have a couple in our company to be sure!), but most of our problems are due to the lack of training. We have a heap of juniors on our project and they just haven't been mentored correctly. Now for the most part they're all pretty good (or they wouldn't be there), but without proper mentoring they'll just do it their own way, and not the way they should. Training, and experience is everything, and while it's far easier to churn out decent looking games due to the sheer power of modern hardware, thats not to say that the underlying code couldn't, no shouldn't be far better.

This is much more important than you'd think. In the past you'd write a game and as soon as your finished, you'd hardly ever look at the code base again. That just doesn't happen these days. For starters, engines and tool sets take time to write, so you have to look after them and use them as often as possible. Second, sequals are very common and the turn around on them is usaully very tight, so having a solid codebase to start from is important which means you can't just fudge your game and forget about it. Companies are made on their I.P. and your codebase is a vital part. This means you have to not only value your staff, but make sure you train them as best you can, and I think the games industry as a whole fails in this.

Friday, August 07, 2009

Time marches on...

Wow... what can I say... WOW! As of the 1st of August I've been in the games industry for 20 years. 20 YEARS!! Who would have thought it. My mum said it was a waste of time and I would never amount to anything (okay, she was still right but..), and back then it was such a bedroom industry that you almost knew everyone that ever coded a game. These days, I've never heard of any of them!

*sigh* happy days. We has some great times at DMA, the early days being by far the best - it was just so much fun back then! Thats not to say some of the later days weren't good too, but hardware is just so boring these days - powerful, but boring. Just about anyone and his dog can make a reasonable game now, and that takes away much of the art that you needed to do really cool things.

I did a little test at work recently and was able to draw 1,000,000 lemmings faster than we could draw 100 on the Amiga. 1,000,000!!! That covers a 1280x1024 screen 195 times over!! or to put it another way, imagine a SNES with 3,900 parallax playfields, and STILL have enough grunt to draw 1,600 sprites! Amazing power. But what do we do with it? CPU's are now so powerful, it's like having over 500 SNES per CPU - and I have 4 cores on my machine!

So much has changed, and a little of the fun has gone. Now and then you get some of it back, a little bit of fun optimisation still brings a tear to eye as you remember the fun you used to have pouring over a few lines of assembler while trying to get a single cycle off. I sit and watch all these new boys, and shudder at the waste in their coding, memory, cpu power, disk space, network bandwidth... all of it. They don't seem to spend as much time thinking about these things as we old timers do, and the sad thing is, they probably don't have to. Sure a little more care would work wonders, but CPU's are actually made to help average coders. Thats a sad fact of life, the world is full of average or less than average coders, so all the clever folk at Intel, AMD, ARM all work away to make things run faster for them. but this leaves the few of us left struggling to find the fun we lost.

Still, it's not all bad. Some new hardware is always around the corner, and your mobile phone is now more powerful than even the old consoles. Look at the iPhone. Really nice bit of kit, and fun to code for. Languages have changed too, and I've (almost) given up assembler for the likes of C# as it's just faster to work in. I've had some hard leassons to learn here though, giving up memory management is still a sore point but it does make life simpler for most tasks, but I really miss knowing where every byte of my program has gone.

It's sad I guess. I'm a man stuck in the past. On the one hand, I'm trying to hold on to the fun I had in the very first days of coding, while on the other, I try to use all this new power as best I can, and teach these new boys thing or two while I'm at it. It's now all about bridging my experiance, learning from the past to bring forward old ideas and use them in new contexts.


So will I be here in another 20 years? Who knows... I suspect I'll still be coding in some shape or form. It still has the same lure as it did when I first sat down in front of a ZX81 and black and white portable TV as a 13 year all those moons ago. But what will change in the next 20 years? or even the next 10? More CPU cores I guess, bigger badder machines, easier to program and just perhaps, a little more fun.

Lets hope...



Anyway, heres some of my career highlights I've enjoyed...

  • 1989 - Ballistix is released - My first game!
  • 1990 - Blood Money on the C64 is released.
  • 1991 - Lemmings
  • 1994 - Lemmings 2 SNES
  • 1994 - Uniracers
  • 1995 - Writing various prototypes and trying out several game ideas.
  • 1996 - Minus4, my first emulator!
  • 1997 - GTA, particually the 3Dfx version.
  • 1999 - GTA 2
  • 1999 - I left DMA and moved to Visual Sciences at Head of Reasearch and Development.
  • 1999 - XeO3, a small on going project begins...(still not finished!)
  • 2000 - Internal debugger for the PS1 based on an Action replay, along with some fun on the PS2.
  • 2000 - F1 2000 on the PS1
  • 2001 - F1 2001 on the XBOX
  • 2001 - I left Visual Sciences and moved to Simian Industries as Technical Manager.
  • 2005 - Moved to Realtime Worlds after Simian went poop to prototype some ideas.
  • 2005 - Various tech demos for an undisclosed project.
  • 2006 - Russ joined me at RTW and my project team doubled in size.
  • 2006 - Actually started to use C# in anger.
  • 2006 - Huge scale tech demo. Great fun.
  • 2008 - Rewrite and an even bigger scale demo - pretty cool.


Saturday, July 18, 2009

Delphi conversion

So, I'm doing a little Delphi conversion just now and while looking through the code I came over a little bit which didn't quite make sense. Rounding floating point numbers into integers. Now my default has always been to truncate for rounding. Not only is it faster (by far!) but it's easy to predict, and everyone understands it. Now, Delphi's rounding...wow... it's nuts!

Dephi seem to have gone out of their way to complicate things, and I can't figure out why. Anyway, after doing a quick search heres the Delphi rules...

The Round function rounds a floating point Number to an Integer value.
The rounding uses Bankers rules, where an exact half value causes a rounding to an even number:

12.4 rounds to 12
12.5 rounds to 12 // Round down to even
12.6 rounds to 13

13.4 rounds to 13
13.5 rounds to 14 // Round up to even
13.6 rounds to 14

Now...why o WHY would you do that.... Round .5 to EVEN! What! Nuts I tellz ya...

Saturday, June 27, 2009

Editor woes

You know its amazing how fast you can do an editor if your not trying to be fancy. Take RetroEdit. It's actually trying too hard to be the jack of all trades, and as a result, its currently the jack of none. This isn't to say it won't eventually work and do its job, but currently because its trying to hard, its progressing slowly.

Now, take a look at a little map editor I'm currently knocking up for my little iPhone Golf game. I'm not trying to make it a generic editor, and I dont want to reuse it later (not that I couldn't hack it into something else later mind). But this means Im free to throw code in at a great rate of knots and as a result, within a day (almost) I've just about finished the basic editor. It's got a tile window, brush support (grabing multiple tiles at once), and I'll add a quick UNDO function in there for when Im being stupid.

It's amazing how quick you can do these things when your being specific, and I do wonder sometimes if the tools I try and do at home are being too ambitious and as a result might never get finished... hay-ho...

Friday, June 26, 2009

iPhone fun...

Yeah, I know... long time again. I've started doing some iPhone coding to see if I can actually finish a (proper) game at home. Doing games programming at work, then games programming at home is hard going. Doing the same thing all day, then coming back home and doing it all again is a little soul destroying. However, I'd like to try and give it another go, and who knows.... perhaps make a little cash on the side.

So, XeO3 will (yet again) take a back seat for a while so I can see if I can make a real go of this stuff.

On the plus side, I've been doing some OpenGL at work, and it's putting me in good stead for doing some at home! I now know a reasonable amount about it so should be able to use the iPhone's OpenGL ES reasonably easily..

Well, here goes nothing....

Sunday, May 24, 2009

Reporting In...

Nothing much to report. I've just had a nice relaxing birthday weekend and done nothing but cut the grass and watch the Monaco GP. Great fun. However, I have gotten my subversion server up and running again, so that at least should be backup for everyone using it.

No idea when I'll get back to doing stuff, just not in the mood just now - not to mention still installing stuff for windows 7.

Still, had a great weekend so what the hell :)

Monday, May 11, 2009

Subversion

I've now reinstalled sub-version. As I'd hoped, it was pretty painless since I already had all the config files setup and simply had to point at them. Windows 7 is pretty nice and I'm trying really hard to keep features like the user account control, but I'd also love to be able to switch it off for specific programs - like the command prompt (when run as administrator). Still, I'll keep plodding on and see if I can get used to it.

I'll need to test the remote access tomorrow, but since the firewall hasn't changed, it should all be fine; fingers crossed!

I've only a couple more programs to install and I should be back to normal. I have lost my 3rd monitor as it the display seemed to be locking up a lot, but since I've just installed some new drivers, I'll try switching it back on and seeing if its all working again. I like having 3 monitors, it'd be a shame to lose it.

Russell reminded me that I actually have a proper MAC that I could be testing with MONO (my dual core G5), and although I'll need to get more RAM it would be a good testing ground for retro edit (which Russ tells me runs pretty slowly on it) and mu debugger - once I get TCP/IP support in. I could probably knock up a GL version of Minus 4, this should be easy as Russ has ported my speccy emulator over I suspect I could pinch the source to that and get Minus4 working pretty quickly. This would then let me use the OgreDebug and the TCP link to the emultor.. I think.

Friday, May 08, 2009

Windows 7!

I've just installed the windows 7 release candidate and it's all very nice. It has some issues with my 2nd graphics card (I use a small PCI card so I get a 3rd monitor), but aside from that many of the annoying vista-isms are now gone.
However... Because it's a clean install I now need to reinstall everything, including the sub-version server but I hope that since I'm just pointing at a depo it won't take too long this time. If I get a chance tonight I'll try and finish installing everything, then I can (I hope) plod on with more interesting things.

Wednesday, April 22, 2009

InpOut32.dll

Yes!!! Not only have I got it working again, but they have managed to get SIGNED drivers! This means I no longer have to boot up pressing F8 and booting into unsafe driver mode. This is awesome! It also means I can carry on with my debugger and try to get it to a point that I can add the TCP/IP (or UDP) mode.

For those that are interested, full signed drivers (for my upload program for example) can be found HERE

I'm very happy!

Wednesday, April 15, 2009

Source control...

I've finally (FINALLY!) gotten my subversion server up and running and even managed to open up access to other members of the team. This means Russell can now help out on the editor and debugger (if he gets bored), and once Luca gets used to it, he could actually build levels directly into the source without me having to make special versions for him.

I'm currently adding all my relivent projects into the depo and assigning various access rights but it all appears to be going well. Russell has been busy moving house so we're hoping that he'll actually start doing things again soon! (*gasp*)
(perhaps he'll even update his blog!)

I've been trying to get my debugger up and running againas it's quite close to a first version (I think), but there seems to be an issue with downloading to my plus4 - no idea why. I just hope my parallel port isn't fried again! I weas toying with doing an RR-Net for the plus4, and if my parallel port is dead, I may have no choice. I guess I could always do a C64 version in the meantime, and I still have the emulator plug-in to write as well.

I really need to get back up and running as I'm currently not getting anything done at home just now. Fingers crossed this will change soon!