Maintaining Creep Distance

specialist_3specialist_3 Member Posts: 121
edited November -1 in Working with GS (Mac)
Hi,

I have modified my tower defense game from spawning/destroying to recycling pre-spawned actors. My creeps follow a pre-set path and the player has to kill them while they are moving. If creeps are not killed and they complete the path, player loses a life. Each time the creeps (actors) are either killed off or complete their path, they are reset to their original start position to commence the cycle again. This seems to work fine.

BUT, when they are reset to their start position and move again, some of them seem to overlap one another OR stick close to each other. How do I maintain a certain distance between each creep?

I anticipate one suggestion that I could preset different (sequential) start positions for each creep but again the problem might persist because if a creep which starts at position 5 (furthest from start point) is killed first and then a creep which starts say at position 2 is killed next, the delay would give just about enough time for both the creeps to overlap or come too close.

Please help...

Comments

  • design219design219 Member Posts: 2,273
    I'm not sure about the best way to attack this problem, but as a related note to the other threads about spawn and destroy blocking up memory... I did some testing tonight with two of my older games and found this just doesn't seem to be true. I posted about this in the memory thread.

    Good luck with a solution.

    _________________________________

    Nesen Probe: Is this the single most unappealing game in the history of GameSalad? I can't seem to give it away! Anywhere. But if anyone want's to try it out, codes are still available! http://gamesalad.com/forums/topic.php?id=8097
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I would recommend a restraining order

    ;)
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Have you tried making them collide with each other. I'm not sure what method you are using to keep them on the path, but setting up collision for your creeps may not be an insurmountable obstacle.
  • specialist_3specialist_3 Member Posts: 121
    Tried Collision already. It disturbs the entire pathfinding. My pathfinding is based on a simple logic...if at point A, then move to point B. If collision were to be implemented, the creeps will bounce off each other landing anywhere between A and B and not know where to go. My maps have mazes so it will make it very hard to implement this.
Sign In or Register to comment.