Back to Home / #openttd / 2016 / 10 / Prev Day | Next Day
#openttd IRC Logs for 2016-10-03

---Logopened Mon Oct 03 00:00:44 2016
00:51-!-keoz [] has joined #openttd
00:51-!-keoz is "Grmph" on #openttd
02:14-!-sla_ro|master [] has joined #openttd
02:14-!-sla_ro|master is "slamaster" on #sla #openttd #love
02:16-!-keoz [] has quit [Ping timeout: 480 seconds]
02:47-!-keoz [] has joined #openttd
02:47-!-keoz is "Grmph" on #openttd
03:00-!-Progman [] has joined #openttd
03:00-!-Progman is "Peter Henschel" on #openttdcoop #openttd
03:47-!-Biolunar [] has joined #openttd
03:47-!-Biolunar is "Biolunar" on #openttd #suckless
04:22-!-sla_ro|master [] has quit []
04:23-!-keoz [] has quit [Ping timeout: 480 seconds]
05:14-!-Wolf01 [] has joined #openttd
05:14-!-Wolf01 is "Wolf01" on #openttd
05:25-!-frosch123 [] has joined #openttd
05:25-!-frosch123 is "frosch" on #openttdcoop.devzone #openttd
05:28-!-umgeher [~umgeher@] has quit [Read error: Connection reset by peer]
05:30-!-umgeher [~umgeher@] has joined #openttd
05:30-!-umgeher is "Umgeher Torgersen" on #vm #openttd #kontrl #awesome
05:41-!-Arveen [] has joined #openttd
05:41-!-Arveen is "Arveen" on #openttd
06:14-!-gelignite [] has joined #openttd
06:14-!-gelignite is "gelignite" on #openttd #openttdcoop.devzone
07:08-!-Samu [] has joined #openttd
07:08-!-Samu is "OFTC WebIRC Client" on #openttd
07:14<Samu>hello all
07:18<Samu>question about multi-threading openttd: is it possible for each individual AI to have his own thread?
07:22<Samu>treat an AI instance as a client that joins a multiplayer game - it has to download the map and has his own "openttd" environment?
07:25<Samu>because currently, 15 AIs all share the same 1-thread
07:44<@planetmaker>samu: each AI *has* its own thread
07:44<Samu>oh, well then i dunno what's slowing them down to 1-core usage
07:46<Samu>openttd is barely above 12.5% cpu
07:46<Samu>even with 15 ais
07:47<@planetmaker>they're not granted unlimited CPU. Their computation time is controlled by openttd
07:50<Samu>and with 240 companies patch, same thing occurs, 12.5% cpu t.t
07:53<Wolf01>Samu, it's like a card game, every player must wait its turn and has limited time to play a move
07:57<Samu>hmm I see
07:58<Wolf01>So if you have 240 players, every player must wait 239 others so do its move again
08:03<Samu>what would be an easy way to speed multiple ais?
08:03<Samu>async AIs?
08:05<Samu>wish something could be done about this
08:09<Samu>they would be able to play asynchronous
08:37-!-andythenorth [~Andy@] has joined #openttd
08:37-!-andythenorth is "Andy" on #openttd
08:37-!-andythenorth [~Andy@] has left #openttd []
08:38<@peter1138>with their own full state of the game
08:39<Wolf01>frosch123, are you here?
08:41<Eddi|zuHause>you still did not understand the topic...
08:42<Wolf01>It's for coordination, if he doesn't have time I'll do something else
08:44<frosch123>i am here :)
08:44-!-Snail [] has joined #openttd
08:44-!-Snail is "Jacopo Coletto" on #openttd
08:45<Wolf01>Ok, then how should I proceed with the patch? Should I wait for a proper grf or just duplicate almost all what I've done?
08:45<frosch123>the grf is fine
08:45<frosch123>next thing is, we need some RoadSubType enum or so
08:46<Wolf01>I already did that yesterday evening
08:46<Wolf01>I'm going to change the usages of the RoadType
08:47<frosch123>next, GetRailTypeByLabel and AllocateRailType need a RoadType parameter, so that they can allocate a subtype correctly
09:00-!-Snail [] has quit [Quit: Snail]
09:03<Wolf01> for (int i = 0; i < numinfo; i++) {
09:03<Wolf01> RoadType rt = _cur.grffile->roadtype_map[id + i][?what_here?];
09:04<Wolf01>RoadTypeByte roadtype_map[ROADTYPE_END][ROADSUBTYPE_END]; <-
09:08<frosch123>_cur.grffile->roadtype_map[feature == NF_ROADTYPE ? ROADTYPE_ROAD : ROADTYPE_TRAM][id + i]
09:10-!-Gja [] has joined #openttd
09:10-!-Gja is "Martin" on #bcache #openttd
09:13<Wolf01>Uhm, I should change all handlers for that
09:13<Wolf01>ChangeInfoResult cir = handler[feature](engine, numinfo, prop, buf); <-
09:13<Wolf01>Or duplicate the handler
09:14<Wolf01>With a wrapper
09:15<frosch123>imho remove the handler[]
09:16<frosch123>just switch-case as in ReserveChangeInfo
09:16<Wolf01>That's the handler loop which loops through all the reserve change info of the various features
09:18<frosch123> <- i mean like that
09:18<frosch123>or are we talking about something else?
09:19<frosch123>i don't see a point in "static const VCI_Handler handler[]". same can be done with a switch
09:19<frosch123>it's only used once
09:20<Wolf01>It's also in FeatureChangeInfo()
09:21<frosch123>it's only in FeatureChangeInfo, is it?
09:21<Wolf01>No, there are FeatureChangeInfo and ReserveChangeInfo which both call RoadTypeReserveChnageInfo
09:22<frosch123>yes, but ReserveChangeInfo already has a switch
09:22<frosch123>so you can just add the RoadType parameter
09:22<Wolf01>Yes, I'm doing that, but FeatureChangeInfo uses a loop instead of a switch
09:23<Wolf01>while (numprops-- && buf->HasData()) {
09:23<Wolf01> uint8 prop = buf->ReadByte();
09:23<Wolf01> ChangeInfoResult cir = handler[feature](engine, numinfo, prop, buf);
09:23<Wolf01> if (HandleChangeInfoResult("FeatureChangeInfo", cir, feature, prop)) return;
09:23<Wolf01> }
09:23<frosch123>it uses the array of function pointers, which is just a fancy way to writing a switch
09:23<frosch123>ChangeInfoResult cir = handler[feature](engine, numinfo, prop, buf); <- so that line becomes a switch
09:24<frosch123>instead of using handler[]
09:24<Wolf01>I don't know if that's because they need to be in order
09:24<frosch123>the same loop is in ReserveChangeInfo btw
09:26-!-Biolunar [] has quit [Quit: leaving]
09:30<Wolf01> uint8 *roadtypes = AllocaM(uint8, idcount); <- how do I change this?
09:31<Wolf01>Oh, it's internal, no need to change
09:31<frosch123>yep, only a local variable
09:38-!-HerzogDeXtEr [] has joined #openttd
09:38-!-HerzogDeXtEr is "purple" on #openttd
09:39-!-supermop [] has joined #openttd
09:39-!-supermop is "A CIRC user" on #tycoon #openttd
09:40<Wolf01>Bah, I wanted to pass RoadType as optional parameter but I need to overload instead
09:43<Wolf01> did this, could work?
09:44-!-HerzogDeXtEr1 [] has quit [Ping timeout: 480 seconds]
09:44<frosch123>why so complicated?
09:45<frosch123>why not pass the RoadType directly from ReserveChangeInfo?
09:46<Wolf01>To keep it uniform with RoadTypeChangeInfo
09:46<Wolf01>And to avoid calling it with wrong roadtype
09:47<Wolf01>For example trying to allocate a tram with roads
09:51<argoneus>good afternoon train friends
09:58-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
09:58-!-mode/#openttd [+o Alberth] by ChanServ
09:58-!-Alberth is "purple" on @#openttd
10:03<Wolf01>The sorting of roadtypes is a bit... I don't know how to handle it :P
10:04<Wolf01>It uses GetRoadTypeInfo(), which now needs a base road type to get info for the subtype
10:09<@Alberth>you also with actual road types I guess, can't you use those?
10:09<Milek7_>UpdateWidgetSize is used inside Window constructor?
10:10<Wolf01>What do you mean Alberth?
10:11<@Alberth>Milek7_: sounds a bit low-level, constructor usually handles the tree as a whole, but I have forgotten where UpdateWidgetSize exactly fits in the picture
10:13<@Alberth>Wolf01: probably mostly that I don't understand your reasoning :p If you sort roadtypes, you have actual roadtypes, to get subtype information about?
10:13<Milek7_>yes, constructor calls InitNested
10:13<@Alberth>Wolf01: which contradicts your conclusion, so somewhere there is a hitch
10:14<Wolf01>No, I don't have the actual roadtype, only the subtype, and since they are just numbers I'm not able to get the info from the right subtype
10:15<@Alberth>Milek7_: ah, right. Yes, it traverses bottom-up to get size information from the leafs to the root of the window, and then top-down to propagate position+size back to the leafs
10:15<Wolf01>I have _roadtypes[][] = {{1,2,3,4}, {1,2,3,4}}, the function arguments are "1 and 2", which ones?
10:16<@Alberth>aside that the name should perhaps be _road_subtypes, sorry, no idea
10:17<Wolf01>I could also have 2 variables instead of a multi dimensional array, but it does not change that the compare function needs the base RoadType
10:17<Milek7_>bit misleading, it isn't obvious that when UpdateWidgetSize is called constructor didn't complete ;p
10:22<@Alberth>trying to construct a window in a base class?
10:23<Milek7_>no, i just wanted to access scrollbar in UpdateWidgetSize
10:23<Milek7_>and GetScrollbar was at end of constructor
10:24<Milek7_>had to split InitNested to CreateNestedTree and FinishInitNested with GetScrollbar in between
10:24<@Alberth>Wolf01: or you need a combined (base road-type, sub road-type) pair or so
10:24<Wolf01>I think that too
10:25<Wolf01>Maybe an offset in the enum?
10:26<Wolf01>Or just do "SUBTYPE_BEGIN + rt * 16" in loops
10:27<@Alberth>make a function to compose and extract the numbers
10:28<@Alberth>can do that to/from an enum if you like
10:28<@Alberth>I think we have something with a combined number for vehicle windows
10:29<@Alberth>vehiclelist.h:31:struct VehicleListIdentifier { <-- I think this one
10:34-!-Samu [] has quit [Remote host closed the connection]
10:39<Wolf01>Pack()/Unpack() I bet
10:41<@Alberth>like like a safe bet :)
10:50-!-JacobD88 [] has joined #openttd
10:50-!-JacobD88 is "JacobD88" on #openttd.notice #openttd
10:50<Wolf01>I think I'm doing too many things at once
10:51<@Alberth>yeah, first type all "q", then all "w", then all "e", etc
10:53<Wolf01> return this->basetype << ROADSUBTYPE_END | this->subtype; <- is this right?
10:53<Wolf01>For the Pack() method
10:54<@Alberth>needs parentheses around the <<
10:54<@Alberth>and constant name is a bit weird, but it looks like the right idea
10:55<@Alberth>assuming you want the subtype in the lower bits, and basetype in the higher bits (doesn't really matter, unless you exploit that eg for sorting or so)
11:01-!-keoz [] has joined #openttd
11:01-!-keoz is "Grmph" on #openttd
11:01-!-debdog [~debdog@2a02:8070:4584:4200:7a24:afff:fe8a:d04d] has joined #openttd
11:01-!-debdog is "Wowbagger" on #openttd #tycoon
11:03<Wolf01> looks good?
11:04-!-Samu [] has joined #openttd
11:04-!-Samu is "OFTC WebIRC Client" on #openttd
11:05<Samu>conversion from 'unsigned long' to 'int' requires a narrowing conversion openttd D:\OpenTTD\trunk\src\economy.cpp 96
11:05<Samu>english plz
11:06<@Alberth>unsigned long has more data bits than an int, so it you put the former in the latter, some bits may fall off
11:06<Samu>2560000000 is this number too big ?
11:08<@Alberth>it's hex 0x98968000 8 characters, so that's ok, but biggest is 0x7FFFFFFF
11:09<@Alberth>0x9.... represents a negative value in an int
11:10-!-keoz [] has quit [Ping timeout: 480 seconds]
11:10<@Alberth>so the compiler uses unsigned value, but obviously that won't fit in a signed integer of the same size
11:13<Samu>interesting, i indirectly came into my reported bug
11:19<@Alberth>that would work for your number
11:19<@Alberth>but it's really long
11:21<Samu>what's the biggest amount of money a company can store?
11:22<Samu>typedef OverflowSafeInt64 Money;
11:23<@Alberth>MAX_INT64 or INT_MAX64, I always forget which one it is
11:24<Samu>typedef OverflowSafeInt<int64, INT64_MAX, INT64_MIN> OverflowSafeInt64;
11:25<Samu>#define INT64_MAX 9223372036854775807i64
11:26<Samu>ok i see
11:27<Samu>i wonder what would happen once a company gets this much in the bank
11:27<Milek7_>64bits is "really long"?
11:28<Milek7_>it is one register on most modern architectures
11:28<@Alberth>compared to 32 bits? yep :)
11:29<Samu>do you have an inflation calculator?
11:30<Samu>what would be 2 560 000 000 with an inflation ratio of 4% over 100 years
11:31-!-Arveen [] has quit [Quit: Nettalk6 -]
11:34<@Alberth>Samu: amount = 256.... ; for year in range(100): amount = amount + amount * 0.04
11:34<Wolf01>Alberth, so now I could pass the RoadTypeIdentifier and use Extract If I just need the base RoadType? (or ::Unpack() if I need all)
11:36<@Alberth>Wolf01: no idea what VehicleListIdentifier does in detail, so "Extract" and "Unpack" have no meaning to me, but I would guess you can
11:38<Wolf01>TBH I should pack also the sort order, maybe if has catenary... maybe all
11:38<Samu>170 years is when inflation stops, interesting
11:40<@Alberth>Wolf01: doesn't the type itself have that information already?
11:41<Wolf01>I need to do GetRoadTypeInfo(RoadType) to have all the informations
11:41<@Alberth>I clearly have no understanding of "type" in road types, then
11:41<Wolf01>And that was the problem
11:42<Wolf01>Eh, in vanilla OTTD is easy... you have 2 types so you can just check if 0 or 1, all the other is hardcoded
11:42<@Alberth>I wouldn't store redundant information in the packed integer, it can only cause trouble
11:42<@Alberth>yeah, always a problem when you make a non-trivial extension :)
11:43<Wolf01>Now I only need to change every single _roadtype array around in the code
11:43<@Alberth>they never prepared for the general case that you're making :p
11:48<Wolf01>But I still think I need to do 2 different sorting functions, one for roadtypes and one for tramtypes
12:09-!-Mazur [] has quit [Remote host closed the connection]
12:16-!-Mazur [] has joined #openttd
12:16-!-Mazur is "Stefan Linnemann" on @#openttdcoop.stable @#openttdcoop #openttd #oolite @#township
12:17<Wolf01>I think I didn't understand how to use the RoadTypeIdentifier
12:28<Samu>> openttd.exe!`dynamic initializer for '_score_info''() Line 94 C++
12:28<Samu>dynamic initializer?
12:28-!-keoz [] has joined #openttd
12:28-!-keoz is "Grmph" on #openttd
12:30<Samu>ty milek
12:30<Samu>the _score_info is set before the main menu is even reached?
12:32<Samu>was trying to scale the performance rating based on map size
12:33<Samu>and wanted to account inflation into it
12:33<Samu>but now... I dunno
12:36<Milek7_>remove const from it
12:37<Milek7_>and set it to other values somewhere in map loading
12:41<Samu>inlfation happens every month
12:41<Samu>can't be on map loading
12:43<Milek7_>then set it every motnth
12:43<Milek7_>i think it should work
12:59-!-glx [] has joined #openttd
12:59-!-mode/#openttd [+v glx] by ChanServ
12:59-!-glx is "Loïc GUILLOUX" on +#openttd
13:05<Samu>generating 4096x4096 and 240 ais map
13:05<Samu>also trying 250k ops so i can burn my house
13:06<Samu>@calc 250000 * 240
13:06<@DorpsGek>Samu: 60000000
13:06<Samu>@calc 250000 * 15
13:06<@DorpsGek>Samu: 3750000
13:08<Samu>i better create a dedicated server, I can barely move the mouse
13:15<Samu>this is too darn impossible
13:15<Samu>250k ops
13:18<Milek7_>what are you trying to achieve? :)
13:18<Samu>a tick is advancing every 4 seconds
13:19<Samu>and we're still on 7th january
13:21<Samu>this would need a supercomputer as a server
13:21<Samu>and even then, i doubt it
13:24<Samu>ticks are taking 7 seconds now
13:24<Samu>still on 7th january
13:25<Samu>ok, enough of that
13:25<Samu>going back to 5k ops
13:27<@Alberth>Milek7_: he runs lots of AI games on the server, and spams the channel with years of the servers every couple of hours, with complaints on how slow it all is :)
13:30-!-Kurimus [] has joined #openttd
13:30-!-Kurimus is "Cizel" on #openttd
13:30-!-Flygon_ [~Flygon@] has joined #openttd
13:30-!-Flygon_ is "Flygon" on #openttd
13:34-!-ParanoidPrincess [~Tricia@] has joined #openttd
13:34-!-ParanoidPrincess is "Tricia" on #openttdcoop #openttd
13:34-!-ParanoidPrincess is now known as Etherische_Fluister
13:37-!-Flygon [] has quit [Ping timeout: 480 seconds]
13:47<Samu>i like his patch
13:57-!-andythenorth [~Andy@] has joined #openttd
13:57-!-andythenorth is "Andy" on #openttd
13:57<Samu>10 AIs died unexpectedly
13:59<Samu>@calc 5000 * 240
13:59<@DorpsGek>Samu: 1200000
14:25<supermop>no good shoes out there
14:25<supermop>underwhelmed by mens fashion this season
14:25<supermop>and everyone is still wearing stan smiths after like 2 years
14:26<supermop>going to just start wearing a suit every day to no think about it
14:26<andythenorth>supermop: can’t share your pain
14:26<andythenorth>shoes I have sorted
14:26<andythenorth>nailed on
14:28<supermop>all my tretorn sneakers are falling apart
14:28<supermop>cant walk on wet sidewalks as ill get my sock wet
14:28<supermop>and they all really smack of 2009 - but whatever is the look now is stupid
14:29<Wolf01>andythenorth, then share my pain, this subtypes thing is discouraging
14:29<andythenorth>supermop: nike pre-montreal, always classic
14:29<andythenorth>dates from about 1972
14:30<andythenorth>Wolf01: what is pain?
14:30<Wolf01>Errors everywhere
14:30<supermop>andythenorth: nikes dont fit me, so i wear addidas or puma usually
14:31<andythenorth>supermop: ok, can’t be helped :D
14:31<supermop>tretorns being owned by puma
14:31<supermop>but shit quality apparently
14:31<supermop>damn swedes
14:32<supermop>need ferragamo but architecture doesn't pay the wage for the style it expects
14:32<supermop>did you guys finish the SV game?
14:33-!-sla_ro|master [] has joined #openttd
14:33-!-sla_ro|master is "slamaster" on #sla #openttd #love
14:35<@Alberth>:O did we have one?
14:40<andythenorth>no and yes
14:40<andythenorth>in order
14:42<@Alberth>I was thinking about a new freight challenge, small long map, and a big city across the map where you cannot tunnel under
14:42<@Alberth>factories at either side of the city
14:43-!-supermop [] has quit [Read error: Connection reset by peer]
14:44-!-supermop [] has joined #openttd
14:44-!-supermop is "A CIRC user" on #tycoon #openttd
14:45-!-keoz [] has quit [Ping timeout: 480 seconds]
14:47<andythenorth>ships round the edge :P
14:47<andythenorth>planes :P
14:55<Wolf01>!AgUFeOGLNNfVhdJb5qXQXZwkjHmBgA patch, compiles but I get asserts on GetRoadTypeInfo(), I need somebody smarter than me to check what I have done
14:56<Wolf01>(patch against my dev branch)
14:58<@Alberth>andy: tramz and RVs :)
15:15-!-frosch123 [] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
15:15<andythenorth>Wolf01: I looked at the patch, but eh
15:15<andythenorth>out of my depth there
15:16<Wolf01>It's even out om my capabilities
15:17<Wolf01>I just put there things in a way to not trigger syntax and compile errors :D
15:19<Wolf01>Meanwhile I tried to keep an apparent feel of "it works"
15:22-!-sla_ro|master [] has quit []
15:40-!-goblin [] has joined #openttd
15:40-!-goblin is "someone" on #openttd
15:40<goblin>hello :-)
15:41<Samu>@calc 256-7
15:41<@DorpsGek>Samu: 249
15:43<goblin>the second example (with mail bags) at shows 3520 pounds, however using the formula at gives 4550*100*100*235/2^21 = 5098.58 (I used t = 40)... How comes the difference is so big?
15:47<@Alberth>at least one of them is wrong, is my guess
15:48-!-Webster [] has quit [Read error: Connection reset by peer]
15:50-!-Webster [] has joined #openttd
15:50-!-Webster is "Supybot" on #openttd @#coopetition @#openttdcoop.stable
15:50<@Alberth>it's a wiki, people write anything, sometimes it holds, sometimes it doesn't, or only partly
15:51<Milek7_>Samu: huh, do you want even more companies?
15:51<Samu>it's a weird number 249
15:52<@Alberth>not sure why you bother calculating payments, you get too much money anyway, who cares how much exactly
15:53<Milek7_>not for vactrains :)
15:54<goblin>Alberth, because I just created a very very long route across my entire map, and delivering valuables gives me less money than delivering goods across 3/4ths of the map, and I'm wondering why
15:54<Samu>the new version of AIAI is a damn cheater
15:55<Samu>station spreading...
16:00<andythenorth>valid tactic ;)
16:02<andythenorth>Wolf01: tonight I have nothing to offer on NRT :P
16:02<andythenorth>full Monday
16:07<goblin>so I'm kinda wondering what's the optimum distance to transport cargo for
16:08<goblin>I guess it's also a function of train speed
16:10<@Alberth>yes, and speed of loading
16:10<goblin>yees, valuables are produced much more slowly than goods
16:11<goblin>should I perhaps shorten the train length for valuables to get them loaded faster?
16:11<@Alberth>ie transit days start counting when they get on the train
16:11<goblin>that's what I was wondering as well, couldn't find that on the wiki :-)
16:15<@Alberth>I use a terribly simple rule, as long as it's not negative, it's ok :)
16:16<goblin>so you only optimize flow?
16:16<@Alberth>I get money faster than I can spend it, how much faster isn't that relevant
16:17<@Alberth>yep, I like building networks transporting lots of cargoes
16:17<@Alberth>typically sharing tracks, under servicing and breakdowns
16:17<@Alberth>causing major havoc if you're not careful
16:18<goblin>ah, the breakdowns. Last time I played, someone said to disable them entirely because they break the flow and there's nothing you can do to alleviate that. Is that still the case? I.e. is it possible for trains to pick a different path if there's a broken train in front of them?
16:19<@Alberth>they do avoid each other yes
16:19<@Alberth>breakdowns effectively make your network have less capacity
16:20<@Alberth>you need more room around a train so it can break down for a while without total disruption
16:20<@Alberth>so you need to expand to more tracks earlier
16:20<goblin>hmm, ok, sounds interesting
16:21<@Alberth>they also make reliability and age a useful notion
16:21<goblin>so a lot of lanes and a lot of lane switching options
16:21<goblin>yeah, I always like them
16:21<goblin>just wasn't sure how to plan for them, but maybe it's different these days :-)
16:21<@Alberth>not much switching options, in my experience
16:22<@Alberth>otherwise they constantly switch track which also reduces throughput
16:22<goblin>but then if one breaks down, it'll block possibly very many other trains behind it
16:22<Samu>i wonder how would a GS handle computations for 240 companies
16:23<@Alberth>then you have too many trains on that track
16:23<goblin>well, it's a mainline... so it's meant to carry a lot
16:23<@Alberth>with high enough reliability, it's not a disaster to have a broken train for a while
16:24<@Alberth>you need a more distributed approach :)
16:25<@Alberth>you can't just dump a zillion trains onto one track and it runs
16:25<goblin>well, the coop guys do it like that I think
16:25<@Alberth>the concept of "too full" arrives a lot earlier
16:26<@Alberth>yes they do
16:26<@Alberth>they "cheat" :p
16:26<goblin>aah. :-D
16:27<@Alberth>although at their scale it makes sense to not get disruptions in the flow
16:27<@Alberth>but it's a matter of wht you like to play
16:28<@Alberth>some people do precise time tabling, etc. breakdowns make that impossible
16:28<@Alberth>others just want to have a massive transport over one big line, breakdown also make that impossible
16:29<goblin>yeah, exactly
16:29<@Alberth>I like to find out how to transport stuff with breakdowns
16:29<@Alberth>or transport all cargo all over the map, using cargo-dist
16:29<goblin>I was thinking how to play with breakdowns, but still have high-throughput lines
16:30<goblin>i.e. how to make trains not switch lanes constantly, but only if there's something broken in front
16:30<@Alberth>it's a challenge
16:30<@Alberth>I think it should be allowed to change as it wants, but the other trains should not get into trouble for it
16:30<@Alberth>I haven't yet figured out how to do that
16:32<goblin>I know of a way
16:32<goblin>expose the signal changes via a scripting API and have the crowd think up a solution ;-)
16:34<@Alberth>tbh, not knowing the answer is much more fun
16:35<@Alberth>I spent 4 years or so figuring out how to distribute all cargoes over all industries with cargodist
16:35<@Alberth>once I had the solution, all fun was gone
16:36<@Alberth>although there are a few things I can still try
16:36<fonsinchen>so, what is the solution? I never figured that one out ...
16:36*goblin reads up about that cargodist
16:38<@Alberth>easy, you transport cargo from source industry to destination industries, or some other way where you visit more than single source+destination
16:38<goblin>ah yes
16:38<@Alberth>cargo-dist will do the rest in distributing cargoo over the routes that you provide
16:39<goblin>the other problem that was always nagging me is that why on earth would a power station pay $70k for coal from the other end of the map when they can have it much cheaper from a local mine
16:39<@Alberth>and you can do that for every single cargo on a separate network
16:39<@Alberth>goblin: not all coal is equal :p
16:40<@Alberth>but you're projecting real life ideas into the game, which generally doesn't work
16:40<goblin>no I thought maybe this cargodist thingy makes it more reasonable
16:40<goblin>seeing as passengers want to go to a specific place, for instance
16:40<goblin>maybe the coal would only want to go to specific power stations too ;-)
16:41<@Alberth>only partly, pax still stay in your network
16:41<@Alberth>they don't want to go to another town
16:41-!-JacobD88 [] has quit [Quit: JacobD88]
16:42<@Alberth>ie if you make point-to-point connections only, cargodist doesn't do anything
16:42-!-FLHerne [] has joined #openttd
16:42-!-FLHerne is "Francis Herne" on #openttd
16:42<@Alberth>where each point is connected to 1 other point only
16:43<@Alberth>for that you need cargodest :)
16:43<@Alberth>which we also had as patch for a while
16:45<Samu>TownPool::MAX_SIZE = 64000
16:45<Samu>hmm max number of towns is 64000? must test
16:47<@Alberth>fonsinchen: Common Transport, 2072-03-05.sav
16:53<Samu>wow it really is generating 64000 towns
16:53<Samu>hmm :)
16:54<FLHerne>That sounds like too many
16:54<FLHerne>Who invented the NFO spec for RV speeds?
16:55<sim-al2>Reading the wiki page on vehicle speed is fun
16:55<sim-al2>like how the units are km-ish
16:56<FLHerne>I'd assume "bodging after the fact", except both properties claim to be introduced in the same version
16:56<@Alberth>FLHerne: probably early in ttdpatch development, so very original game compatible
16:57-!-andythenorth [~Andy@] has left #openttd []
16:58<Samu>the map generator doesn't scale that well
16:58<Samu>but... whatever
16:58<Samu>64k towns is an absurd amount either way
16:58-!-V453000 [] has left #openttd []
16:59-!-V453000 [] has joined #openttd
16:59-!-V453000 is "Vaclav Benc" on #openttd @+#openttdcoop.nightly #openttdcoop.devzone @+#openttdcoop @+#openttdcoop.stable #/r/openttd #hazzard @#openttdcoop.pixel @#V453000 #nuts #openttdcoop.bots #mi-gaming #mi-gaming-2
16:59<Samu>64k easily fit on a 4kx4k map, let's try a smaller map
17:00<Samu>or maybe i'm being mislead
17:00<Samu>i'd like to count the total
17:02-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
17:08*fonsinchen checks it out
17:16<fonsinchen>nice. I was expecting more trains though. It seems to be easier for cargo than for pax and mail. I always lose patience when trying to cram more tracks into growing cities.
17:22<goblin>is it my imagination, or is there something preventing the existence of oil wells after a certain date?
17:23<Samu>there is
17:24<Samu>they won't spawn from 1960 i think, not sure
17:24<Samu>maybe even less
17:24<goblin>thanks! /me grumbles
17:24<Eddi|zuHause>they get phased out so you need to service oil rigs instead
17:25<goblin>are there any other industries with that behaviour?
17:25<Eddi|zuHause>also, this only applies to the temperate climate
17:25*goblin curses his luck
17:25<FLHerne>Some FIRS ones, but only secondaries
17:25<goblin>yeah, I'm on temperate
17:26<FLHerne>So at least the ones you're using don't vanish
17:26<Eddi|zuHause>that's not true at all
17:27-!-keoz [] has joined #openttd
17:27-!-keoz is "Grmph" on #openttd
17:27<Eddi|zuHause>well, let's say "it's complicated"
17:30<Samu>ah, the 4kx4k map did not generate 64000 towns, it generated 24009
17:30<FLHerne>Don't vanish unless you serve them badly and use non-default parameters?
17:30<FLHerne>Samu: Might have run out of town names
17:31<Samu>or out of space
17:31<Samu>it's english names
17:31<Samu>town names English (original)
17:31<Samu>how many names does that allow?
17:33-!-cinch [] has joined #openttd
17:33-!-cinch is "realname" on #openttd #tor-project #debian-next #tor
17:36-!-Kurimus_ [] has joined #openttd
17:36-!-Kurimus_ is "Cizel" on #openttd
17:37<FLHerne>I tried to estimate it and got about 2m
17:37<FLHerne>Might be wrong
17:40<Samu>2 million? wow that's huge
17:40<Samu>so i ran out of space
17:41-!-Kurimus [] has quit [Ping timeout: 480 seconds]
17:42-!-Kurimus_ [] has quit [Remote host closed the connection]
17:42-!-Kurimus [] has joined #openttd
17:42-!-Kurimus is "Cizel" on #openttd
17:59-!-FLHerne_ [] has joined #openttd
17:59-!-FLHerne_ is "Francis Herne" on #openttd
17:59-!-FLHerne [] has quit [Read error: No route to host]
18:00-!-Progman [] has quit [Remote host closed the connection]
18:00<Samu>how much is Random() & 7
18:00<Samu>what is this Random() doing here :(
18:05<Samu> Random returned 4292697756 unsigned int
18:05<Samu>@calc 4292697756 & 7
18:05<@DorpsGek>Samu: Error: Something in there wasn't a valid number.
18:07<Samu>it's 4
18:08<Samu>46+4 = 50
18:08<Samu>and now scale it by map size
18:09<FLHerne_>Samu: '& 7' means 'take the lower three bits'
18:09<FLHerne_>So, random number from 0 to 7
18:10<Samu>nice, 46 + 7 = 53
18:10<Samu>scaling 53 to map size, must find
18:12<Samu>want to discover the highest value of "high" number of towns in 4096x4096 map
18:13<Samu> ScaleByMapSize returned 13568 unsigned int
18:13<Samu>got it, thx FLHerne_
18:14-!-FLHerne_ [] has quit [Quit: There's a real world out here!]
18:31<Samu>15000 seems like a good number
18:37-!-Kurimus_ [] has joined #openttd
18:37-!-Kurimus_ is "Cizel" on #openttd
18:37-!-Biolunar [] has joined #openttd
18:37-!-Biolunar is "Biolunar" on #openttd #suckless
18:40<Samu>probably not, grr
18:41-!-Kurimus [] has quit [Ping timeout: 480 seconds]
18:42-!-keoz [] has quit [Ping timeout: 480 seconds]
18:48-!-Kurimus_ [] has quit [Ping timeout: 480 seconds]
18:49<Samu>ok, 20000 is the better ratio
18:50<Samu>4096x4096 is 4 times bigger than 2048x2048
18:50-!-gelignite [] has quit [Quit:]
18:50-!-Samu [] has quit [Quit: Page closed]
18:50-!-Samu [] has joined #openttd
18:50-!-Samu is "OFTC WebIRC Client" on #openttd
18:58<goodger>to be pedantic it's only three times bigger
19:02-!-supermop__ [] has joined #openttd
19:02-!-supermop__ is "A CIRC user" on #tycoon #openttd
19:09-!-supermop [] has quit [Ping timeout: 480 seconds]
19:09<Samu>i can't manually set a value over 5000
19:10<Samu>@calc (4096*4096)/(2048*2048)
19:10<@DorpsGek>Samu: 4
19:10<Samu>no, it's 4
19:10<Samu>@calc 5000*4
19:10<@DorpsGek>Samu: 20000
19:12<Samu>my main concern now is to find out if all these town name generators can create 20k names
19:15<Samu>i think i need a super flat map to really create all 20k towns
19:17<Samu>19995 towns generated
19:17-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
19:27<Samu>Milek7_: I'm getting weird errors in the dedicated server with AIs "dbg: [script] Next() is invalid as Begin() is never called"
19:27-!-Biolunar [] has quit [Ping timeout: 480 seconds]
19:28<Samu>need to check if it's generated by the AI or some other type of error from openttd
19:30<Samu>D:\OpenTTD\trunk\src\script\api\script_list.cpp(474): DEBUG(script, 0, "Next() is invalid as Begin() is never called");
19:31<Samu>who uses this script_list thing
19:38<Samu>there's not enough Austrian town names t.t
19:38<Samu>there's about 50xx
19:38<Samu>oh well
19:44<Samu>i'm nearly brute forcing the generation of austrian town names
19:45<Samu>can't go past 5410
19:46-!-HerzogDeXtEr [] has quit [Read error: Connection reset by peer]
19:49<Samu>actually can't go past 5409
19:49<Samu>it's attempting to create 5410th austrian town
19:52<Samu>ok, next is...
19:55<Samu>13726 :(
20:03-!-JezK_ [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has joined #openttd
20:03-!-JezK_ is "jez" on #openttd #love
20:11<Samu>something very strange is happening
20:11<Samu>i can't generate a world with french town names, it gets stuck
20:11<Samu>openttd is stuck
20:12<Samu>erm, nevermind, it created only 68, that's is too low
20:13<Samu>i really thought it had stuck, lol
20:22-!-Snail [] has joined #openttd
20:22-!-Snail is "Jacopo Coletto" on #openttd
20:41<Samu>patch posted
20:41-!-Gja [] has quit [Remote host closed the connection]
20:41<Samu>cyas goodnight
20:42-!-Samu [] has quit [Quit: Page closed]
20:44-!-tokai [] has joined #openttd
20:44-!-mode/#openttd [+v tokai] by ChanServ
20:44-!-tokai is "Christian Rosentreter" on +#openttd
20:44<goblin>dat priority... how does it work?
20:44<goblin>I'm using path signals normally
20:45<goblin>the wiki says something about "two-way pre-signals" (under the Basic Priority), but I can't find ones like that
20:45<goblin>I only have Block, Entry, Exit and Combo signals
20:45<goblin>and not really sure how to interpret that picture on the wiki
20:46-!-cinch [] has quit [Quit: Leaving]
20:47<supermop_>you dont really need it
20:47<supermop_>priorities are kind of arcane
20:47<supermop_>like most of the use cases for entry signals
20:49<Eddi|zuHause>with "pre-signal" they probably mean "entry"
20:49<goblin>oh. hm. So how do I... hm.
20:49<supermop_>certain play styles that favor building tracks almost like circuit boards do some interesting things with them, but if you just want a good capacity rail line that wont jam up you dont really need priorities
20:49<Eddi|zuHause>the naming was changed a few years back
20:49<goblin>probably, yeah, but I'm having difficulty distinguishing it from others and guessing where do path-based ones go
20:50<supermop_>and they will probably cause more problems than they solve
20:50<supermop_>goblin: just use path everywhere
20:50<supermop_>mostly one-way
20:50<goblin>supermop_, hm, ok, so when I'm merging something onto something with more traffic... how do I prevent that more-traffic path to become stopped?
20:51<Sylf>Those people who talk a lot about priority mainly use block signals
20:51-!-tokai|noir [] has quit [Ping timeout: 480 seconds]
20:51<Sylf>path signals are rare use case for them
20:51<supermop_>in a few places, like a bi-directional platform or center track use the two-way
20:51<goblin>supermop_, right, yes, that's what I'm doing
20:51<Sylf>path signals can be used to construct prio too
20:51<supermop_>goblin: that is tricky
20:51<goblin>only really use two-way path on terminus-style stations
20:51<supermop_>but tbh the most effective way is scheduling, not priorities
20:52<goblin>scheduling? Like, time tables?
20:52<goblin>I don't see it
20:52<goblin>I have a very long bridge so I doubled the path before and after it
20:52<supermop_>it is a lot of work on dense lines, but you can get it so that only one train is passing a junction at any time
20:53<Eddi|zuHause>you don't need priorities for a doubled bridge
20:53<goblin>and after the bridge, when 2 paths merge into one, everything slows down because the trains accelerate and then stop
20:53<Sylf>that's totally not something you can solve with prio
20:53<goblin>first the left one accelerates, then the right one, and it keeps flipping
20:53<goblin>ok, cool, good to know :-)
20:53<Eddi|zuHause>you've got an "evil mode" then
20:54<Sylf>You need more capacity for the line overall, so the trains don't have to slow down at or around the bridges
20:54<Eddi|zuHause>as soon as the first one slows down, you get this ripple effect that slows everything down
20:54<supermop_>what you need is more spacing between trains, or double the whole line
20:54<Sylf>assuming you're playing the coop style game
20:54<Eddi|zuHause>you need to prevent that first slowdown
20:55<goblin>can I read up about that? Preferably some article that knows about path signals? :-)
20:55<supermop_>if the capacity of the single bridge is enough, then space out the trains so that they dont wait for it to clear. if that capacity is too low, the double the bridge
20:56<goblin>supermop_, _more_ spacing? that's interesting... I always use 2 squares distance between signals, read it on a wiki somewhere
20:56<goblin>I guess it's way too low
20:56<supermop_>but i this case, a priority would at best doom one track to always be stuck waiting, at worst just give you your current problem but worse
20:56<goblin>but the jam happens after the joiner after the bridge
20:56<Eddi|zuHause>imho, 2 tiles is overkill, one train length usually works unless you try to pack really tight
20:57<goblin>thanks Sylf :-)
20:57<supermop_>goblin: no i mean how far apart are the trains in time
20:57<Eddi|zuHause>might make it denser in areas with acceleration occuring
20:57<Sylf>there's also
20:57<supermop_>imagine you are standing at a real train station - do the trains come every 10 minutes, or every hour?
20:58<supermop_>or do 6 come 1 minute apart and then none for 54 minutes?
20:59<goblin>supermop_, well, yeah, the line is near its capacity, but I'm curious how to juice it up to the maximum ;-) manual scheduling for all those trains would be rather tedious I think
20:59<supermop_>and if it is 6 trains per hour, your junction will work more smoothly if they have a regular spacing of time between them
20:59<supermop_>goblin: if its fully saturated the only way is add another track
20:59<Eddi|zuHause>i once had a maglev line that merged, and i had to do very exact timetabling to prevent slowdown from occuring at the merge
21:00<supermop_>if you find you need 10 trains per hour, but they need to be 10 minutes apart, your only hope is a 2nd line
21:01<Sylf>if you want to saturate lines to max, you do this
21:01<goblin>supermop_, well, it's not fully saturated yet, it just saturates after the bridge, the rest is reasonably empty
21:02<Eddi|zuHause>make sure the two paths over the bridge are exactly the same length
21:02<goblin>okie, thanks a lot for all your help, I'll do the reading and come back :-)
21:02<Eddi|zuHause>there should be no conflict on the merge
21:02<supermop_>if the saturation is local, try a timetable - it isnt as hard as it looks
21:02<Eddi|zuHause>as long as all trains enter at max speed
21:02<Eddi|zuHause>the two paths are the same length
21:03<supermop_>happy to give timetabling advice
21:03<goblin>supermop_, but there's so many stations behind the bridge (before the jam happens)
21:03<Eddi|zuHause>and there is no jam point beyond the bridge
21:03<supermop_>tbh i find it really satisfying to get a bunch of timetabled trains optimized
21:04<Eddi|zuHause>yes, but creating timetables in complex networks is a nightmare
21:04<supermop_>goblin: you can autofil with a train running to get a starting point to work from
21:04<supermop_>goblin: do all of these trains follow the same route/have the same orders?
21:05<Eddi|zuHause>there should be an "instant" autofill that just makes a calculation of track length and acceleration
21:05-!-JezK_ [~jez@2407:7800:400:107f:3db5:daca:8457:e66a] has quit [Ping timeout: 480 seconds]
21:05<supermop_>Eddi|zuHause: man that would be great
21:06<supermop_>or a night/non revenue service mode where you can test a new train over the line without wasting 2 years
21:06<goblin>supermop_, nope!
21:07<goblin>some of them load wood, some of them coal, and some receive oil transfers
21:07<Eddi|zuHause>supermop_: that's called reloading
21:12<goblin>so the "Solution" at mentions... priority!
21:12<goblin>it's doing some kinda weird look-ahead priority with path signals I think, but I'm not quite getting it
21:13-!-JezK_ [~jez@2407:7800:400:1065:a7e6:5421:1af9:6c06] has joined #openttd
21:13-!-JezK_ is "jez" on #love #openttd
21:15<Sylf>actually, coop's stance is that there is no one-size-fits-all solution to anything
21:15<Sylf>just so you know
21:15<goblin>yeah but I'd like to learn /at least/ one solution ;-)
21:16<Sylf>the best solution is to let people see the actual problem via multi player or sharing the game sav
21:19<goblin>I mean, I know I should probably just double the line and all
21:19-!-LadyHawk- [] has joined #openttd
21:19-!-LadyHawk- is "..." on #openttdcoop #openttd
21:19<goblin>but it doesn't satisfy my curiosity about all this priority stuff
21:20<Sylf>Priority is not the tool to fix a slow down at a double bridge.
21:20<Sylf>That much I can say definitively.
21:21<Sylf>beyond that, priority is all about learning how pre-signals work
21:22<goblin>right, but the link to Destructive Interference mentions only one solution to the problem and that solution is based on priority :-D
21:22<Sylf>that's a bad example
21:22<goblin>so, aside from increasing the capacity of the line, are there /other/ solutions?
21:22<Sylf>it may have worked for that particular case. That's about all
21:23-!-LadyHawk [] has quit [Ping timeout: 480 seconds]
21:23-!-LadyHawk- is now known as LadyHawk
21:23<Sylf>make sure 2 paths lengths are absolutely the same, including exact count of straight and diagonal tracks
21:23<Sylf>and make sure that trains just don't slow down on the congested lines
21:24<goblin>oh, they most certainly aren't
21:53-!-sim-al2 [] has quit [Ping timeout: 480 seconds]
21:59-!-glx [] has quit [Quit: Bye]
22:23-!-umgeher [~umgeher@] has quit [Ping timeout: 480 seconds]
22:25-!-Snail [] has quit [Quit: Snail]
22:33-!-mindlesstux [] has quit [Read error: Connection reset by peer]
22:45<supermop_>Sylf: do the pf penalties have to be exactly equal?
22:45<Eddi|zuHause>no, the vehicle steps, not the pathfinder penalties
22:45<supermop_>doesn't a train on line ahead weigh enough to overcome any slightly higher bits of the empty line?
22:46-!-DDR [] has quit [Remote host closed the connection]
22:47<Eddi|zuHause>if the lines have different numbers of steps, then a train taking the shorter route will run into the previous train taking the longer route, forcing him to stop
22:47<Eddi|zuHause>and once a train has to stop, you have "lost"
22:48-!-DDR [] has joined #openttd
22:48-!-DDR is "David" on #openttd
22:48<Eddi|zuHause>there is no way out of that other than stopping all trains and emptying the line, then starting up again
22:49<Eddi|zuHause>note that straight vehicle steps do not equal diagonal vehicle steps
22:49<Eddi|zuHause>so you need to have the same number of diagonal trackbits
22:53<supermop_>wouldn't the lengths need to be vastly different to be meaningful?
22:54<Eddi|zuHause>no, if your trains are tightly packed, even small differences can have this impact
22:54<supermop_>surely both trains would reach a station or something before they had to merge again?
22:55<Eddi|zuHause>this is about a doubled bridge, not a station
23:03<Sylf>the pf penalty of red signal is probably bigger than any other form of pf penalties from multiple bridges/tunnels, extra slopes etc
23:06<supermop_>going to bed
23:17-!-JezK_ [~jez@2407:7800:400:1065:a7e6:5421:1af9:6c06] has quit [Ping timeout: 480 seconds]
23:38-!-JezK_ [~jez@2407:7800:400:107f:442f:917c:e18b:a21e] has joined #openttd
23:38-!-JezK_ is "jez" on #love #openttd
23:54-!-umgeher [~umgeher@] has joined #openttd
23:54-!-umgeher is "Umgeher Torgersen" on #vm #openttd #kontrl #awesome
---Logclosed Tue Oct 04 00:00:46 2016