You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Error Reporting  \  pathfinding

Back to Threads

Viewing Thread: pathfinding

 

lgatti

Joined: 08 October 2003
Posts: 7
27 April 2005 08:16 (UK time)

Units do no obstacle avoidance (they pile up against anything and stop forever, esp. against parked vehicles).


Edited: 28 April 2005 17:03


You need to login to create posts in this thread.

Assain

Joined: 02 November 2003
Posts: 979
27 April 2005 21:01 (UK time)

Ah yes. The realease version will inlcude a better object detection system for objects (will stop getting stuck on objects, them pileing up, ect).

You need to login to create posts in this thread.

fuzinavl
 Official Sponsor

Joined: 06 October 2004
Posts: 287
19 January 2006 17:16 (UK time)

I recommend x_movement and y_movement be done in 2 seperate steps. Objects will slide instead of sticking. (C-dogs uses this method)

You need to login to create posts in this thread.

James Bunting
Joined: 17 September 2003
Posts: 1308
20 January 2006 00:41 (UK time)

Yes a simple but promising method I guess. Provided there are no L shaped bits most of them should find their way ok.

The big question is which way to slide lol.

You need to login to create posts in this thread.

fuzinavl
 Official Sponsor

Joined: 06 October 2004
Posts: 287
20 January 2006 02:23 (UK time)

"big question is which way to slide lol."
(sorry, I don't get it) Sliding is only possible at right angles to to world, but the steps are too small for that to matter.

I just got another idea: semi-correct grenade bouncing:
If hits on x_movement, reverse x_velocity component.
If hits on y_movement, reverse y_velocity component.

Edited: 20 January 2006 02:28


You need to login to create posts in this thread.

James Bunting
Joined: 17 September 2003
Posts: 1308
20 January 2006 09:54 (UK time)

Here is what I mean about the sliding...

Given a destination (marked in the example images by a big yellow X) a unit must walk to it while avoiding an obstacle (a police car in this case).

Example 1 shows how this would work using x/y sliding without a right angled obstacle collision.

Example 2 shows a right angled collision version where a "choice" has to be made over which direction to slide.

Your bouncing grenade logic sounds simple and fun, I will trial this. However I will throw in a "bit" of vector randomisation to make the grenade paths slightly unpredictable (this could simulate the er Z axis or bumpy walls lol). The problem with grenade bouncing has always been that walls run at all kinds of angles (not up down/left right like in M1).


James



You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
20 January 2006 13:01 (UK time)

Like, that example 1 could be avoided? Heh, it came a bit humoristic...

But, if you make it, this is going to be cool. I can't imagine that you've done this far, Meteor 2 with multi, great textures, objects, sprites, dynamic light source, like, this has been quite a job for you, I can imagine that.

The pathfinding, well, it makes the units close to a human intelligence. All what you would need to have is troops avoiding missles (example 2) XD

Nah, it would do the game too hard...

You need to login to create posts in this thread.

fuzinavl
 Official Sponsor

Joined: 06 October 2004
Posts: 287
20 January 2006 16:21 (UK time)

Ah. I thought of this myself before you posted.
I didn't think you'd be opening up the pathfinding can o' worms!

Moving objects: wait for them to pass / shoot them depending on team.

Stationary objects / walls. ONLY IF AI character gets stuck on a STATIONARY OBJECT:
(minimum wall width == 4?) set up a grid of points in the local area covering 2 control points. The points are every 8 pixels. Use A* to set up control points between the last waypoint visited and the next waypoint. Those control points might be updated if a door opens / bridge appears in that local area. This new set of control points should be binded to the previous control point somehow, and not to a main waypoint strip. (don't want to mess up scripting)

For enemies: set up 2 waypoints if possible. After the first path is setup using A*, Set a medium weight to those used control points and the 8 points surrounding each of them.

Your team's AI should only shoot through stationary vehicles as scripted events. (might get annoying when the vehicles you want are destroyed.) Should enemy AI shoot through stationary vehicles?

Grenade bouncing: assuming right angled walls would be better for deterministic netcode.

Forget the complex pathfinding stuff for now. One thing at a time! I'd like to see the sliding thing done first.

--jim

Edited: 20 January 2006 16:31


You need to login to create posts in this thread.

James Bunting
Joined: 17 September 2003
Posts: 1308
20 January 2006 20:59 (UK time)

Can of worms - yes well put.

If I made the units remember a few things and make them slide then they could be a lot smarter.

These go hand in hand because they remember nothing at the momenet so when they slide they will just reset their path on each cycle lol. I could add "virtual waypoints" in code to make them walk around stuff by tracing a few lines (nothing too complex cos I don't want to open those worms).

The net prediction for grenades is not really a problem as the server sends a small packet (2 or 3 bytes) when a grenade bounces to update the clients. I found that I need to occasionally send projectile location packets as slower clients can get out of sync pretty quick.

In other news:
The net code is also a can of worms but that is one I am happy to open as it really needs a kick in the ass (its still too laggy, therefore I am sending too much). I will seriously streamlining the packets (plus there is no prediction right now).

James

You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
21 January 2006 11:33 (UK time)

What do you mean with "can of worms"

You need to login to create posts in this thread.

fuzinavl
 Official Sponsor

Joined: 06 October 2004
Posts: 287
23 January 2006 16:45 (UK time)

Old American slang meaning to bring out a bunch of little problems.

if main_waypoint_node has sub_waypoints,
then follow sub_waypoints
else proceed directly to next main_waypoint_node

worm#1: If sub_waypoints change while on them, then ??
worm#2: what shape & size area should the A* algorithm encompass ??
worm#3: there should be 2 sub_waypoints for each main_node for automatic flanking maneuvers. (chosen randomly)
worm#4: should the AI know how to open doors / operate drawbridges ??

aleksanteri: I like your dodging idea. Brings to mind the AI behavior editor in C-dogs.

James: what do you mean by "packet streamlining"?

Edited: 23 January 2006 16:55


You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use