Monday, May 18, 2009

Animated Hate

What's that? No new post for over a week? If I keep this up I may lose my rap as being prolific or verbose. Well, I've been beating that stupid animation bug for the last 5 days. The posts would have gone something like this:

"Tried some stuff, still broken."

So, I went ahead and skipped them. Now, it's fixed. It has to do with the Random Number generator. It seems that every frame the enemy AI was deciding what it wanted to do. Most of the time it would decide to keep doing what it was doing, other times, not so much.
Basically, the Random Number generator is not random. Computer people will tell you that. "Random" numbers in a computer are seeded. So you take a number that's bound to change from moment to moment and you can use that after some modifications. The system clock is a good example. The problem was that when that number is checked, say, 30 times a second there isn't a lot of variability. So, I assumed, that meant the system was working correctly. Once an action started it was quite likely to finish, statistically speaking. When it didn't was the problem, since it would cause a stunted animation, or worse, a crash.
Now, finally, it works. Now it only decides what to do after it is done doing what it is doing or the status of the AI has changed. It is so dumb. Now, collision.

I was thinking about stuff recently and I have a plan for my new programmer. I was going to give him the assets and get him set upon a port or building a wrapper program for XBLCG in C#. I still have this plan. But I was thinking, he is doing other things too, and that may not be the best use for him. So I'm getting the build stable (which I did, see above) and then I'm thinking that I can give a detailed description of the design (a document, if you would) and set him upon building some game functions. The combat in particular obviously is taking a lot of time that I could be spending doing level building or any of the other things I'm responsible for on the project. That's seems like a plan. Maybe he can build the blocking function controls. I'll ask after he's got the stuff, probably later today.

No comments: