Git Product home page Git Product logo

talent's Introduction

Talent

A framework for identifying hype. Maybe someday. ๐Ÿ˜„

For now: yet another GoldSrc parser, built with fp-ts, and some utilities built on top of it!

Packages

Applications

Name Description On npm?
@cgdangelo/talent-jsonify-demo Runs the demo parser and logs to console. โœ…
@cgdangelo/talent-demo-renamer Renames a list of demo files to YYYY-MM-DD_HHMM_{map}.dem.
@cgdangelo/talent-example-demo-analyzer Example of a real-time demo analysis application using the demo parser event bus.

Libraries

Name Description On npm?
@cgdangelo/talent-parser-goldsrc Parser combinators for a GoldSrc demo file. โœ…
@cgdangelo/talent-parser-bitbuffer Parser combinators for bit-packed fields. โœ…
@cgdangelo/talent-parser-buffer Parser combinators for a Buffer. โœ…
@cgdangelo/talent-parser General use parser combinators. โœ…
@cgdangelo/talent-observable fp-ts bindings for rxjs observables.

What's working?

Demos can be parsed in their entirety. This includes all frame types, and all SVC_ engine messages contained with a NetworkMessages frame. User message parsing is limited to returning the message id, name, and raw data. Since the data in a message can vary between mods (e.g., DeathMsg) these parsers may have to reside in mod-specific packages.

What's coming? What's maybe coming?

The original goal of this project was to create a GoldSrc demo parser that could translate in-game events into readable data structures and emit them through observables for analysis. In particular, the ability to identify "hype" moments through some set of heuristics, such as:

  1. Multi-kills: Multiple frags at (roughly) the same timestamp, implying only one shot fired.
  2. Fast-paced streaks: multiple frags within a short period of time.
  3. High survivability: High number of frags between spawn and death.
  4. Events leading to a win condition, such as:
    • (Counter-Strike) Defusing the bomb with enemy players still alive could be a ninja defuse.
    • (Counter-Strike) Multiple kills in a disadvantaged situation (1v3, 1v4, 1v5) into a bomb defusal. This could be a CT retaking the bomb site and clutching the round.
    • (Day of Defeat) Multiple kills into a round win. This could be a streak that leads to a cap-out.
  5. Events that are otherwise important because of their circumstances:
    • (Day of Defeat) Breaking a double cap in progress when the enemy team controls all other flags, thereby preventing a cap-out.
    • A rapid change in crosshair angles followed by a kill. This could be a flick shot.

Contributing

This is a monorepo managed by Rush. You will need the Rush tool to continue:

npm install -g @microsoft/rush

Running applications

git clone https://github.com/cgdangelo/talent.git
cd talent
rush update
rush build

node ./apps/<name-of-app>/lib/index.js [app params]

Prior art

References

talent's People

Contributors

cgdangelo avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chinese-soup

talent's Issues

Help with bringing up

Hello.
Hope you don't mind if I use the issue tracker to ask for help, I tried to message you on Discord, but you have your DMs closed.

First of all thanks again for creating the most complete documentation of Half-Life demos yet and for the parser!

I wanted to crosscheck some results using your code, however I am completely new to this Java/TypeScript 2010s+ ecosystem so I was wondering if you could give me a hint. I have done:

yarn install # in the root talent directory

This installed fine after I commented out a macOS-only dependency called fsevents (which I found out here: https://stackoverflow.com/questions/57082249/how-to-fix-error-fsevents2-0-7-the-platform-linux-is-incompatible-with-thi).

However, when I try to run the for example, the cli, this happens:

$ bin/talent ~/hl/valve/test.dem 
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module '../lib/index'
Require stack:
- /home/unko/repos/talent/packages/cli/bin/talent
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/home/unko/repos/talent/packages/cli/bin/talent:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/home/unko/repos/talent/packages/cli/bin/talent' ]
}

Node.js v19.0.0
โ”Œโ”€โ”€[unko@ryzen]โ”€[~/repos/talent/packages/cli/bin] 
โ””โ”€โ”€$ cat talent
#!/usr/bin/env node

require("../lib/index");
โ”Œโ”€โ”€[unko@ryzen]โ”€[~/repos/talent/packages/cli/bin] 
โ””โ”€โ”€$ /usr/bin/env node # just to check node is actually where it should be
Welcome to Node.js v19.0.0.
Type ".help" for more information.
> 

Which makes sense, seeing as I am apparently missing a lib directory?

โ”Œโ”€โ”€[unko@ryzen]โ”€[~/repos/talent/packages/cli] 
โ””โ”€โ”€$ find
.
./tsconfig.json
./package.json
./bin
./bin/talent
./src
./src/index.ts
./README.org
./jest.config.js
./test
./test/index.test.ts
./node_modules
./node_modules/@types
./node_modules/@types/node
./node_modules/@types/node/stream
./node_modules/@types/node/stream/promises.d.ts
./node_modules/@types/node/stream/web.d.ts
./node_modules/@types/node/stream/consumers.d.ts
./node_modules/@types/node/timers
./node_modules/@types/node/timers/promises.d.ts
./node_modules/@types/node/vm.d.ts
./node_modules/@types/node/buffer.d.ts
./node_modules/@types/node/readline.d.ts
./node_modules/@types/node/events.d.ts
./node_modules/@types/node/querystring.d.ts
./node_modules/@types/node/url.d.ts
./node_modules/@types/node/tty.d.ts
./node_modules/@types/node/dgram.d.ts
./node_modules/@types/node/v8.d.ts
./node_modules/@types/node/domain.d.ts
./node_modules/@types/node/fs
./node_modules/@types/node/fs/promises.d.ts
./node_modules/@types/node/os.d.ts
./node_modules/@types/node/process.d.ts
./node_modules/@types/node/https.d.ts
./node_modules/@types/node/http.d.ts
./node_modules/@types/node/dns
./node_modules/@types/node/dns/promises.d.ts
./node_modules/@types/node/fs.d.ts
./node_modules/@types/node/child_process.d.ts
./node_modules/@types/node/package.json
./node_modules/@types/node/net.d.ts
./node_modules/@types/node/repl.d.ts
./node_modules/@types/node/LICENSE
./node_modules/@types/node/console.d.ts
./node_modules/@types/node/perf_hooks.d.ts
./node_modules/@types/node/README.md
./node_modules/@types/node/http2.d.ts
./node_modules/@types/node/assert
./node_modules/@types/node/assert/strict.d.ts
./node_modules/@types/node/crypto.d.ts
./node_modules/@types/node/async_hooks.d.ts
./node_modules/@types/node/zlib.d.ts
./node_modules/@types/node/module.d.ts
./node_modules/@types/node/trace_events.d.ts
./node_modules/@types/node/timers.d.ts
./node_modules/@types/node/punycode.d.ts
./node_modules/@types/node/util.d.ts
./node_modules/@types/node/path.d.ts
./node_modules/@types/node/diagnostics_channel.d.ts
./node_modules/@types/node/dns.d.ts
./node_modules/@types/node/cluster.d.ts
./node_modules/@types/node/string_decoder.d.ts
./node_modules/@types/node/globals.global.d.ts
./node_modules/@types/node/index.d.ts
./node_modules/@types/node/globals.d.ts
./node_modules/@types/node/constants.d.ts
./node_modules/@types/node/stream.d.ts
./node_modules/@types/node/wasi.d.ts
./node_modules/@types/node/tls.d.ts
./node_modules/@types/node/worker_threads.d.ts
./node_modules/@types/node/assert.d.ts
./node_modules/@types/node/inspector.d.ts
./node_modules/.bin
./node_modules/.bin/talent

Again, sorry for misusing the issue tracker, but any pointers would be highly appreciated! :)

Documentation on delta for GoldSrc demo

Great work on this.

I am trying to write my own demo writer but now I am working through delta. I hope you won't mind writing documentation on it since apparently you are the best at writing docs for GoldSrc demo as of now.

Regardless, I am still plowing through it by reading your delta decoding snippet along with this and this.

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.