Sunday, February 21, 2010

Game development update

I've been making a lot of progress on the game lately. I spent most of Saturday rewriting the navigation system, again. I decided on a whim to see if it would be much faster in C++ than it is in script. So I spent the first half of the day dusting off my C++ skills and writing one of the navigation methods C++.

The difference was phenomenal. The function I rewrote typically takes about 22 seconds to execute in script, which is quite a wait. When I rewrote it in C++, it took less than a millisecond to execute. After seeing a performance increase like that, I decided that I had to port the rest of the navigation code over to C++, and got to work on it.

It'll probably be a couple of more days before I have it all working again, but it will be so worth it. So, the lesson for this weekend is C++ is easier to get back into than I feared, and you shouldn't write performance critical code in script.