Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / AI waypoints not working

Author
Message
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 2nd Apr 2007 00:57
I'm trying to get AI functioning in my game right now...currently the world is just a placeholder model, everything is one object. I did the ai add obstacles from level command and set the height. Then I used the show waypoints command it worked, I now have waypoints around all my objects.

Problem is that if I move though my level and have the AI following me, they try going through objects. The level is a trainyard, and I can jump over one of the cars and get to the other side of it. The AI will try to follow, but rather than going around the object it will just run right into it until it snaps through to the other side. I added into my collision checks to let it know when it's doing that (like is recommended to handle moving obstacles), so they won't snap through objects anymore. But they still just try walking through the side.

It seems like it's because of them doing this that I also get a huge FPS drop, I'll be getting around 200 FPS and then the AI will do something stupid and suddenly my FPS drop down to around 70.

And the final bit of annoyance on this is that I can't even check the waypoints to see how they're connected because if I use the show waypoint edges command, it just hangs. I tried having it automatically do it on load, which made it never show an image. If I make a button toggle showing edges in game then it will drop to 1 FPS and still not show the edges.

Any advice?
Phillip
21
Years of Service
User Offline
Joined: 4th Mar 2003
Location:
Posted: 2nd Apr 2007 12:35
Hey Catalyst I am busy with my RTS project and I am having the same problem your getting with the ai system. At first I thought is was my code until your post. I used the ai add obstacles from level command and got my object list files.txt. I imported the obstacle list to my game and did the ai debug show obstacles and that worked fine. Now when trying to move my objects they also walk through the obstacles. I did the AI debug show path command and it shows the path lines avoiding the obstacles but my objects still go through the obstacles and not follow the path of the path lines shown.

My post may not help you at the moment but I'm busy tring to see if i could solve the problem it could be my code still.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Apr 2007 12:39 Edited at: 2nd Apr 2007 12:44
I have all of this working, so it's not a bug...unless it's been introduced with one of the Upgrades.

1. Is your DBPro version and Dark AI version in SYnc? (Check your order history)

2. Have you defined your waypoints in the correct order? Clockwise and Anti-clockwise makes a difference.

3. Try checking out my AI tutorial, see if gives you any clues

4. Are your waypoints further apart than your viewing range?

5. The Dark AI update added extra parameters to fix some issues that made AI take the wrong decisions.
Phillip
21
Years of Service
User Offline
Joined: 4th Mar 2003
Location:
Posted: 2nd Apr 2007 13:19
I'm running Dark Basic Professional 6.2b with DarkAI_v105(i think v105 is the latest version of DarkAI)

The thing is the Debug show path command, shows the lines avoiding all the obsticals defined by the obsticale.txt file and taking the correct path. Its just my AI controled objects do not follow the path shown by the Debug show path lines

the weird thing is when i place an static object(obstical) in font of the ai controlled object it then avoid it at take a new path.
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 2nd Apr 2007 18:38
Well for starters I would say it's not functioning correctly since I can't call a command without it slowing to a crawl and not even displaying the waypoint edges.

Now, I'm on DBPRo 6.5 and Dark AI 1.05.

I've done my waypoints using that command, so DBPro took care of them for me...I'd certainly hope it knows what order to do it in.

I've had waypoints within viewing range, still does stupid stuff.

Update? Looks like 1.05 is the most current.

The waypoint edges not being able to show is really what's bugging me the most, I'm wondering if it tried connecting waypoints through walls or something. But again, it will slow to 1 FPS if I turn them on and they won't even show.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Apr 2007 20:36
Download my tutorial and run it. Hide the terrain to see the waypoints and stuff, as they are below ground level. Thsi example definitely worked. So if it fails now, you know something has changed in an update.
Catalyst
20
Years of Service
User Offline
Joined: 6th Sep 2003
Location:
Posted: 3rd Apr 2007 05:12
Your demo compiles. My problem is that the command to show links between waypoints, AI Debug Show Waypoint Edges, makes my system hang whenever I use it. I just want to be able to see the way it's connecting waypoints to see if it's trying to cut some of them through my objects. If all of my waypoints are done using AI Add Obstacle From Level and I use AI Complete Obstacles, there should be nothing done wrong and no reason for that command to fail, ja?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Apr 2007 17:02
Can you upload or email me the level you are using the "ai add obstacles from level" command on, and the parameters you are passing to it. I'll have a look if it is something about the level that is causing a problem.

Login to post a reply

Server time is: 2024-03-29 10:23:39
Your offset time is: 2024-03-29 10:23:39