Best method to make make monsters move around in singeplayer

Discuss Artificial Intelligence and Bot programming.
Post Reply
SamUK
Posts: 101
Joined: Wed Dec 17, 2008 6:47 pm
Location: United Kingdom

Best method to make make monsters move around in singeplayer

Post by SamUK »

Solitude has started adding singe player monsters. I've got two questions.

1) What is the best method to make monsters move around in quake. I want it to look more natural, instead of them moving zig-zaged.

2) There's a specific monster, that I want to be able to walk on walls (Not the ceiling) is that possible?

Thanks.
Working on Solitude
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

All of this is possible, and there's no best method. You'll really need to be more specific on what you're after. For example, do you want navigation, or just movement? To give a simple answer on #1, try mauvetogoal (NOTE: I don't mean movetogoal).
I was once a Quake modder
SamUK
Posts: 101
Joined: Wed Dec 17, 2008 6:47 pm
Location: United Kingdom

Post by SamUK »

Navigation, but I'd want to avoid the zig-zag effect often present with quake characters movement.

I'll give it a shot.

For number 2, it's just random movement, it's a parasite so it doesn't really move around with intelligently.
Working on Solitude
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

why not just set its goal as the player?
SamUK
Posts: 101
Joined: Wed Dec 17, 2008 6:47 pm
Location: United Kingdom

Post by SamUK »

Because then they'll be still until they notice the player, which just wouldn't look good.

Also, it wouldn't work, as one monster tends to get scared if he see's others of his type die. When he gets' scared, he runs away from the player.
Working on Solitude
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

why not code it to ignore that? (iv never seen it happen)
SamUK
Posts: 101
Joined: Wed Dec 17, 2008 6:47 pm
Location: United Kingdom

Post by SamUK »

To ignore what?
Working on Solitude
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

other similar monsters dying or running away which ever.
Chip
Posts: 575
Joined: Wed Jan 21, 2009 9:12 am
Location: Dublin, Ireland
Contact:

Post by Chip »

I imagine a Left4Dead scene where monsters run towards the player describing a semi circle or a circle arc.

That would be nice, and scary.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays

Fear not the dark, but what the dark hides.
Team Xlink
Posts: 368
Joined: Thu Jun 25, 2009 4:45 am
Location: Michigan

Re: Best method to make make monsters move around in singepl

Post by Team Xlink »

SamUK wrote:Solitude has started adding singe player monsters. I've got two questions.

1) What is the best method to make monsters move around in quake. I want it to look more natural, instead of them moving zig-zaged.

2) There's a specific monster, that I want to be able to walk on walls (Not the ceiling) is that possible?

Thanks.
For the first one, I am/have been doing some work on our AI and that is partly done.

For the second one, yes it is possible.
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Post by Downsider »

As far as walking on walls, you can simply trace outwards and apply force toward the wall when the trace hits or set the origin against the wall, then move along the wall's angles instead of the standard ones.
MauveBib
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Post by MauveBib »

Yay, MauveToGoal got a mention!

btw the easiest way to get rid of the zig-zag of movetogoal is to make movetogoal seconday, something like this (untested).

Code: Select all

void(float howquick) MauveWalk =
{
     self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
     ChangeYaw();

     if (!walkmove(self.angles_y, howquick))
          movetogoal(howquick);
};
Then it'll only use movetogoal if it hits an obstacle, else run directly towards the target. It'll probably get stuck a lot more though.


Also, I'm totally back.
Apathy Now!
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

MauveBib wrote:Yay, MauveToGoal got a mention!

btw the easiest way to get rid of the zig-zag of movetogoal is to make movetogoal seconday, something like this (untested).

Code: Select all

void(float howquick) MauveWalk =
{
     self.ideal_yaw = vectoyaw(self.goalentity.origin - self.origin);
     ChangeYaw();

     if (!walkmove(self.angles_y, howquick))
          movetogoal(howquick);
};
Then it'll only use movetogoal if it hits an obstacle, else run directly towards the target. It'll probably get stuck a lot more though.
Wait, isn't this how mauvetogoal works? Am I missing something? :P
MauveBib wrote:Also, I'm totally back.
Yay!
I was once a Quake modder
MauveBib
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Post by MauveBib »

That was the original mauvetogoal idea as used in several mods, but the one you linked to uses .movement etc for a movetype_walk entity in DP. Botclient stuff, y'know.
Apathy Now!
Teiman
Posts: 311
Joined: Sun Jun 03, 2007 9:39 am

Re: Best method to make make monsters move around in singepl

Post by Teiman »

SamUK wrote: 2) There's a specific monster, that I want to be able to walk on walls (Not the ceiling) is that possible?
I think you can make it "fly" so high it almost "touch" the sky. You will rotate the model 180degrees, to make it look "walking" on the ceiling. If the ceiling is flat, the effect will be perfect, I guest.
Post Reply