Post by juntaou on Apr 21, 2014 21:02:42 GMT
I'm using core game kit again after not having used it since back in the killer waves days(The updates are very nice!) and started an old project back up. I'm working on a tower defense style game and the way it is set up is similar to how plants vs zombies looks. There are a certain number of "lanes" that run in a straight line all the way to defense area. The bad guys all have collision detection so they can't spawn on each other(Self high five because I was the one who originally requested that there be a min spawn distance, and the feature is awesome!). All of that is working perfectly and looks great, however I have a couple of problems I'm trying to figure out. There may already be a solution to the problems, I just haven't stumbled onto them yet.
1) Currently I use a new spawner for each lane. What I really want/need to do is make it so that all of those spawners actually pull from the same pool. So instead of having 8 spawners that all have their own pool of say 50 enemies I have 8 spawners that all pull from 1 pool of 400 enemies whenever they can. This would keep the lanes balanced so that killing enemies in a single lane wouldn't make it so that all the sudden there are lanes with no bad guys in it. It would be even until the very end.
2) I have a couple of enemies that take up 2 lanes so I need to figure out a way to make it so they can spawn in the middle of both lanes. I was thinking about creating a new spawner in the middle of each lane that would be used, but how would they communicate with the spawners to let them know they need to stop spawning things. My thought would be to make it so there is a boolean for each spawner that says canSpawn and attach a trigger to that spawner and if anything is inside the spawner tell it that it can't spawn the next enemy.
Those are the 2 things I'm looking at now, if you get a chance and can think of anything that would help me I would love to hear your thoughts on it. The second I could do myself doing the method I proposed, but am not sure that would be the best way to handle it.
1) Currently I use a new spawner for each lane. What I really want/need to do is make it so that all of those spawners actually pull from the same pool. So instead of having 8 spawners that all have their own pool of say 50 enemies I have 8 spawners that all pull from 1 pool of 400 enemies whenever they can. This would keep the lanes balanced so that killing enemies in a single lane wouldn't make it so that all the sudden there are lanes with no bad guys in it. It would be even until the very end.
2) I have a couple of enemies that take up 2 lanes so I need to figure out a way to make it so they can spawn in the middle of both lanes. I was thinking about creating a new spawner in the middle of each lane that would be used, but how would they communicate with the spawners to let them know they need to stop spawning things. My thought would be to make it so there is a boolean for each spawner that says canSpawn and attach a trigger to that spawner and if anything is inside the spawner tell it that it can't spawn the next enemy.
Those are the 2 things I'm looking at now, if you get a chance and can think of anything that would help me I would love to hear your thoughts on it. The second I could do myself doing the method I proposed, but am not sure that would be the best way to handle it.