Coder Social home page Coder Social logo

Comments (11)

Derpercoaster avatar Derpercoaster commented on May 11, 2024 1

I was playing in this scenario recently, and an AI company made a ship route in that exact same area. They did not, however, make an impossible one, as seen below:
North America (West) 1980

Same cities, same ship, but no problem. The AI doesn't always run into this issue, it seems.

from openloco.

jgottula avatar jgottula commented on May 11, 2024

Oh wow.

I continued playing the same save game (the version of it where the AI built the docks nonsensically, i.e. the second save file in the original post); and now, much later, I happened to go back over to that area and discovered that the AI company had noticed that its ship was stuck, and as a consequence, removed both the docks and the ship. (This is normal behavior when the AI discovers that one of its routes isn't working after a while.)

But you know what it did? It rebuilt effectively the same route (dock, dock, hovercraft), except this time, it built the Los Angeles dock on the inland side, and the San Diego dock on the ocean side! Still broken, just in the opposite manner! It's preposterous!

Here's the save file for that:
North America (West) 1980 28.zip

The mind boggles...

from openloco.

jgottula avatar jgottula commented on May 11, 2024

The idiocy continues! 😝

Same game. About a year later. Another transport company (a different one) started up, and built the exact same broken dock/dock/hovercraft route. One dock near LA on the ocean side; other dock near SD on the inland side.

No I am not making this up. Here's the save file, with the view focused on the purple dude's broken ship setup right after he built it:
North America (West) 1980 37.zip

from openloco.

janisozaur avatar janisozaur commented on May 11, 2024

Wow.

Can you check if route gets re-calculated if you build a river between the docks? Does that allow the ships to pass? Can you then still remove the river or is it locked?

from openloco.

IntelOrca avatar IntelOrca commented on May 11, 2024

The game goes as far as to disallow land tool alterations in the water if the modification would impede active boat routes...

I believe this is done by just setting a flag on tiles that a vehicle goes on. This is why if you for example build an alternative route for even your own buses you still can't remove the original road they were using. I have removed this check already because it is damn annoying.

from openloco.

jgottula avatar jgottula commented on May 11, 2024

Can you check if route gets re-calculated if you build a river between the docks? Does that allow the ships to pass? Can you then still remove the river or is it locked?

I mean, you can load up the save file yourself and see. But I'll take a look.

Oh and by the way, this save game has been played 100% on vanilla Locomotion, in case there was any question that any of the tiny bits of reimplemented code we've done had anything to do with this.

from openloco.

jgottula avatar jgottula commented on May 11, 2024

Okay so I did the build-a-manmade-river experiment. (Fortunately I had oodles of money laying around in this particular game, so I was able to do massively expensive amounts of land and water editing without finding/inventing a money cheat.)

Each time I added new water tiles leading from the lake in the direction of the oceanside dock, the ship would move its spin-around-in-a-circle routine to the edge of the new water tiles. And then when I eventually connected up the last set of water tiles to the ocean water tiles, it went on its way, completing the route, and was able to go back and forth normally from that point in time forward.

Oh and once the ship had made a successful pass through, the game wouldn't let me remove the water tiles. But I didn't remember to test removing a water tile that the ship was about to pass through before it did, to confirm/deny whether the "cannot remove" flag is set when a ship actually passes over a tile or if it's set when the ship decides to path through a tile.

Here's a screenshot showing the final successful pathing:
screenshot68
(I wanted to record a video, but alas, Dxtory can't detect ancient DirectX 7, DirectDraw-only games. I probably would have had better luck with OpenLoco's SDL output but the framerate currently is unplayably low due to the constant console logging.)

from openloco.

IntelOrca avatar IntelOrca commented on May 11, 2024

@jgottula

How did you remove the water tile? To get rid of the flag you would actually need to clear it in memory, water is just a height marker on a surface tile, so you can't remove the flag by raising land.

I have removed the check for roads only, but the same changes could be applied to terraforming.

from openloco.

jgottula avatar jgottula commented on May 11, 2024

@IntelOrca I saw what you wrote earlier. I just still don't know for sure whether the game actually sets the flag on the tiles that the vehicle physically goes on as it does so, or if it sets that flag on the tiles that the vehicle plans to go on when it decides which way it's going to go. Either case could still explain the alternative-route thing.

And yeah, it's damn annoying that even after a company has removed its stations from a road route and taken the vehicles off, the city-built road segments that they were previously using are still marked as in-use.

from openloco.

jgottula avatar jgottula commented on May 11, 2024

How did you remove the water tile?

In which case?

from openloco.

IntelOrca avatar IntelOrca commented on May 11, 2024

@jgottula nevermind, conclusion is that AI does not do any path check before building the two end points.

from openloco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.