measurement of distance between tiles

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Freem
Posts: 23
Joined: July 12th, 2009, 7:58 pm

measurement of distance between tiles

Post by Freem »

Hello.
I recently had the idea to implement a ruler tool to measure the distance between 2 tiles, including when it's another player's turn to play.
This is one of the uses I have for current planning mode, but it's more a workaround than a true solution:

* it can't be used to measure the real distance between 2 tiles
* it can't be used for... huh... not sure about the reason... when the one playing is doing something?

The only "problem" of that tool would be that it would not take terrain costs for a unit, but it's not hard to calculate, and it could be implemented *after* if someone wish.

I could implement it myself, and I think I will, but it would make things easier if someone could give me some hints about how in-game GUI and graphic updates works. I tried to read several parts of the code, which often gives me some hints on how to do things, but I have to admit I'm lost in wesnoth's code.
Post Reply