Skip to content
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

Input_to_gbx script #88

Open
TooPro opened this issue Sep 22, 2024 · 1 comment
Open

Input_to_gbx script #88

TooPro opened this issue Sep 22, 2024 · 1 comment

Comments

@TooPro
Copy link

TooPro commented Sep 22, 2024

Hi,

I plan to work on refactoring the input_to_gbx script. My goal is to encapsulate its functionality within a class and abstract the differences between Linux and Windows into a dedicated processManager.

Proposed Changes:
Class Implementation: The script will be transformed into a class, simplifying the usage to instantiating the class and calling a single function.
Process Management Abstraction: A new component will manage OS-specific processes, making it easier to extend support for other operating systems in the future (e.g., Mac).
Improved Readability: I will break down the script into smaller functions, enhancing readability and maintainability without altering its existing behavior.
Testing:
I will test the Windows side of the changes. If someone could assist by testing the Linux functionality after the modifications, I would greatly appreciate it.

Thank you for considering my proposal!

@pb4git
Copy link
Member

pb4git commented Sep 23, 2024

Hi,

Thank you for your proposal.

I can test the Linux side, knowing that the existing script doesn't work on my computer currently.

A few points of attention:
Architecture: when writing this script we went with the quick&dirty approach. There is a lot of duplicated code already present in /trackmania_rl/tmi_interaction/game_instance_manager.py. Maybe you will want to consider deduplicating that code? It is probable that game_instance_manager.py is more up-to-date as we have not used inputs_to_gbx.py since April 2024.

Specifications: note that this code is supposed to work with input files where the car finishes the race, as well as input files where the car fails to finish.

Performance: note that some code in /tmi_interaction/game_instance_manager.py is critical in terms of performance. We could hardly justify a regression here.

Regards,
pb4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants