How to make an actor "spread" randomly?

Game Editor comments and discussion.

How to make an actor "spread" randomly?

Postby jimmynewguy » Sun May 29, 2011 10:37 pm

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 969 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:
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

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

Postby Game A Gogo » Sun May 29, 2011 10:44 pm

When a virus is surrounded by his four sides, disable checking because you know it will never reproduce again
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

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

Postby jimmynewguy » Sun May 29, 2011 10:47 pm

The virus can be destroyed by the player, so that causes a bit of a problem. I'm difficult :)
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron