Multiple CPU/Cores in OpenTTD

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
NightFlash
Engineer
Engineer
Posts: 6
Joined: 16 Oct 2006 10:11

Multiple CPU/Cores in OpenTTD

Post by NightFlash »

Hey there!

Is there any support for Multiple Cores / CPUs
in openttd and is it even planned to add it if not already exist?

// NightFlash
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

No, and no. The game isn't threaded in any way at all, and it would require significant re-work to change this.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
plaes
Engineer
Engineer
Posts: 18
Joined: 08 Oct 2006 06:56

Post by plaes »

OpenTTD currently works with two cores so it supports them. But it doesn't fully utilize them ;)

As Brianetta said, adding threading support will require massive changes in the core and would be not feasible thing to do.

And in my humble opinion, this double-core hype is mostly marketing fluff for people to upgrade...
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

Actually we got a bit of theading in the game. When generating maps, we gt a different thread to show the progress bar (ok, this will not give you a huge speed boost, but still) and when saving, the game saves uncompressed in memory (quick) and then it starts a new thread to compress the savegame and write it to the HD while you continue to play.

In short: you will not be affected that much by saving if you got a different core to handle savegame compression. Also the OS can remove every other task from the core running OpenTTD so the game can use it 100% if needed.
plaes wrote:And in my humble opinion, this double-core hype is mostly marketing fluff for people to upgrade...
Actually it really depends on the software you use. If it's singlethreaded, then yes you will not be able to tell a big difference. If it is multithreaded CPU intensive tasks (like say multithreaded video editing), then you will really love the extra core. Dualcore is not really useful for everybody. I noticed that new games tend to be using threads a lot more because more and more people get dualcore CPUs, which results in the fact that "normal" people can start to benefit from dual core CPUs.
NightFlash
Engineer
Engineer
Posts: 6
Joined: 16 Oct 2006 10:11

Post by NightFlash »

The reason I ask is because we are going to have a LAN party during week 44 and we are using Mac Pro's as dedicated servers that means 2*2 GHz dual core Xeons so 4 cores, so would be neat to be able to play the huge maps without any problems.

But I don't think there will be to many problems =)
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

NightFlash wrote:The reason I ask is because we are going to have a LAN party during week 44 and we are using Mac Pro's as dedicated servers that means 2*2 GHz dual core Xeons so 4 cores, so would be neat to be able to play the huge maps without any problems.
You will be able to play without problems on servers like that and they will not stall the game while saving huge maps either. There is a thread about setting the resolution to 1x1 makes dedicated servers faster. I think you should try to find it and do as it says, at least until the dedicated servers are completely free of all graphical code.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 25 guests