Hey everybody, I am new to the engine but this is a small test of my skills so far (about 4 months) in putting together something actually playable without looking at tutorials to do it. I decided to work with what I had and create a Zombie Wave based game mode. I want to know any advise anyone has to improve, re design, or a better practice of doing any of this. Here is what I have come up with so far.
The actors & BPs are:
Custom Game Mode (Zombie Wave GameMode BP)
Wave Manager (Actor BP)
Spawn Locations (Actor)
Path Track (Actor)
Bonus Station (Actor BP)
With the custom game mode set as the default you place all the actors in the level and set the corresponding variable references.
See this diagram of the overall concept:
The whole thing is kicked off by the game mode reading round 0 initially, which sends a disaptch to the wave manager actor who does a sequence of checks then spawns zombies based on set parameters.
BeginPlay
Game mode gets a reference to the wave manager actor
Wave Manager will check for game mode, spawn locations, path tracks, bonus stations, and handles other parameters like round wait time, amount to spawn, max allowed to spawn per round, spawn radius, play music, etc.
The game mode simply keeps track of the current round number and the number of zombies remaining, if true it will dispatch to the wave manager to spawn zombies.
The wave manager will do a few checks and spawn zombies, making sure the static meshes from previous round are deleted, that there are in fact 0 zombies remaining, then runs a loop with increment to set the number to spawn which is also the value to base increment on the next round (that’s how the increase of zombies per round works at the moment), gets random value from the spawn locations array and spawns the zombie actors and gives them AI controllers.
This does work, and it seems “ok” I guess, but I am new to the engine so I don’t know what I don’t know.
My questions are:
* Do you see anything that seems very expensive in the BPs?
* Do you think conceptually this is a "good" way to set this up?
* When the zombies spawn they all come in at the exact same time which causes a slight hitch in the frame rate. How could I get them to spawn in sequentially with a 1 second delay between them?
Here is a link to all the screenshots and a video explanation, in the video I show everything so that might be easier to follow what I did.
https://drive.google.com/drive/folders/11HnJirgkzEuCxz_3tIGMBYCLDlYJUwpN?usp=sharing