Page 1 of 1

Adventure games and enemies

PostPosted: Wed Oct 17, 2007 7:12 am
by DollMaster
I am working on an adventure game similar to and rpgish zelda or cystalis. And I am trying to decide how to do enemies.

What I am leaning towards is what TSR's Dark Sun does and randomly scatter encounters or groups as a player enters a level. ie instead of wolves being randomly disbursed through a level, there will be a pack of wolves somewhere. I do not want all parties of enemies attacking the player at once, so I was going to use activation regions. I would place activation regions throughout my level. Then as the player enters the level, encounters would be randomly placed into these regions, or not placed.

I need to now figure out what types of AI I need. I have the cannon fodder "guy walking towards you slowly"

I want:

Warrior type:
chases you fast and swings weapon like you
Shooter:
tries to stay away and shoot you while cannon fodder or warrior kills you
Animal/creep:
just wanders randomly
Wolf:
circles around you in a pack and randomly moves in to strike

Does anyone have any suggestions on other AI I can include? Or how to go about the Wolf AI? I was thinking a circular path, but I wouldnt know how to get the wolf to stay circling.

Re: Adventure games and enemies

PostPosted: Tue Oct 23, 2007 11:41 am
by Bee-Ant
Maybe you can use this code to make wolves move around you...
player>CollisionEvent>WolfRegion>ScriptEditor>
Code: Select all
active=1;

Wolf>DrawActor>ScriptEditor>
Code: Select all
if(active==1)
{
    if(wolf.y<player.y-1&&wolf.x==player.x)
    {
         x=x+1;
         y=y-1;
    }
    if(wolf.y==player.y&&wolf.x>player.x+1)
    {
         x=x-1;
         y=y+1;
    }
    if(wolf.y>player.y+1&&wolf.x==player.x)
    {
         x=x-1;
         y=y-1;
    }
    if(wolf.y==player.y&&wolf.x<player.x-1)
    {
         x=x+1;
         y=y-1;
    }
}

I don't know it will works or not :(

Re: Adventure games and enemies

PostPosted: Tue Oct 23, 2007 10:20 pm
by DollMaster
thanks, ill probably give it a try tonight.