View Single Post
Re: Loading other bot wayponts (standard format?) & Standardized directory structure?
Old
  (#22)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Loading other bot wayponts (standard format?) & Standardized directory structure? - 12-01-2004

I also have an ini parser ready to use, anyway:
I use 2 sorts of nav files.
.map files which hold the world data, that is, the global navmesh, that all bots know.

.nav files, which are the LINKS to different nodes of this navmesh, along with particular info about them, which are specific for each bot. The more a bot discovers links between nodes, the more it knows the map, and the better it navigates.

I propose not to worry about this separation, and in order to simplify things I'll sacrify the per-bot autonomy (only in this project, not in my bot code). I can also rebuild the topology hashtable myself out of the walkfaces pool, so it's OK if I drop it.

The file will need to have the following information, a minima. Arranged or not like this, anyway this one is the format I use - I can't simplify it more.

Quote:
; walkable faces, with all their corners.
; this is the global navmesh, the one that all bot knows. It describes
; exactly which surfaces are walkable on the map and which are not.
[walkfaces]
number_of_walkfaces = nnn

walkface0000.number_of_corners = nnn
walkface0000.corner0_location = {X, Y, Z}
walkface0000.corner1_location = {X, Y, Z}
walkface0000.corner(...)_location = {X, Y, Z}

walkface0001.number_of_corners = nnn
walkface0001.corner0_location = {X, Y, Z}
walkface0001.corner1_location = {X, Y, Z}
walkface0001.corner(...)_location = {X, Y, Z}

(...)

walkface(...).number_of_corners = nnn
walkface(...).corner0_location = {X, Y, Z}
walkface(...).corner1_location = {X, Y, Z}
walkface(...).corner(...)_location = {X, Y, Z}


; navigation links between each walkable faces (i.e, "waypoints").
; normally navlinks are between NAVNODES and not walkfaces. Doing them
; at the walkface level will make all my bots share the same nav brain.
[navlinks]
number_of_navlinks = nnn

navlink0000.index_of_walkface_it_is_for = nnn
navlink0000.location = {X, Y, Z} ;<--- HERE'S your waypoint, guys
navlink0000.reachability = nnnn

navlink0001.index_of_walkface_it_is_for = nnn
navlink0001.location = {X, Y, Z}
navlink0001.reachability = nnnn

(...)

navlink(...).index_of_walkface_it_is_for = nnn
navlink(...).location = {X, Y, Z}
navlink(...).reachability = nnnn


; "likelevels", that is, how much bots like or dislike a particular
; reachability. Reachabilities stand for the description on how to move
; from here to there. It may be a ladder, a train, a longjump, a fall, etc.
[likelevels]
likelevel_ladder = nnnn
likelevel_falledge = nnnn
likelevel_elevator = nnnn
likelevel_platform = nnnn
likelevel_conveyor = nnnn
likelevel_train = nnnn
likelevel_longjump = nnnn
likelevel_swim = nnnn
likelevel_teleporter = nnnn
See, Stefan, it's completely different. Incompatible, I would say.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote