mob/New() total cpu includes AosLoop so I'm going to go ahead and say that's the AI proc that's being called on mob/New()
On average things seem ok, except of course the obvious AI that's eating up everything.
I see many things that could use improvements, old libraries and such that could be replaced with better methods. There's a lot here so let's focus on something that's incerdibly vital. Your AI.
I recommend reading Dream Tutor: Green Porgramming by Lummox. It's extremely helpful, both for AI and general good (green) programming.
At first sight of the profiler image my exact thoughts were of a sentence Lummox wrote in that article: "If a mob wanders around in a forest, and no player's around to see it, does it really wander around? You bet it does, and it wastes a whole lot of processing power if hundreds of mobs do the same."
Another useful place for studying AI is forum account's Enemy AI Tutorial
There's many tricks you can use, you don't have to use all of them or understand everything completely but those two links are a good start.
ID:1871655
Jun 11 2015, 8:46 pm
|
|
We need to see the code to help.