Wesnoth code - shortest way calculation and coordinates
Moderator: Forum Moderators
Wesnoth code - shortest way calculation and coordinates
Hi,
I would like to know how in Wesnoth is calculated the shortest way for a unit and a circle how far the unit can go. I'm not concerned about terrain obstacles, but only about the princip.
And second think that is related with the first question is how BfW works with coordinates. Is for the calculate used the one from the game map (0,0, 0,1, ...) or there is some more complicated system like this: http://bluubekt.s3.amazonaws.com/pastebin/hex.gif.
I don't know C++ very well so I can't look at it directly into the code.
I'll use this informations for develop my project Wesnoth Online (http://forums.wesnoth.org/viewtopic.php?f=36&t=35275)
Sorry for my English
I would like to know how in Wesnoth is calculated the shortest way for a unit and a circle how far the unit can go. I'm not concerned about terrain obstacles, but only about the princip.
And second think that is related with the first question is how BfW works with coordinates. Is for the calculate used the one from the game map (0,0, 0,1, ...) or there is some more complicated system like this: http://bluubekt.s3.amazonaws.com/pastebin/hex.gif.
I don't know C++ very well so I can't look at it directly into the code.
I'll use this informations for develop my project Wesnoth Online (http://forums.wesnoth.org/viewtopic.php?f=36&t=35275)
Sorry for my English
Re: Wesnoth code - shortest way calculation and coordinates
[edit] sorry, didn't read your question carefully enough - you already stated that you don't know c++ [/edit]
http://svn.gna.org/viewcvs/wesnoth/trun ... cation.hpp
http://svn.gna.org/viewcvs/wesnoth/trun ... cation.cpp
and higher level stuff (that e.g. takes terrain into consideration):
http://svn.gna.org/viewcvs/wesnoth/trunk/src/pathfind/
http://svn.gna.org/viewcvs/wesnoth/trun ... cation.hpp
http://svn.gna.org/viewcvs/wesnoth/trun ... cation.cpp
and higher level stuff (that e.g. takes terrain into consideration):
http://svn.gna.org/viewcvs/wesnoth/trunk/src/pathfind/
Last edited by Max on November 10th, 2011, 9:58 pm, edited 1 time in total.
Re: Wesnoth code - shortest way calculation and coordinates
Thanks. But I know only C#, PHP, JavaScript, HTML, SQL and CSS .
C++ is little bit different and I can't orientate in it.
C++ is little bit different and I can't orientate in it.
Re: Wesnoth code - shortest way calculation and coordinates
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."