Tech Specs for Huge Maps/Games

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

ebla71
Route Supervisor
Route Supervisor
Posts: 489
Joined: 14 Apr 2021 21:48
Location: Earth

Re: Tech Specs for Huge Maps/Games

Post by ebla71 »

JGR wrote: 14 Mar 2025 13:28 The size difference is mostly due to added debugging/symbol information for annotating crash logs.
So, in general, one could comment that out and then obtain a smaller binary?
JGR wrote: 14 Mar 2025 13:28 I do not think that vanilla has any interest in maps larger than 4k x 4k, it's not a purely technical limitation.
Would increasing the map size simply be changing a global constant or involve more significant code changes?
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Tech Specs for Huge Maps/Games

Post by andythenorth »

ebla71 wrote: 14 Mar 2025 19:25 Would increasing the map size simply be changing a global constant or involve more significant code changes?
It imposes further constraints on how and in what direction the game can be developed.

The current 4k x 4k maps introduce (to varying levels) friction for the basic map array, landscape generation, multiplayer performance, and in the development of the NewGRF and script APIs.

Large maps such as 4k x 4k also introduce significant friction for NewGRF and GS authors.

It would be my preference to not have to deal with 8k x 8k maps in vanilla.
User avatar
AntoninKyrene
Engineer
Engineer
Posts: 82
Joined: 29 May 2011 17:32
Location: SW US

Re: Tech Specs for Huge Maps/Games

Post by AntoninKyrene »

Maybe we shouldn't be dealing with 4k x 4k in vanilla...
Kuolema Tekee Taiteilijan
LaChupacabra
Route Supervisor
Route Supervisor
Posts: 431
Joined: 08 Nov 2019 23:54

Re: Tech Specs for Huge Maps/Games

Post by LaChupacabra »

AntoninKyrene wrote: 16 Mar 2025 02:45 Maybe we shouldn't be dealing with 4k x 4k in vanilla...
You don't have to ;)

4k x 4k maps are still the largest maps that conditionally make sense in this game without major changes.

Some obvious problems with 8x8 and larger maps:
  • very long loading and map generation times,
  • slow game pace, which may not even reach the basic level of x1.0,
  • a huge number of vehicles needed to handle very long connections, which will slow the game down even more,
  • insufficient zoom (even in the JGRPP version) and the resulting difficulty in orienting yourself on the map, on which it is very easy to get lost, especially in the case of random maps,
  • the time it takes a vehicle to travel from one end of the map to the other, which can take up to several dozen years in the game and several real hours,
  • creating one route lasting several/a dozen/dozens of hours (does anyone here live 300 years and can spend, for example, 40 on the game?)
  • the economy and payment system are not adapted to such large or even smaller maps (since version 14.0, any transport over 500 days has become completely unprofitable)
I am sorry for may English. I know is bed.
Josso
Engineer
Engineer
Posts: 3
Joined: 14 Mar 2025 21:37

Re: Tech Specs for Huge Maps/Games

Post by Josso »

With a dedicated server what's the rough recommended spec for running a 4k? Trying to determine right now whether to run one from home or not and/or which hardware to use
User avatar
kkidslogin
Engineer
Engineer
Posts: 41
Joined: 01 Feb 2024 21:02
Location: Tal'dorese Empire

Re: Tech Specs for Huge Maps/Games

Post by kkidslogin »

Josso wrote: 17 Mar 2025 01:05 With a dedicated server what's the rough recommended spec for running a 4k? Trying to determine right now whether to run one from home or not and/or which hardware to use
Any modern processor (8th gen intel/any Ryzen or later, though Mobile CPUs may need 11th gen or later), 8 gigabytes or more of RAM, whatever disk space size you want, but preferably fast. It's something with more RAM and decent network hardware if a lot of people will get on it, or if it's going to be public.
Yet Another PathFinder has become The Only PathFinder. What the effect of the change from YAPF to TOPF is, only time will tell.
User avatar
jfs
Tycoon
Tycoon
Posts: 1865
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Tech Specs for Huge Maps/Games

Post by jfs »

It's worth keeping in mind that for OpenTTD multiplayer, it's risky to have the server be better specced than the players. In general, OpenTTD servers will run the game at the speed they can (up to full speed), but if any clients can't keep up because the map is too large, they will fall behind on simulation speed, and the server will not wait for them. Slow clients will end up getting kicked off the server for being too slow.
For that reason, it can actually be advantageous to have the server for OpenTTD games be a slow computer. Then the game will just run equally slow for everyone.

Oh yeah, and do keep in mind that the savegame data for a 4k map can easily begin at 30 MB for a fresh world, and go well beyond 50 or even 100 MB for a world that has been built up. Any time a new client connects, they need to transfer the entire game.
User avatar
kkidslogin
Engineer
Engineer
Posts: 41
Joined: 01 Feb 2024 21:02
Location: Tal'dorese Empire

Re: Tech Specs for Huge Maps/Games

Post by kkidslogin »

jfs wrote: 18 Mar 2025 13:55 It's worth keeping in mind that for OpenTTD multiplayer, it's risky to have the server be better specced than the players. In general, OpenTTD servers will run the game at the speed they can (up to full speed), but if any clients can't keep up because the map is too large, they will fall behind on simulation speed, and the server will not wait for them. Slow clients will end up getting kicked off the server for being too slow.
For that reason, it can actually be advantageous to have the server for OpenTTD games be a slow computer. Then the game will just run equally slow for everyone.

Oh yeah, and do keep in mind that the savegame data for a 4k map can easily begin at 30 MB for a fresh world, and go well beyond 50 or even 100 MB for a world that has been built up. Any time a new client connects, they need to transfer the entire game.
Interesting. I always forget about this even though it used to happen to me all the time back when all my computers had low-end pre-Ryzen AMD APUs that were about as unideal for OpenTTD as seems to be possible.

This makes me wonder if a better way to handle this is server-side-only simulation with client-side prediction, like how Luanti/Minetest handles multiplayer. However, I'd imagine that, in addition to the massive changes to the codebase that this would take, this would run into the same issue as multithreading: namely, that the game state is so massive and complex that transferring it would take an obscene amount of bandwidth. To remedy this we would need some at least fairly accurate way of predicting whether part or all of the client sim was out of date, which would probably have to be client-side and thus eat up a sizeable amount of system resources. Even if it could be put on a separate thread (unlikely), it would probably just slow the game further, making it no improvement for the client.

Perhaps, then, it would be simpler to just add an option to throttle the server sim rate if a client is out of date, although I suspect this has its own problems. It would have the added benefit of being backwards-compatible.
Yet Another PathFinder has become The Only PathFinder. What the effect of the change from YAPF to TOPF is, only time will tell.
User avatar
jfs
Tycoon
Tycoon
Posts: 1865
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Tech Specs for Huge Maps/Games

Post by jfs »

It might be the most realistic to add a way for network clients to indicate, "hey please slow down, I can't keep up with that" - it's just that I could imagine it also being abused for griefing.
User avatar
kkidslogin
Engineer
Engineer
Posts: 41
Joined: 01 Feb 2024 21:02
Location: Tal'dorese Empire

Re: Tech Specs for Huge Maps/Games

Post by kkidslogin »

jfs wrote: 18 Mar 2025 21:47 It might be the most realistic to add a way for network clients to indicate, "hey please slow down, I can't keep up with that" - it's just that I could imagine it also being abused for griefing.
If the "please slow down" ask is done automatically by either the client or server then I don't see how it can be used for griefing.
Yet Another PathFinder has become The Only PathFinder. What the effect of the change from YAPF to TOPF is, only time will tell.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7417
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Tech Specs for Huge Maps/Games

Post by Redirect Left »

kkidslogin wrote: 18 Mar 2025 23:04 If the "please slow down" ask is done automatically by either the client or server then I don't see how it can be used for griefing.
I am guessing if you know what the net packet looks like, you could send it to the server and slow it down at will.

It is a bit weird that currently the server is unaware of it going faster than clients, but fixing it is likely to have issues. Explains why my old server from yeaaaars ago that was just a reused Intel Core2Duo actually did pretty good in its task of being an OTTD server.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
kkidslogin
Engineer
Engineer
Posts: 41
Joined: 01 Feb 2024 21:02
Location: Tal'dorese Empire

Re: Tech Specs for Huge Maps/Games

Post by kkidslogin »

Redirect Left wrote: 18 Mar 2025 23:20
kkidslogin wrote: 18 Mar 2025 23:04 If the "please slow down" ask is done automatically by either the client or server then I don't see how it can be used for griefing.
I am guessing if you know what the net packet looks like, you could send it to the server and slow it down at will.

It is a bit weird that currently the server is unaware of it going faster than clients, but fixing it is likely to have issues. Explains why my old server from yeaaaars ago that was just a reused Intel Core2Duo actually did pretty good in its task of being an OTTD server.
Hmmm, that's true. But that could also be said of other packets.
Yet Another PathFinder has become The Only PathFinder. What the effect of the change from YAPF to TOPF is, only time will tell.
Josso
Engineer
Engineer
Posts: 3
Joined: 14 Mar 2025 21:37

Re: Tech Specs for Huge Maps/Games

Post by Josso »

kkidslogin wrote: 17 Mar 2025 22:26
Josso wrote: 17 Mar 2025 01:05 With a dedicated server what's the rough recommended spec for running a 4k? Trying to determine right now whether to run one from home or not and/or which hardware to use
Any modern processor (8th gen intel/any Ryzen or later, though Mobile CPUs may need 11th gen or later), 8 gigabytes or more of RAM, whatever disk space size you want, but preferably fast. It's something with more RAM and decent network hardware if a lot of people will get on it, or if it's going to be public.
Thanks, got an old desktop kicking around that would be perfect
mauried
Traffic Manager
Traffic Manager
Posts: 162
Joined: 07 Sep 2010 11:35

Re: Tech Specs for Huge Maps/Games

Post by mauried »

Theres nothing wrong at all with big maps from a technical perspective.
There is however an economic problem due to the way the game is designed.
Most of the vehicles in the game are slow and designed for small maps.
As the cargo payments are non linear, but the running costs are linear there is a distance limit after which all the vehicles lose money.
Too get the best out of larger maps needs the economics to be changed.
ebla71
Route Supervisor
Route Supervisor
Posts: 489
Joined: 14 Apr 2021 21:48
Location: Earth

Re: Tech Specs for Huge Maps/Games

Post by ebla71 »

mauried wrote: 05 Apr 2025 23:16 As the cargo payments are non linear, but the running costs are linear there is a distance limit after which all the vehicles lose money.
Too get the best out of larger maps needs the economics to be changed.
If you care about that at all 8)

Would assume that there is a substantial amount of players who just like to build networks but have no interest in working against an economic model thanks to "unlimited money"
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Ahrefs [Bot] and 11 guests