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

Ability to use the rail/road pathfinder as human player #5339

Closed
DorpsGek opened this issue Oct 17, 2012 · 8 comments
Closed

Ability to use the rail/road pathfinder as human player #5339

DorpsGek opened this issue Oct 17, 2012 · 8 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

ToBeFree opened the ticket and wrote:

I am not sure if this is against the philosophy/fundamental idea of OpenTTD, but when I tried the game "Simutrans" yesterday, I wondered: What about giving OpenTTD clients the ability to use the built-in pathfinder to create roads/rails?

This could be implemented as a button in the road/rail construction window. If the player uses this button, he has to specify an start-point and an end-point, and the game would use the pathfinder to suggest a route between these two points. It should also show the estimated amount of money needed to build the track. Maybe it should not actually build the road/rail, but just show something like a "shadow" where the player could build the track.

Complex rail/road networks can't be built this way, of course, but I think this feature could be useful anyway. The game has a nice pathfinder - why should only AIs be allowed to use it?

What do you think about this?

Reported version: Version?
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5339
@DorpsGek
Copy link
Member Author

planetmaker wrote:

Game scripts and AIs bring their own path finder(s) in the form of path finder libraries or directly in their own code.

The only path finders OpenTTD implements are path finders which allow vehicles to find their way on existing track or road or water tiles. As such the path finders are not suitable to be used to build roads or rail or canals or do terraforming required to build anything. In principle the game script and AI path finder(s) could be exposed to a new category of player helper scripts. But so far we dismissed any move towards player helper scripts like these on grounds that it would eventually lead to "play me" buttons... one could then have the AI play all the way. Or use client-side scripts to cheat on MP servers by have them issue commands to your company concurrently to yourself...


This comment was imported from FlySpray: https://bugs.openttd.org/task/5339#comment11596

@DorpsGek
Copy link
Member Author

ToBeFree wrote:

Okay, right. I thought those:
http://wiki.openttd.org/AI:RailPathfinder
http://wiki.openttd.org/AI:RoadPathfinder
...would be shipped with OpenTTD :D

I don't think that something simple like this would lead to "play me" buttons, however. Also, implementing this would not change the possibility to cheat in MP using scripts.^^


This comment was imported from FlySpray: https://bugs.openttd.org/task/5339#comment11597

@DorpsGek
Copy link
Member Author

planetmaker wrote:

Those are path finder libraries for AIs. One or the other or both are used by many (but not all) AIs you find in the online content and downloaded automatically, when you retrieve an AI which uses it - but it's not part of OpenTTD itself.

IMHO you have also an interesting idea of "simple" (where's your patch?). And how is two people building in a company with one client connected not a way of cheating to do more in the same time than a person not using scripts?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5339#comment11599

@DorpsGek
Copy link
Member Author

ToBeFree wrote:

  1. I meant "simple" as in "not as complex as a script which adds an AI, but which simply gives you a little hint". I would really like to contribute a patch if I had any/enough experience in OpenTTD coding / coding in general. Normally, I do not code. I am not a coder, sorry. I hope that someone who has the time and experience to do this submits a patch. ;-)

  2. --> "And how is two people building in a company with one client connected not a way of cheating to do more in the same time than a person not using scripts?" <-- and that's another reason why the "cheating" argument against this idea is invalid. ;-D
    EDIT: What I mean is: Not implementing this as core feature does not prevent cheating like that.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5339#comment11600

@DorpsGek
Copy link
Member Author

Kogut wrote:

Note that pathfinding used by AIs requires gigantic amount of time, it is typical that route with length of 300 tiles requires 3 ingame years of pathfinding (you may try it with AIAI - start AI and look at debug log - about 80% of calculations is used to find new path).

The best way to implement this would be creating AI that performs task requested by player (probably using signs) and using cheats menu to form human+AI company.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5339#comment11601

@DorpsGek
Copy link
Member Author

ToBeFree wrote:

The Human+AI problem could probably be solved using a game script instead of an AI (which could/would, however, actually cause a "cheating" problem) - hmm, in this case, a request for a core feature might actually be unsuitable. I thought a computer would be able to find a path faster than a human :D


This comment was imported from FlySpray: https://bugs.openttd.org/task/5339#comment11602

@DorpsGek
Copy link
Member Author

Yexo wrote:

And it's possible for a computer to find a path much faster, but I doubt you'll like the results. One major problem with pathfinding for new routes is the aesthetics. Also as others have said before I think actually building tracks is a major part of playing the game, I don't like that part being taken over by an AI.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5339#comment11613

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

Thanks for the suggestion. This one isn't a current goal for OpenTTD.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5339

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) enhancement labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant