ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Roadsweeper bot (Sdk)
Roadsweeper bot // SdkicydeeFeb 12, 2002, 2:12pm
I have written code to generate propdump files and then use XelaGot to
build the objects. This has worked fine up to now. I have generated roads, monorails, domes and forests. (about 4 million objects) However this approach cannot remove objects that have already been built. For example if I run a new road through a forest I get trees growing through the asphalt (tarmac). You can see my problem at AW 23768N 18072W Ideally I need a bot that can survey an area, identify the road objects and remove trees and shrubs (but not manhole covers!) from the area covered by the road. Any ideas? I tried once to use the SDK and MS C compiler but did not get very far! IcyDee. kahFeb 12, 2002, 3:59pm
you need to know the size of the road object to calculate if objects are in
the way... first you just query the area in question, then you have it calculate the area the road would take up (a rectangle if you're doing a straight road), and then go through the query result and check for any objects that would be inside the area where the road should be, get their X and Z location, their number and use aw_object_delete() (look in the SDK help for info on how to set this up) to remove the offending objects. If my vague explanation doesn't take you very far, I can try to write you a bit of code :-)) KAH [View Quote] icydeeFeb 12, 2002, 10:41pm
The algorithm is no problem, I have solved more complex problems :-)
I just need a sample program, in C, which would survey an area, get a list of all objects and coordinates and then delete certain objects (say all 'tree' objects) I would be willing to share my building code (roads and rivers curved using Bezier curves) in exchange. [View Quote] > you need to know the size of the road object to calculate if objects are in > the way... first you just query the area in question, then you have it > calculate the area the road would take up (a rectangle if you're doing a > straight road), and then go through the query result and check for any > objects that would be inside the area where the road should be, get their X > and Z location, their number and use aw_object_delete() (look in the SDK > help for info on how to set this up) to remove the offending objects. If my > vague explanation doesn't take you very far, I can try to write you a bit of > code :-)) > trekkerxFeb 13, 2002, 4:50am
Im shure you could re write some of the code for the sample DJ bot, since it
scans for an object then remakes it. Instead of modafying it, you could just make shure its not touching the road, and that its a tree object and delete it. -- TrekkerX Commatron & Athnex Anti AOL Activist, and some other stuff... http://www.commatron.com http://www.athnex.com [View Quote] zaphodbeeblebroxFeb 18, 2002, 10:50pm
Long track you got there icydee, rode that thing for like 30 minutes.
|