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 / Using Dark AI with 3dws

Author
Message
dononeton
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 17th Jun 2007 21:23 Edited at: 17th Jun 2007 21:34
My level loading code. Modified Inca Engine




My main loop




I am including my test map.

Now my problem is that my monster entity is going to follow the path but it will not follow the entire path. The monster will go about 1/4 to 1/2 of the way and just turns around. What am I doing wrong

AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB

Attachments

Login to view attachments
dononeton
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 20th Jun 2007 05:07
ok instead using the entities to set my WayPointMarkers I am going to uses brushes that is named WayPointMarker. Now from where my monster gets spawned and he will moved to the first WayPointMarker but does not move to the next. My guess is its not setting up all of the WayPointMarker so anyway here is my load world code



AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB
dononeton
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 21st Jun 2007 03:34
Can anyone help

AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 28th Jun 2007 11:44 Edited at: 28th Jun 2007 11:45
The way that I do it, (not necessarily the best way!) is to create a point entity in 3DWS called container. Then in my code, I store these points in an array until all other map parts have been loaded.

Once all other map parts have been loaded, I then go through the array of points and use ai add obstacle from level creating a different container for each. This I believe is the way that FPSC does it, by the means of different heights representing different containers.

Edit: I'm not currently at my home computer but I will try and post some example code when I get home.

I know the voices aren't real, but they have good ideas!
dononeton
19
Years of Service
User Offline
Joined: 12th Jun 2004
Location: Tusaloosa, AL : USA
Posted: 29th Jun 2007 04:22 Edited at: 29th Jun 2007 04:23
@monotonic

Thank god I did not think anyone was going to reply.
My aiobstacle code works fine for now. I did not know about ai add obstacle from level . That might work better. I give it a try. My problem was adding AI Path Add Point. I set this up in 3dws but when I run my game the player just goes to the first point and stops

AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 29th Jun 2007 15:39
From the code you have posted I can see a problem with the obstacle loading code. When you create a corridor for instance in 3DWS you create your floor, walls and roof seperately, each of these unless you have given them a classname will become bspwall and not brush.

Also if you have given them a classname and they are of type brush, the above code will create an obstacle for the walls which is good, but also it will create an obstacle from both the roof and the floor. You have to think about the A.I system in a 2D way, in 3DWS if you look at the map from a top down view all you can see is the roofs or ceilings, this is what DarkAI will see to.

The ai add obstacle from level takes a height an object id and some other parameters such as container id. It then creates a plain at the specified height an builds the data from whatever it intersects.

If you look at the path finding example that comes with DarkAI you will see this in action, if I remember correctly.

I know the voices aren't real, but they have good ideas!

Login to post a reply

Server time is: 2024-05-03 21:43:33
Your offset time is: 2024-05-03 21:43:33