Ships cost high cpu

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
koos147
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2012 11:03

Ships cost high cpu

Post by koos147 »

i have version 1.2.0-B4

i have a game
320 airplanes
150 cars
230 trains

this runs fine on my computer (around 5% cpu)
when i add 100 ships the cpu springs to 60%
when i have more than 200 ships the game hangs

the strange thing is that this is only when i use a ship
al other vehicle's are no problem
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Ships cost high cpu

Post by FooBar »

1) welcome to the forums :D

2) you may want to update your OpenTTD. 1.2.0-RC1 is out for some time now. That doesn't fix this particular issues, but does fix other problems.

3) use more buoys along your ship route. Ship pathfinding is very heavy on the cpu if the distance between two orders is long. Don't forget to add the buoys to the orders of your ships!
koos147
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2012 11:03

Re: Ships cost high cpu

Post by koos147 »

hey
thanks for the information
i will try to do that

i will not upgrade because openttd is not backwards compatibile (it is a network game)
User avatar
lawton27
Tycoon
Tycoon
Posts: 1418
Joined: 03 Aug 2009 14:29
Location: Manchester

Re: Ships cost high cpu

Post by lawton27 »

koos147 wrote:hey
thanks for the information
i will try to do that

i will not upgrade because openttd is not backwards compatibile (it is a network game)

What's a network game? Multilayer? OTTD is backwards compatible...... :S
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Ships cost high cpu

Post by FooBar »

I think he means that he wants to continue playing a multiplayer game. While it's possible to upgrade a game to a new version, it does mean that all players need to upgrade. Which is a bit difficult to accomplish if you're not running the server.
koos147
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2012 11:03

Re: Ships cost high cpu

Post by koos147 »

yes thats correct

when i run version 1.2.3 and someone else rund 1.2.2 it doesn't work

(ps yes i know the version numbers are only for example)
zooks
Transport Coordinator
Transport Coordinator
Posts: 262
Joined: 29 Jun 2006 08:36

Re: Ships cost high cpu

Post by zooks »

What pathfinder are you using for ships? yapf?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: Ships cost high cpu

Post by Alberth »

The usual solution to reduce CPU costs of ships is to add buoys. That way, the path finder can make smaller steps in finding the right path.
koos147
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2012 11:03

Re: Ships cost high cpu

Post by koos147 »

zooks wrote:What pathfinder are you using for ships? yapf?
i use the default pathfinder
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Ships cost high cpu

Post by Eddi »

"the default pathfinder" was changed recently, so you'll have to be more specific.
koos147
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2012 11:03

Re: Ships cost high cpu

Post by koos147 »

Code: Select all

pf.pathfinder_for_trains = 2
pf.pathfinder_for_roadvehs = 2
pf.pathfinder_for_ships = 0
pf.wait_for_pbs_path = 30
pf.reserve_paths = off
pf.path_backoff_interval = 20
Hey

I cant start the game anymore on my computer here
so the only thing i can tell you is what the server say
User avatar
JazzyJaffa
Engineer
Engineer
Posts: 35
Joined: 13 Jul 2007 13:41
Location: Oxford, UK

Re: Ships cost high cpu

Post by JazzyJaffa »

I've made a patch to address the ship CPU issue - would be good if you could test it on your game.
http://www.tt-forums.net/viewtopic.php?f=33&t=58905
koos147
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2012 11:03

Re: Ships cost high cpu

Post by koos147 »

thanks for the support

i do not know how to compile

i run a console server on debian
all the clients are windows

i have never compile a patch to openttd and the manual on the wiki is a litle bit to much for me (i am not a developer)
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Ships cost high cpu

Post by Zuu »

If you want to use it in a network game all clients and the server must have the patch.
koos147 wrote:i have never compile a patch to openttd and the manual on the wiki is a litle bit to much for me (i am not a developer)
In that case, I doubt anyone will be able to help you so that you can compile it yourself. (no offence, just pure fact) Thus, you have to wait until *someone* with more knowledge on compiling get interested enough in it that they compile it for them self and perhaps also upload the result on the forums. In your case you need both a linux build and a windows build of the same version of the patch.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
JazzyJaffa
Engineer
Engineer
Posts: 35
Joined: 13 Jul 2007 13:41
Location: Oxford, UK

Re: Ships cost high cpu

Post by JazzyJaffa »

koos147: I will make a windows and linux build of my patch - I'll probably get round to this later today.
koos147
Engineer
Engineer
Posts: 12
Joined: 14 Mar 2012 11:03

Re: Ships cost high cpu

Post by koos147 »

that should be great
i will test is as soon as it is availible
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 13 guests