GithubHelp home page GithubHelp logo

gameye / halflife-statistic Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 4.72 MB

Statistics for halflife engine games (TF2, CS:GO)

License: Other

Gherkin 22.01% TypeScript 77.37% Shell 0.22% JavaScript 0.40%
csgo half-life tf2

halflife-statistic's People

Contributors

elmerbulthuis avatar slawteruk avatar smashmint avatar tngps avatar

Watchers

 avatar

halflife-statistic's Issues

connect players to teams

let's fill the player field per team! players can basically join and switch teams during the match. When a player is in a team he will have a true value in the player hash of the team, the playerKey is used as a key in the hash.

Whe the player goes out if the team, this value will be set to false.

tournament mode logs the first round start twice

It seems there is a bug when you active the "tournament mode" in TF2.

When activating this it outputs the first Round_Start event twice at the same second:

L 03/26/2018 - 13:18:47: "denise<4><[U:1:437819661]><>" entered the game
L 03/26/2018 - 13:19:05: "denise<4><[U:1:437819661]><Unassigned>" joined team "Red"
L 03/26/2018 - 13:19:10: "denise<4><[U:1:437819661]><Red>" changed role to "soldier"
L 03/26/2018 - 13:19:20: World triggered "Round_Start"
echo "Playing..."
L 03/26/2018 - 13:19:20: World triggered "Round_Start"
Playing...

create empty ft2 reducer

Hey @TNGPS we use github issues for issue tracking. I figured a good first step could be to make an empty tf2 reducer. Also this is issue is there to get you familiar with github issues a little bit :-)

implement backstab statistic

when a player is created, set this statistic to 0, when the match restarts, set it to 0. increment is when a backstab is done

reduce player connected states

in the PlayerContainerState there is a player field that is a hash of all players that are related to the match. When a player connects he should be added to this list, when he disconnects, the connected field of the player should be set to false.

Teams have a statistic property, we will set that to an empty hash {} for now.

figure out the game mode

We implement 3 game modes in team fortress. These are not present in the state but should be known to the reducer internally.

The game modes that we support are:

  • payload
  • control-points
  • king-of-the-hill
  • payload-race

reduce teams

In the TeamContainerState there is a team property that holds all the states. These should be populated.

There is always a red and a blue team, these should be the initial names of the teams also, but a team can change it's name. This should be reflected in the properties of each team in the state.

Teams have a statistic property, for now we just leave it empty, also teams have a player property, we will also leave that empty for now.

log line order is not as expected

looking at fixtures/logs/tf2/tf2-6v6test-payload-v2.log we see the last pointcaptured event taking place AFTER the Round_Win we expect this event to happen before that.

L 05/10/2018 - 10:57:54: Team "Blue" triggered "pointcaptured" (cp "1") (cpname "#Badwater_cap_2") (numcappers "1") (player1 "elmerbulthuis<4><[U:1:426663176]><Blue>") (position1 "1503 1443 361") 
L 05/10/2018 - 10:58:51: Team "Blue" triggered "pointcaptured" (cp "2") (cpname "#Badwater_cap_3") (numcappers "1") (player1 "elmerbulthuis<4><[U:1:426663176]><Blue>") (position1 "-1501 -19 617") 
L 05/10/2018 - 10:59:24: World triggered "Mini_Round_Win" (winner "Blue") (round "Round_A")
L 05/10/2018 - 10:59:24: World triggered "Mini_Round_Length" (seconds "299.08")
L 05/10/2018 - 10:59:24: World triggered "Round_Win" (winner "Blue")
L 05/10/2018 - 10:59:24: Team "Red" current score "4" with "1" players
L 05/10/2018 - 10:59:24: Team "Blue" current score "4" with "1" players
**L 05/10/2018 - 10:59:24: Team "Blue" triggered "pointcaptured" (cp "3") (cpname "#Badwater_cap_4") (numcappers "1") (player1 "elmerbulthuis<4><[U:1:426663176]><Blue>") (position1 "-2884 1414 617")**
L 05/10/2018 - 10:59:34: World triggered "Game_Over" reason "Reached Round Limit"```

all have the same timestamp ....

reduce `startedRounds` and `finishedRounds`

The properties startedRounds finishedRounds are part of the RoundState intrface. These numbers should be increased when a round starts or finished. Also they should be reset to 0 when a match starts and after a match is over they should not change anymore.

Not use moment.js

using moment.js leads to big bundles, it can easily be removed, so let's!

Determine winner in TF2 payload mode

When playing a match of TF2 in the payload mode with tournament mode enabled both teams can score 1 point in a match but there is still a winner.

When the blue team captures 1 point in the first round in 1 min. 20 sec. and the red team captures the first point under 1 min. 20 sec. the score will be 1:1 but team red wins the match.

img_2183

Add match start / stop statistic

These belong to the StartStopState interface. This interface has a property start and stop that initiallly should be null. These number should be set to a number that represents the number of milliseconds since 1970 (how js stored dates internally) when the match is started or stopped.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.