As promised, this article will cover the second half of work completed for RIZN the last several months. I've still got a few small items to wrap up before all of this can be considered completed, but I figured I'd share since the bulk of the work is done and I don't expect any problems going forward. With these items knocked off my to-do list, nearly all major systems for this project are done and working, the only exception being the mechanics for using research stations to work towards a cure for R1Z-N.
The most significant of these updates is the addition of a pooling system for zombies. Up until now, all rizn were spawned by instantiating the appropriate prefabs at runtime whenever needed. I've since implemented a pooling system which spawns a dozen-or-so of each zombie type when the game is first run, and rather than destroying these zombies and re-instantiating new ones when needed, they are now pulled from the pool and then recycled for later use. This not only alleviates the risk of dropping frames caused by the runtime instantiation of such complex character prefabs during gameplay but has also cut down the time it takes to fill newly spawned quarantine zones down to a fraction of what it once was.
In the event that I request a zombie of a specific type and all zombies of that type are already in play, the game simply instantiates a new one and adds it to the pool, uses it immediately, and that zombie becomes a part of the recycling process same as any other. Since unused zombies have an indiscernible effect on performance, I can continue to spawn more and more as needed, thereby increasing the size of the pool without affecting gameplay in any noticeable way. This feature was absolutely necessary for specific game modes (e.g., Circus Mode), but also prevents the game from throwing errors if any particular type of zombie has been exhausted from the existing pool and a request is made to spawn one.
Gates and Doors
I've also rebuilt the large doors and gates that connect quarantine zones, concealing the processes that occur during the loading of a new zone. The previous setup had these gates and doors as part of each block's configuration, which worked great for the purposes of testing the concept but was impractical in the long run. The issue stemmed from the fact that the second gate - the one that serves as the entrance to the next zone that was still in the process of spawning - did not exist until said process had completed; this would have resulted in the player walking towards empty space for a brief time until everything was in place.
Now, all quarantine zones have had all doors and gates removed and instead have a gap in the outside walls where they used to be. When any zone is loaded, prefabs that contain both sides of the entryways are now spawned in these gaps, which then provides an enclosed hallway for the player to travel through while the new zone is loaded on the other side. The player never notices that the loading is taking place, and by forcing the player to walk down these halls (rather than run at default speed), they not only leave enough time for the process to complete but are also offered a bit of respite from the hectic gameplay as well.
Generic zombie attacks have also been added alongside the grapple attacks that were featured in the previous post. These attacks happen much more frequently than those in which rizn grab hold of the player and attempt to rip out their throats, and they happen much more quickly as well. These are accomplished by blending two animator controller layers; the legs continuing on as usual with the walk/run animations while the upper body plays the attack animation itself; the result is that the zombie is able to continue pursuit of the player through the entire attack, rather than having to stand still and swing at a character that has likely moved during the course of the attack. The following clip is a brief example of the work done in this area, and you can likely see that this new system is in dire need of some polish in the near future. However, my goal to test the concept and ensure it would be worth the time to do so is completed and confirmed.
Last but not least is finalizing controller support, at least for the gameplay side of things; I still have a lot of work to do insofar as adding it for UI navigation, but I'll get to that eventually. Aim settings have three options available as well, allowing the player to choose between linear, exponential, and dual-zone sensitivity. Bumpers default using to grenades and medical items and the directional pad offers a quick way to cycle through these items in the quickbar. Since implementing this, I have certainly favored using the controller for play testing sessions given that the majority of my time spent gaming is done on my XBox rather than PC. I'm hoping that by including controller support early on, I'll be well on my way to possibly releasing this game on consoles at some point.
As stated at the beginning of this post, the only large item left on my to-do list the mechanic for using research stations so the player can work towards finding a cure for the virus. I've tested everything done up to this point over and over again, and not only is it almost entirely free of bugs, but it is exceeding my hopes insofar as performance. What's planned next has me very excited about the future of this project, as I'll be adding some bits of polish where needed with the goal of recording a bunch of gameplay to be used in a trailer that will help promote the Alpha release, currently slated for this fall.