MT-CTF / capturetheflag

Capture the Flag game using the Minetest Voxel Engine
https://ctf.rubenwardy.com
83 stars 90 forks source link

Score based on skill level of opponents #42

Closed rubenwardy closed 7 years ago

rubenwardy commented 8 years ago

Just killing noobs shouldn't get you many points.

Dragonop commented 8 years ago

What about keeping track of how much time a player is alive, and when somebody kills it, gets a certain number of points based on such time?

ObaniGemini commented 8 years ago

@Dragonop : I think it would be very demanding on server ressources. Also because this would require action_timers mod which is pretty demanding. And having timers on all players all the time would surely be a lag-machine.

I was more thinking, in the same way, but with the kill counter. The more a player gets killed, the less he is valuable in score.

Maybe a function like : (1/(xkilled/32))/2 (for it never reaches the 0) or -0.25*xkilled + 16 with if result <1 result =1

asl97 commented 8 years ago

@ObaniGemini not at all, you just have to think outside the box,

just use a player-time table (hashmap/dict).

when the player join, store that time (os.time) in the table. when the player get kill, override that time in the table after adding killed_time - table[player] to the killer score.


also, your first function: (1/(xkilled/32))/2 with if result <1 result =1 doesn't really scale cross lots of matches, after a while, all player would end up only worth 1 point.

your second function: (0.25*xkilled + 16) just add more worth to player who get killed the most

rubenwardy commented 7 years ago

https://github.com/rubenwardy/capturetheflag/commit/2234a59c61db500a24a722a9649d1b2aa3124406