Moderator: OpenTTD Developers
This is version 106, HIGHLY in an unstable state !!! Many things change in the code but it's mostly code handling and optimizing, so don't expect too much new features.
But you can test the new tasks handling function, the ai find jobs in a more smooth way and plan better next job to do.
I have highly optimize it to run on big maps too, the ai now can start working 10 times faster (and it's a bare minimum, really expect big improvment here).
More optimizations to the building functions should also higher ai incomes (still need more testing, but first results are promising vs older versions).
I took care of not busy too much the squierrel VM, other ai will like it.
Also add terraforming functions, for now only used by airports functions, but this will ease trains (still plan to add them, but for that big task i prefer waiting until my free time is higher)
I've done few stability tests, but really too few, and as i'm planning others stuffs, they nearly cannot end. So this version is more an alpha than anything else. Please submit bugs you might found (specially crashs). I cannot promise a quick fix, but it will be done asap.
i think you should give up with the zx81 and buy a real computer brumi
here's what that save game (see file attach, it's one of you i think no?) do here in fast forward:
edit: i've update to 106b (not b as beta, but b as more recent and need another name) the file so you can test with an even newer version (same as the one i've use for that screenshot), correct some bugs (one when loading that scenario ^^ and a few others)
Code: Select all
grep -R Sleep * | wc -l 56
It's working fine here, i have some hipcup sometimes, but my desktop is no more less responsive, vlc doesn't even miss a picture...
I have few newGRF only, and never really use them but i suppose it could make a big difference.
My cpu is a i7 950 and ttd can only busy a core fully (sometimes 98%, but more near 90% average) but on that big map with many vehicles and running it fastforward.
Here's another one with the same savegame and another openttd and some applications and my full desktop.
See, nothing really that bad, you must have something on your computer that take your cpu down.
- (1.02 MiB) Downloaded 1 time
So sorry, my wording was not correct...
Fast forward means "run as fast as you can". A lag is quite what can be expected then...Brumi wrote:But it is certainly true that OpenTTD lags visibly when your AI is running, especially on fast forward.
now for the problem: if the list of engines avaiable is big, that function is time consuming by itself (well, i can't do anything against that, you just have many engines and i must play with that), but i'll work to find a way to cache that result or another solution, because as-is the function is doing nearly nothing with default engine, but with a huge list of engine this indeed exhibit a noticeable slowdown. Must be why you were having trouble and i wasn't.
I'll work on that, and see in corners to improve it. I'll look for other functions that might be affect as well.
So it's just a work in progress release, i might upload that version to bananna once i fix bugs, savegame and some others things i need to do, but not as it is right now, so you could only grab it from here (see first post)
Here's the latest version i've made, maybe not yet totally stable, but should work ok.
I change and improve many things, specially for big maps. The AI should handle huge 2048x2048 maps easy.
I'm still not releasing it with trains as i need some more work, but it's close to be end.
Savegame format has change, so please use this version if you need to convert an old savegame to the newer format, as next version should use newer API functions that will drop old savegame support.
Thank you for trying it and reporting bugs
(this imply be nice with the handling as it's still early and don't expect 0 crash...)
Anyway, if you're in mood to help, try it and report bugs, thank you.
I've seen a crash with the ECS vectors and some vehicle sets loaded (probably UKRS/NARS, eGRVTS, Aviators, FISH, but I don't remember...), I don't know if it's because of these NewGRFs or not: Otherwise it's working well so far in the vanilia edition
EDIT: Not anymore... EDIT2:
I noticed that there is a single locomotive running on rail line which is already being used by another train. This locomotive has no orders.
- error 1 was already found and fix, a stupid one
- error 2 is more problematic and need more handling to fully correct the "why it happen", for now i already fix the "don't crash if it happen" anyway i've add a check to try to order a vehicle to goes to a "null" homedepot.
- error 3 worry me a bit more, as the no order solve depend on the error 2 (no order, trying to set new ones), but the train running alone is a bit more sad, as i have already think it could happen (running low on money after building the train and 0 cash to pay the wagons), and the AI should have catch it, and instead of starting that empty train, should have sell it. I suppose i didn't do it as good as i think
For the newgrf, i didn't test every grf that exist, but i have test some of them, and you could see the AI should handle them pretty well (the ones i test, like eGRVTS).
For the Aviators, if it's av8 something, my AI and all AIs i've saw, and even for human player, it looks impossible to make money with the costs and running costs those aircrafts have, i really like the drawing and the details of the aircrafts, but the settings ruin totally the fun of this grf (for me at least). I'm not sure how i should handle this one, except my generic handling of newgrf engine doesn't work with it, but i think it comes more from the newgrf maker than a "poor" handling of my AI.
In fact, the only one that bug me seriously was the Ikarus Set that report articulated vehicle as non-articulated ones.
Anyway i could confirm none of the errors you report comes from newgrf usage as you could get them too without them.
I didn't test yet non engine newgrf (stations or industry stuff like that).
Here's an update version with many fix and the error 2 (half-fix), that should run a bit better before crashing
I named it 155a, not as alpha, even it could fit nice, but just as i need a different name so people catch it's an update one.
A real lot of bug fixes for the trains part (the brumi's bug with trains going without wagons attach was a b**** to fix, but it's properly fix now). The ai now build its rails and plan its path in short interleaves and pause /resume the task later, so the ai isn't stuck for years waiting an answer from pathfinder with big distances.
The ai also now can retry when it fail building its route, stepping back a bit to replan a new path to avoid the error. This was originally in the AI (because of brumi's function to retry on failure) but it's now extend to calling itself the pathfinder as a subtask of the first goal and take a farer distance to replan the path.
I didn't add those functions to road pathfinding, as road pathfinding distances are always short and the ai always try to find its way from A to B using existing routes instead of pathfinding a good way to reach B. But i'll think about that later as it was a huge improvment to handling pathfinding and building big/long routes with troubles that might appears because you took a lot of time to pathfind and build a path and the world as change while you were doing that.
I still need some more work, but the ai is working ok "more or less" with trains now.
So you can grab the 155b (still not as beta) and give it a try.
Didn't think it would be that hard to handle trains at first, but cost of engine (putting a huge bill to build a route and so a huge risk for the AI safety), and also the API make it a great challenge, but it's funny to see the ai "trying" to play with trains, i just like trains a lot
Users browsing this forum: No registered users and 3 guests