What is the proper way to disable/enable a Character to be used in an object pool which supports client and server?
Hi all, I'm hoping someone with experience in this area can help me. First, a little background info:
We are building a multiplayer game which can spawn somewhere around 90 creep characters at a time. Because we spawn so many, there is a significant frame hit each time they spawn which is every 10 seconds. To alleviate this, we have implemented object pooling for our creep classes along with an interface which defines a Reset() call that is used to reset their state before they are reused. In addition, we have some static Enable/Disable calls which are also used in conjunction with reset. Releasing a creep into the pool disables it, resets it, then stores it for future use. Acquiring a creep will enable it and return it.
The problem I'm having is how to disable and enable a creep character, so that its state is replicated properly the clients. I always get proper behavior on the server, just never the client. Here is a code example of how I'm doing it.
I am having 2 problems with this.
I'm curious if anyone has faced similar issues, or has implemented proper object pooling on a client/server game with replicated characters? Any help or suggestions would be greatly appreciated.
asked Oct 26 '16 at 02:50 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here