Skip to content

Commit

Permalink
add some help for reading source
Browse files Browse the repository at this point in the history
  • Loading branch information
LaihoE committed Nov 30, 2023
1 parent 5ff1c36 commit 619ba71
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# stop! please read me first :)


If you are planning to read the rust source I would recommend starting with these 2 files:

parser/src/entities.rs
parser/src/collect_data.rs

Most of the interesting stuff happens here. For example ALL new decoded values pass trough this function: "decode_entity_update"

After that I would look at the 2 passes trough the file.

The parser does 2 passes trough the file:

1st pass: (parser/src/parser.rs): Fast pass trough the file, checks where packets start and end in prep for 2nd pass. Also parses 1-off things like descriptors for entity data and game events.

2nd pass (parser/src/parser_thread.rs): Multi-threaded parsing of the majority of data.

And finally you could take a peek at he game events (parser/src/game_events.rs)

The rest of the files are in some way support to the above mentioned files and are likely not too interesting to look at without deeper understanding of the demo format.

0 comments on commit 619ba71

Please sign in to comment.