Okay so I have a vector for all of the monsters that are spawned in my game. All of these monsters are in a single vector and are "active" according to what zone they are in relative to the player's zone.
If the player is in the same zone as the monster, then have the monster move around and commit actions such as attacking other monsters or the player.
This is all done on a very powerful computer: my main computer.
If I were to attempt using this game on my medium-end computers, the game runs on a steady 2 FPS(where on the main does 50+)
What I attempted is splitting the vector into an array of vectors
vector SpawnList to
vector SpawnList as a quick example
Now with this code the monsters are in separate vectors according to their zones(zone is the area that the monster is spawned in)
Note: I use Ogre3D for rendering and bulletPhysics for the physics, and I haven't figured out a way to split the monsters' rendering accordingly.
And with this new idea, my main computer even faces severe slowdowns.
I am wondering if maybe the vectors have been created wrong or it is not a good idea to have an array of vectors.
Is there a better way of having the monsters grouped together where the performance is almost maximum on any computer?
EDIT: I have Profiled my code and here are the updated results. I hope they are of help to this situation: http://pastebin.com/v0PFQf0X