Lead Developer, Stardock Entertainment
Published on November 19, 2004 By CariElf In GalCiv Journals
Well, I didn't get as much done this week as I had hoped to, but what I did get done was important. I started out by filling out as many as the blank functions that allow the code to bring up dialog boxes, etc, as I could. Everything that has a screen (or that can temporarly hijack another screen) is now hooked up to the interface, so a lot more of the little things like "Are You Sure" prompts and things like that are hooked up. The ones that are still blank are to access screens that haven't been made yet. This led to me restoring most of the cheat keys from Gal Civ 1 so that I could test some of these things.

One of the cheat keys was the one that made the AI not let the human player take turns, and keep playing after they'd wiped the human race out. This one is going to be crucial to our early testing so that we can see the AI working. It's like fastforwarding through a movie. Also, even on a gigantic galaxy, we can just let it churn away on a computer we're not using and check it periodically. It also exposes crashes.

This time it helped me to figure out that our new message system was choking the framerate and could (and often did) end up deadlocking the game. On my laptop, which has half a gig of RAM, a 64 MB Geforce FX Go5200, and hyperthreading, I was only getting 30 fps at best with the bugs in the message system. Moving a ship dropped it to 1 fps. This wasn't as dramatic on other machines, but I think that the hyperthreading made it more likely that the deadlock would occur because the threads could actually run at the same time, instead of having to wait for each other all the time. After two days of trying different things and re-reading the help files on threads and message queues, I finally figured out how to make it work better and now I get 120+ fps at best, and no worse than 30 fps even when the ship is moving. I generally get about 90 fps when the camera can just sit there and not track the ship moving. I'm thinking that we can do more to optimize the ship moving as well.

I think that I've gotten the last of the memory leaks and the crash on exit is no more, which has also helped. When a Direct3D game crashes, it doesn't let go of all its memory, and the more times you crash it, the more you bog down your system. This was interfering with my ability to test the game, and all I was trying to do was to exit! So that's a relief. So next week I can concentrate on getting more screens in the game.

Comments
on May 04, 2006
One of the cheat keys was the one that made the AI not let the human player take turns, and keep playing after they'd wiped the human race out. This one is going to be crucial to our early testing so that we can see the AI working. It's like fastforwarding through a movie.


Which cheat code is this? It would be cool to watch the AI play itself!!!
on May 04, 2006
deleted