1 (edited by traitor 2012-09-23 22:45:11)

Topic: How to measure the covered distance?

Hello everybody

Today I thought about some statistics within the game, so please accept this as raw result of my mind smile
Normally I have results for captured flags and score points per player (kills and grabbed flag) and team.

So I came up withthe following: it could be interesting to distinguish players by movement/time (=speed) or covered distance during a match. Teeworlds provides some kind of measurement unit already: the size of a tee or tile you paint in the editor. Count how many of those zones are passing by? (maybe count only those where a tee had more than 50 percent of its body, not every tiny crossed corner of a zone)
Is it somehow possible or even accomplished within the client?

This is not about a technical solution for myself, because I don't know anything about code. Instead this could serve as idea for you.
As end user, player actually, I would like to see this in some kind of extended scoreboard.


addition:
Hopefull this is the right place for this kind of request

2 (edited by BotoX 2012-09-24 19:08:28)

Re: How to measure the covered distance?

Easy going. (Everything in CCharacter)
Make a variable m_PrevPos (like m_PrevInput) and save m_Pos in it in the end of every tick (also set it to m_Pos at OnSpawn()).
Then add another variable which is ummm. m_MovedDistance
After m_Core.Tick(true); you do m_MovedDistance += distance(m_PrevPos, m_Pos);
Remember that after you die the variables will be lost (I THINK) save it in CPlayer if you want them to persist after dieing.

This is not about a technical solution for myself, because I don't know anything about code. Instead this could serve as idea for you.
As end user, player actually, I would like to see this in some kind of extended scoreboard.

ffs. haven't read that hmm

3

Re: How to measure the covered distance?

But I am glad ypou present a solution so quickly.
Unfortunately I can not make use of your suggested code.

Do you know about an implemented solution in any client?
Could you imagine people might be interested having this feature?

4

Re: How to measure the covered distance?

traitor wrote:

Do you know about an implemented solution in any client?
Could you imagine people might be interested having this feature?

TDTW includes speedometer and i am pretty sure walking distance recorder too

As many other things on planet, this one can be solved with Vi.

5

Re: How to measure the covered distance?

Hello D86leader

I have found the client and tested it, looks nice, is stuffed with features, does not consume all of my CPU....
but I can not find something like a speedometer.
Maybe you can tell me where to activate it?

6

Re: How to measure the covered distance?

Hello traitor

o_O you're right, TDTW developers removed speedometer. I certanly can remember measuring speed in race and fastcap. Maybe this is connected to changing dev team of tdtw. Well, sorry for wrong information -.-

As many other things on planet, this one can be solved with Vi.

7

Re: How to measure the covered distance?

Oh never mind, perhaps some day I will find a solution smile

8

Re: How to measure the covered distance?

Sushi pack client has the ability to turn on the speedometer i believe.

9 (edited by traitor 2012-09-28 01:09:03)

Re: How to measure the covered distance?

Hm, are you sure that I could show the distance I moved during a match? I could not find it either, maybe I am looking at the wrong places?

Yet I have some trouble with this client, because it consumes 60% of CPU power, while default client only uses around 35% with "same" settings. So my notebook feels like a hair-dryer and sounds alike....
Anyway, thank you for your answer.
It has one neat feature, to disabled specific layer in a map during the game smile


To push my topic in another direction:
when I press ctr/shift/d to look at debug information I see right hand some position information, could not a client store all the changes and calculate the distance?
There are so many features I do not use, maybe someone could embed this one? Might be considered as useless for most, but somehow interesting data for comparison smile

10

Re: How to measure the covered distance?

Hi, i took a look and i have even an answer:
you can calculate the position if you store the positions you get every pingtime and then just use length(OldPosition-NewPosition) or distance(OldPosition, New Position) or the Pythagorean theorem^^

#yemDX is a known troll