My Patch - Very Large Map

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

Nickel_Plate
Traffic Manager
Traffic Manager
Posts: 144
Joined: 27 Dec 2004 19:37
Location: Home of the Big Cat

My Patch - Very Large Map

Post by Nickel_Plate » 30 Dec 2006 11:08

Have been patching trunk with my patch (enclosed), this has been working ok up to r7571. I am now getting an assertion error after compiling r7573 this was when the bridge branch was merged

Openttd.exe Saveload.c line 1059

Expression: Index _Savegame_Pool.Total_Items

Could someone explain what as gone wrong or point me in the righ direction to solve this problem
Attachments
Cyril r7571.patch
(2.98 KiB) Downloaded 354 times

Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Post by Rubidium » 30 Dec 2006 11:26

Well, it *might* be caused by doubling the 500 to 1000 in STATIC_OLD_POOL; (4096*4096)/(2048*2048) = 4, not 2, so maybe 2000 solves it.

Note: I did not try your patch, so it is nothing more than a guess.

Nickel_Plate
Traffic Manager
Traffic Manager
Posts: 144
Joined: 27 Dec 2004 19:37
Location: Home of the Big Cat

Post by Nickel_Plate » 30 Dec 2006 12:46

Thanks changing it to 2000 seems to have done the trick, it must have been a fluke that it worked before by using 1000

User avatar
Mr. X
Tycoon
Tycoon
Posts: 11502
Joined: 20 Sep 2004 22:45
Location: Black Mesa Research Facility - New Mexico
Contact:

Post by Mr. X » 30 Dec 2006 19:19

Larger maps? Isn't 2048 x 2048 not big enough? :P
Well, why not anyway... 4098 x 4098 is nice aswell. :mrgreen:
Image
Authority is something you deserve, not something you impose. -Wile E. Coyote (TT-Forums member)

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2013
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 » 30 Dec 2006 21:49

i already have some little problems running 2048x2048 maps, like when i press the fast forward which does nothing... and i have P4 3GHz and 512MB of ram

how do you plan to play on 4096 maps? google earth?

(if you resolve also memory problems it would be nice also a 65536x65536)

Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark » 30 Dec 2006 22:42

Wolf01 wrote:(if you resolve also memory problems it would be nice also a 65536x65536)
Waaah! Please add 4x bigger industries for this :) And 1000 ppl as minimal town size :)
Image

willisterman
Engineer
Engineer
Posts: 27
Joined: 16 Jun 2006 19:41

Post by willisterman » 31 Dec 2006 11:19

Actually, 65536*65536 is only really about 500 miles*500 Miles. With very low towns and super low industries it would be quite realistic.

OpenTTD only uses about 40mb of ram in a 2048*2048 game, with a 65536*65536 my maths says about 10gb of memory... No Problem!

Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Post by Rubidium » 31 Dec 2006 11:22

More in the range of 40 GB :)

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2013
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Post by Wolf01 » 31 Dec 2006 12:16

that is why i suggested google maps :lol:

Nickel_Plate
Traffic Manager
Traffic Manager
Posts: 144
Joined: 27 Dec 2004 19:37
Location: Home of the Big Cat

Post by Nickel_Plate » 31 Dec 2006 16:26

I asked for larger maps a long time ago, as i got no response i tried myself.

Will have to look into Google maps, but at the moment just playing around and testing.

I enclose latest diff.
Attachments
001_Extra_Large_Map_r7692.diff
(2.98 KiB) Downloaded 308 times

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: My Patch - Very Large Map

Post by Starbud » 23 Jul 2007 13:22

I also like the idea with large maps but i think the best way to do it is to spread the map over several computers so that each computer maintain a part of the map.
That way i think we will se very large assemblys.
Maybe there can be a dynamic workload for when the map changes and some areas become crowded with trains.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: My Patch - Very Large Map

Post by Bilbo » 23 Jul 2007 13:25

Splitting the map across several computers is not possible due to way networking works in openttd. Implementing such idea would require basically completely rewriting most of the code... so I don't think it will happen in near future
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: My Patch - Very Large Map

Post by Starbud » 23 Jul 2007 18:02

Oh i c.
Maybe a temporary thing would be to split the game itself in two?, according to someone i know OTTD is almost made in sections some way, i think i heard someone talking about the possibility to have an graphicspart and an mathematical part.

Can one way of handing over trains to another map be like having like 10 tiles per track going out over the map edge to be defined to be sort of like a boardercrossing between two countries?
Shouldnt that make the handover to cope with the internet?
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

User avatar
bob27
Transport Coordinator
Transport Coordinator
Posts: 278
Joined: 19 Mar 2007 23:27
Location: USA
Contact:

Re: My Patch - Very Large Map

Post by bob27 » 25 Jul 2007 21:28

Starbud wrote: Can one way of handing over trains to another map be like having like 10 tiles per track going out over the map edge to be defined to be sort of like a boardercrossing between two countries?
Shouldnt that make the handover to cope with the internet?
I see what your saying, kind of like having a road go across the border in Sim City 4. I'm not sure how that would be done, but I know it was done in Lego LOCO with trains. (Heh Heh, I still have that game)

chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Re: My Patch - Very Large Map

Post by chrissicom » 28 Jul 2007 22:18

I think there are more problems with map size than just RAM. I compiled a Win64 binary of OpenTTD and tried it on Vista 64-bit with 4 GB Ram and when I try to create bigger maps than 4096x4096, for example 8192x8192 it already gives me an error. 4k both sides only uses about 175 MB of RAM, that's really nothing compared to what Supreme Commander or Civ IV can eat up for example. But I admit that performance with many vehicles becomes pretty bad especially when there are AI players on the map :D

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: My Patch - Very Large Map

Post by Starbud » 20 Nov 2007 10:18

I for one like those large maps, nothing will ever be enough.
I can imagine that there will be a need for a new transporttype, - borg conduates that can carry 4 trains far far away, i guess that would look like a bunch of borg cubes in a row big as one tile carrying the trains at like 50 times faster than the maglevtrains.
Maybe even the speed of light for really big maps?

I'd like 8M by 8M tile maps :)
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: My Patch - Very Large Map

Post by DaleStan » 21 Nov 2007 01:52

You do realize that an 8M*8M map would require at least[0] 512 TB[1] of RAM just for the map? With another 512 TB to make the copy for saving, plus some more on top of that to do the compression?
Where did you buy the computer with that quantity of memory, please? I want one.

[0] Assuming 8 bytes per tile. If memory serves, it was 9 at one point, but I also remember much ranting about that, so things might have gotten changed there.
[1] 1 TB = 1024 GB
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: My Patch - Very Large Map

Post by Starbud » 21 Nov 2007 12:14

Yes youre right, it's A LOT more memory than todays normal computers.
I think it's doable with A LOT of reconstruction of the game.
I figure that the method to be used is the same as for big outdoor led displays, there they use small computers that take care of a portion of the screen and inport and export screendata to and from other portions of the screen.
I guess the same split of regions can be done in OTTD, maybe this is where i should tell that i'm not that good as a programmer, i know mostly basic stuff and do programming for the fun of it, mostly in assembly on microcontrollers where C or C++ is very rare.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: My Patch - Very Large Map

Post by DaleStan » 22 Nov 2007 03:26

And your experience with microcontrollers says that it should be possible to pack at least 32 TB of entropy[0] in to exactly what size memory space? While still performing quick random accesses?

[0] Figuring 4 bits of entropy per tile. This is certainly low.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser

Starbud
Traffic Manager
Traffic Manager
Posts: 207
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: My Patch - Very Large Map

Post by Starbud » 22 Nov 2007 06:46

Evidently i explain in a bad manner lol.
The map have to be spread out over many servers and the clients are just using one server at a time.
But the trains are transferred between servers.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests