-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsers #8
Comments
👍 |
I totally agree with that. lol-observer is way to generous. Needs to be fixed :D |
Perhaps we should write a "reference parser" and include unit tests for everything, then run it through all featured games for every region. |
@tyscorp i really like this idea. We should use a language everyone understand and thats easy to work with and easy to depoly. Ideas? I'd vote for js.. |
I'd vote for node ;) |
I plan on expanding https://github.com/Zero3/LolSpecAnalyzer to include a proper parser once I get some free time. It's Java. |
The one problem that I have with JS is dynamic typing. It's harder to figure out of which type a parameter for a function should be. If you're willing to add comments about params and return types, or switch to something like http://www.typescriptlang.org/ (Never used, just Googled), which is essentially JS, but has static typing, then I guess I'll be fine with JS, even though I'd prefer Java. @Zero3, if you don't feel like writing a new parser from scratch, you may contribute to https://github.com/loldevs/lol-spec, it does fail some keyframes, but this is intentional, as it means everything that does not correlate with the information in wiki should raise an exception and thus making it easier to find edge-cases/errors in wiki. Right now, it needs to collect information about sections we know nothing about, and maybe analyse this data. |
@jaagupkymmel I understand your point even when I'm a pretty big fan of dynamic typing. But I'm 100% with you regarding comments, if we write one "standard loldev leaguespec parser" there need to be a lot of comments everywhere! I'm not really sure about typescript because its one of these "compile to js" languages. Developing with them always feels awkward. Personally I'd prefer C++ over Java if we choose to not use JS but I'm fine with anything thats a "common used language". So no Haskell/COBOL/Basic/brainfuck pls. |
I'm clearly not good with data sniffing, but Java is often used for these uses. Fast to develop, and good objects typing. I'm ok with JS too. |
C++ seems a bit of an overkill for such task. Looking at the codebase we have right now, we should stick to either JS or Java. |
Okay, should we put the parser inside this repo (since the documentation is in the wiki anyway) or should we create a new one? |
I think we should have a seperate one. |
I think we should put it in this one, since the parser will be directly related to the wiki. By the way, i have a parser written in Python. In case anyone need it. |
Maybe we could just prepare some structured language-agnostic test data and provide multiple implementations ins various languages. Every one of them tested against the same set of tests. |
More importantly, can we have a test set of data to write parsers against? I'm interested in writing a parser, myself, but can't find *.rofl files, and the PBE seems to be broken and disallowing replay downloads. EDIT: Er. What @themasch said. |
I have three replays saved, already decrypted. And i could download a few more. |
I don't think that commit decrypted file is a good idea. But you can add links to pastebin or gist to your decrypted files in the wiki. |
I think we should create a parser-spec repo & collect some inputs & expected outputs decoupled from full files. Does someone know a good format for language agnostic tests? I'd suggest base64 encoded input & json output but we need to agree over a meta format. |
Json is understood by all languages (with libs or not) and can be easily read by developpers : 👍 |
Regarding my comment @ 01-03-2014: Exams are almost over, so I've started my work on a proper parser. I've piggybacked on the downloader by @jaagupkymmel (https://github.com/loldevs/lol-spec) to fetch and decrypt all keyframes for a game which worked great. So I have a test game to work with now. My plan so far is to import keyframes from disk, parse them into Java objects and output the data in JSON format, keeping the framework modular so that one may easily add additional importers and exporters. If you guys have any preferences/ideas/notes before I get too far, be sure to let me know! I agree about the strict parsing comment, which I will keep in mind. And the JSON comment as well, of course. |
Good luck for the end of your exams :) |
Do you guys think its a good idea to agree on a standard output format for keyframes and chunk? Like a JSON schema? |
Yeah, JSON seems the way to go. |
I would recommend trying to match the |
That sounds reasonable. do we know if all informations from that timeline |
I think all data are in keyframes except the The output should be the same as the timeline, with data from https://acs.leagueoflegends.com/v1/stats/game/NA1/1414415714, particularly the part I'll check this week-end if another data are available. |
@Divi events are available in the keyframes. Just because it's missing WARD_PLACED doesn't mean that the information is not there.
|
I just took WARD_PLACED as example, I didn't find anything about kill or |
Actually, I think the bottom section below turrets has more to deal with loading models and their placement for the game. Don't have a hundred percent proof, but Yonkey is listed twice as well as ShopMale, which are the models for the shopkeeper and his pet. |
When writing parsers for non-production purposes, make sure you make them as strict as possible, to make it easier to find errors in wiki.
The text was updated successfully, but these errors were encountered: