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 GDK / Identity Markers

Author
Message
DarkwingDuck
15
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 6th Oct 2009 04:49 Edited at: 6th Oct 2009 06:52
A group that I am in are developing a 3d simulation software program.
cars would learn to navigate through streets,avoid objects and make decisions to either turn left or right or reverse when it senses the object. The vehicles would be behaving as if it were in real traffic, staying within the lane,etc. Which is why I'm here. How can I place some sorta marker that will tell the vehicle to not cross a yellow lane or white lane? or if I place a fire hydrant somewhere, the vehicle would recognize at as a "hydrant"?

Like assign an object a name or value? any ideas?
Isocadia
15
Years of Service
User Offline
Joined: 24th Jul 2009
Location:
Posted: 6th Oct 2009 17:07
Well what you could do is make objects out of your lane lines, and then check collision with it so it can't go over it. But I think there must be a better way.

Isocadia
DarkwingDuck
15
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 7th Oct 2009 04:24
That sounds promising and i agree there could be a better way. hopefully someone will suggest something. but thanks for your help tho.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Oct 2009 11:48
Google for Waypoints. This is a good starting point for what you want to do and will teach you the basics. However, what you are trying to do is very complex and will require much more once you've got to grips with waypoint methodologies.

DarkwingDuck
15
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 11th Oct 2009 00:38
can it be used with gdk coding?
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 11th Oct 2009 14:24 Edited at: 11th Oct 2009 14:33
Quote: "can it be used with gdk coding? "


Waypoint finding / pathfinding is a general concept, it doesn't matter which programming language you use, the principles will be the same.

I think the reason why you didn't receive many replies is that what you are trying to do is really difficult and at first sight, nobody has a clue. You will probably need a combination of waypoint finding, collision detection, movement physics, an AI, and strong optimization for all that to run at any acceptable speed. But the details you'll need to work out yourself. Since your question is the whole heart-and-soul of the project you are doing, that's what you are going to spend most of the development time on, and I doubt you'll find ready-made solutions.

Quote: "if I place a fire hydrant somewhere, the vehicle would recognize at as a "hydrant"?"


Does the vehicle really need to know what it is exactly? What matters is that it's a static object, and that it needs to be avoided. Also its size matters, to know how much the vehicle needs to turn to avoid it, but otherwise, avoiding a fire hydrant is not different from avoiding a crate, a lamp post or a building. Static objects can be detected by raycasting, for example - but again, the details are up to you.

For detecting which lane the car is in, I would try laying down waypoints and assign a type or direction to the waypoints, since the vehicle will need to know which direction it needs to follow. But I don't have an idea how to detect crossing an imaginary line in 3D space (the white or yellow lane separator). Perhaps making a 2D matrix map of the city, containing the allowed routes and their directions, and then calculating which box the car is in, so it can detect when it's out of the proper box? That seems to me the most viable concept. It would be similar to a mini-map that you can see in many games.

For collision detection, I suggest to study Sparky's plug-in:

http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5

For pathfinding, there is a good basic tutorial here, for example:

http://www.policyalmanac.org/games/aStarTutorial.htm

And an internet search will probably turn up many more articles about it.

For 3D pathfinding, there is also the Dark AI plugin, and there is a very interesting work-in-progress on this forum which may be useful to you:

http://forum.thegamecreators.com/?m=forum_view&t=157808&b=22

That's about all I can help... good luck with the project. It's a beautiful but very challenging task.
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 11th Oct 2009 16:57
Take a look at this site:

http://www.red3d.com/cwr/steer/

It has alot of information relating to agent based systems

Login to post a reply

Server time is: 2024-11-20 13:24:18
Your offset time is: 2024-11-20 13:24:18