-
I'm writing something I'm calling OpenTTDLab https://github.com/michalc/OpenTTDLab (really early version: proof of concept really) to run sets of experiments using OpenTTD from Python, e.g. from JupyterLab. I would like to make it really easy to use it with AIs published at https://bananas.openttd.org/, so without having to even fire up OpenTTD "manually" to download them. Would it be acceptable for me to write a Python client to do this? I note at https://bananas.openttd.org/ it does say "For downloading content, please use OpenTTD's built-in content downloader", so I'm not sure if I should really. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
What a cool project! Do keep us updated on how it is going, and how you are using it. For your questions, there are a few possible answer. We have been willing to add in-game the ability to automatically download all missing content from BaNaNaS, if you load a game that is missing any. So you can just do For downloading yourself via a Python client or what-ever, there isn't any issue to do so. Our ToS allows you to download the latest version of content; and although the idea of course is that it is done via the OpenTTD client, that can't be guarded. That said, if you go that path, I do have three requests:
In other words: be a good neighbour, and go nuts. Be a bad neighbour .. and I might get mad :P If you need any help deciphering how the TCP protocol and HTTPS dance works, let me know. Easiest is via Discord, but via this Discussion is also fine. Happy hacking! |
Beta Was this translation helpful? Give feedback.
-
To maybe inspire you a bit what we have been wanting for years now, but never really got the time to build, or didn't take the time to build: When we release a new OpenTTD version, it is very hard for us to see if any regression creeped in. Yes, we have unit tests. Yes, we have regression tests. But still .. regressions can happen, and over 3 axis:
For the first, I wrote some scripts last year, where I run a whole set of savegames from time to time to benchmark their performance. It is just a collection of scripts linked together, outputting a csv with CPU / memory usage for each game. This I load into Grafana to create graphs. Source can be found here: https://github.com/TrueBrain/OpenTTD-performance For the second, we have nothing. Well, yes, our own experience when starting the game. But nothing systematic, or which tells us what commit made it better / worse. The last one, once upon a time I started https://github.com/TrueBrain/OpenTTD-savegames, and LordAro also gave it a few gos, but never anything came from it. From all three, this for us is the most important one: to know if a new commit / version breaks savegames that used to work. For all this, we kinda miss a framework to help us do this. We can manage the compute unit (VM or whatever) to run it on, but we do not have any tooling assisting us running this every commit, or every week, or whatever. Then I do not know your actual goal of OpenTTDLab, but just in case you are looking for some inspiration what us, OpenTTD Developers, would really help out .. an idea / insight in what is troubling us. Anything you can do in that regard to help us out, would be greatly appreciated. Even if it is: this tool isn't actually designed for it, but if you do A B C, you can use it for that goal, would be perfect. Not saying you need to do anything with this comment; but if it so happens to align with anything you are doing, do let me know please :) |
Beta Was this translation helpful? Give feedback.
What a cool project! Do keep us updated on how it is going, and how you are using it.
For your questions, there are a few possible answer. We have been willing to add in-game the ability to automatically download all missing content from BaNaNaS, if you load a game that is missing any. So you can just do
./openttd -g <savegame> -DOWNLOADSTUFF
, and that it makes it happen. Via the UI it is already possible, but not in-game yet.But, as that goes, nobody actually implemented that yet, so we don't have that yet.
For downloading yourself via a Python client or what-ever, there isn't any issue to do so. Our ToS allows you to download the latest version of content; and although the idea of cour…