When Connery, Mitch, and I worked on the ant last week one of the issues that remained was with the implementation of the object pooler. The way it was set up before the ants currently in the scene were also in the pool. So when a new ant was needed it may not be able to due to the number currently active. This is fine except for the fact that it will simply check the next ant in the pool instead of seeing if any are available. So even if the max number of ants isn't spawned, the pooler may not spawn an ant when it is supposed to.
We recoded the object pooler to keep two separate lists, one of ants in the scene and one of the available ants in the pool. This way when it tries to spawn a new ant it simply checks the list of available ants. This provided the desired behavior and the code is much cleaner now as well. After refing the object pooler we further tested the game, combat in particular.
As we tested we made a lot of small adjustments to the ant, such as move speed and attack behaviors. The result was much more fair combat, giving the player enough time to attack the ants without getting destroyed by them. Along with that we added textures to the ants and models for the different weapons in game. After getting all of this content in the last major thing needed is the grass barriers that Stephen and the artists have been working on.
 |
| Our updated pooler script |
 |
A swarm of ants spawned thanks to our updated pooler
|
Comments
Post a Comment