Page 1 of 1

How to make an actor "spread" randomly?

PostPosted: Sun May 29, 2011 10:37 pm
by jimmynewguy
Okay, I've been trying to find a way to make an actor "spread" in random directions. But everything I've got so far lags and generally doesn't work too well... Ill elaborate and hopefully someone can help me out

I've got this little guy here:
virus2.png
virus2.png (1.2 KiB) Viewed 966 times

and he's in the center of the view. I want to have it where after a certain time limit he picks a random side, finds out if it's open and if so create another one of himself there. So then next time that time limit is up, they both create another and another, like a virus spreading sorta deal. The problem is when 80 or so are on the screen on my ipod it lags some thing awful. And the max that could be on the screen (the way i have it set up) is 171. Is there anyway anyone thinks I could pull this off without any/too much lag? I did a control actor that did a loop when the time limit was up sending the number of viruses there was an activation event and then they checked surroundings instead of each having a variable adding up constantly which worked for a little, but the games unplayable with the lag at the moment. Thanks for reading, hope you've got an idea or something that helps. Works pretty good on PC though :roll:

Re: How to make an actor "spread" randomly?

PostPosted: Sun May 29, 2011 10:44 pm
by Game A Gogo
When a virus is surrounded by his four sides, disable checking because you know it will never reproduce again

Re: How to make an actor "spread" randomly?

PostPosted: Sun May 29, 2011 10:47 pm
by jimmynewguy
The virus can be destroyed by the player, so that causes a bit of a problem. I'm difficult :)