haxball / haxball-issues

114 stars 42 forks source link

Ability to use statistics on the website #1782

Open dima-dmytruk23 opened 1 year ago

dima-dmytruk23 commented 1 year ago

Hello. I am currently working on creating a website that I plan to open-source in 3-6 months and that everyone can take for themselves. This is a REST application where the back-end will be written with python, fastapi.

I had an idea to make automatic filling in the statistics of matches and players based on replays. Found this app. I thought about how to integrate it. But I can’t figure it out in any way... I have basic knowledge in JS, React, but the code here is written very difficult to somehow try to rewrite it.

https://github.com/haxball-replay-analyzer/haxball-replay-analyzer.github.io/blob/react/src/game2.js

I have a few ideas on how to do this:

  1. Send requests with analysis results from React to back-end app.
  2. Move the analyze logic to the server part (Node.JS ?) and the server will simply give JSON with the results. I would even rewrite it myself in Python, but I just can't understand this code)
  3. I can try to make some iframe on the my site (very dirty option).
  4. Parse this website with Selenium (just bad idea).

What do you think? It seems to me that such a tool would be very useful for many.

Perhaps someone already has a solution for this task, or just wants to figure it out and help me implement it. Also, perhaps you have knowledge of Python, Fastapi and you want to help me with the creation of the site.

My contacts: бун#8002 (Dicord)

wxyz-abcd commented 1 year ago

My API can read/write replays and it can also work on node.js directly. :)