Log for #openttd on 16th June 2020:
Times are UTC Toggle Colours
00:00:23  <supermop_Home> i feel like you could make a big tabletop roleplaying game based on the Japanese private railway / department store companies
00:06:09  *** lastmikoi has joined #openttd
00:16:24  *** Progman has quit IRC
00:17:50  *** HerzogDeXtEr1 has quit IRC
00:23:11  *** gelignite has quit IRC
01:16:26  *** snail_UES_ has quit IRC
01:37:29  *** Boingo has joined #openttd
01:40:30  <Boingo> Hello all.  My son and I have been enjoyning openttd for a few days now. With a few games under our belt, we are starting to get the hang of it and think we are ready to "invest" our time into a big world for the long haul. We undertand that the GRFs have to be installed before we start, so my question is, what are some of the best/most popular?  I can't seem to find a list that
01:40:32  <Boingo> sorts them in any sort of rating/popularity/downloads.
02:10:21  *** snail_UES_ has joined #openttd
02:28:11  *** debdog has joined #openttd
02:31:38  *** D-HUND has quit IRC
02:35:31  *** Flygon has joined #openttd
02:39:46  *** glx has quit IRC
03:28:48  *** Wormnest has quit IRC
03:32:55  *** Smedles has quit IRC
03:42:09  *** Smedles has joined #openttd
03:52:20  *** Wormnest has joined #openttd
04:35:02  *** Wormnest has quit IRC
05:29:23  *** andythenorth has joined #openttd
06:03:15  *** sla_ro|master has joined #openttd
06:04:50  *** heffer has quit IRC
06:05:52  *** heffer has joined #openttd
06:11:30  *** snail_UES_ has quit IRC
06:17:28  *** iSoSyS has joined #openttd
06:24:20  *** iSoSyS has quit IRC
06:31:28  *** keoz has joined #openttd
06:40:01  *** heffer has quit IRC
06:41:01  *** heffer has joined #openttd
07:02:25  *** cHawk_ has joined #openttd
07:06:03  <andythenorth> o/
07:08:30  *** cHawk- has quit IRC
07:57:02  *** Samu has joined #openttd
08:11:00  *** Progman has joined #openttd
08:22:40  *** arikover has joined #openttd
08:27:23  <arikover> Hello everybody!
08:28:58  <Samu> hi
08:30:47  <arikover> andythenorth: I just noticed the vehicles being displayed on top of Iron Horse pages ( are randomized. And clickable.
08:31:01  <andythenorth> yes
08:31:18  <arikover> andythenorth: I've F5-ing for 10 minutes...
08:31:28  <andythenorth> :)
08:31:36  <arikover> So nice!
08:31:43  <andythenorth> you get very random combinations
08:32:04  <arikover> Yeah, I got a Spinner towing an HST.
08:32:42  <arikover> Totally worth it!
10:06:03  *** gelignite has joined #openttd
10:09:48  <FLHerne> Boingo: That's largely a matter of what you want to play :-)
10:10:20  <FLHerne> For "base game with a few more features", look at OpenGFX+
10:10:55  <FLHerne> Then there are things like the vacuum-tube set that extend the base game time-wise while having a similar style
10:13:22  <FLHerne> Iron Horse (trains) and Road Hog or eGRVTS (road vehicles) are a bit bigger but still sort of generic
10:13:53  <FLHerne> Then there's a whole bunch of "realistic" trainsets for different countries
10:14:10  <FLHerne> For industries, FIRS is probably best
10:14:43  <FLHerne> It has parameters to choose how many kinds of industry/cargo you want
10:15:59  <FLHerne> There's a better-categorized list on the wiki
10:17:41  *** gelignite has quit IRC
10:34:20  *** sla_ro|master2 has joined #openttd
10:34:34  *** dvim has quit IRC
10:34:47  *** dvim has joined #openttd
10:39:45  *** sla_ro|master has quit IRC
10:39:58  *** mindlesstux6662 has quit IRC
10:40:16  *** mindlesstux6662 has joined #openttd
11:06:03  *** mindlesstux6662 has quit IRC
11:06:17  *** mindlesstux6662 has joined #openttd
11:10:01  <LordAro> is lunch?
11:11:09  <andythenorth> might be
11:12:58  *** arikover has quit IRC
11:16:18  *** ZirconiumX has quit IRC
11:53:48  *** arikover has joined #openttd
12:09:59  <argoneus> can you change the configuration of a gamescript in a running game?
12:14:32  <planetmaker> that's not forseen afaik
12:14:37  <planetmaker> similar to newgrfs
12:17:05  *** WormnestAndroid has quit IRC
12:17:18  *** WormnestAndroid has joined #openttd
12:26:10  <b_jonas> it's past 2020 in game and I only just realized that I forgot to build status to the company owner in all towns I use
12:26:24  <b_jonas> despite that I've had more than enough money for a while
12:26:35  <b_jonas> and it increases station ratings
12:30:51  *** WormnestAndroid has quit IRC
12:31:08  *** WormnestAndroid has joined #openttd
12:35:46  <Timberwolf> argoneus: You can change parameters of an existing GS if the developer allows you, but can't change which GS you're running.
12:35:58  <argoneus> oh, I see
12:36:00  <argoneus> thanks!
12:38:21  *** glx has joined #openttd
12:38:22  *** ChanServ sets mode: +v glx
12:53:35  <supermop_Home> hi
13:32:17  *** snail_UES_ has joined #openttd
13:43:13  <andythenorth> woah, GS dev can allow parameter changes? :o
13:43:28  <supermop_Home> Poppleton has a 2'  gauge plant nursery railway..
13:44:19  <supermop_Home> unfortunately there is no 4mm gauge track out there
13:46:37  <supermop_Home> hmm T gauge is close to being 2' for Z scale
13:49:45  <supermop_Home> also, i wonder if anyone ever regauged N scale trains to run on Z track to better model 1067mm
13:52:42  <supermop_Home> why can't i pick like mountain amount in scenario editor?
13:53:47  <arikover> Variety Distribution does that... -ish.
13:56:26  <supermop_Home> you can't set that in scenario editor
13:57:16  *** nielsm has joined #openttd
14:00:15  <arikover> I think you can: just click on "random" and you should see the standard window, just like when you do prepare a new game.
14:00:27  <supermop_Home>
14:02:32  <supermop_Home> ugh it just makes a boring minnesota
14:03:12  <supermop_Home> tons of unconnected lakes in flat land, with isolated hills
14:05:45  <supermop_Home> and with max height 128, 512x256 map, alpinist, v high variety distribution
14:05:54  <supermop_Home> the tallest peak is only 19
14:06:51  <arikover> Your map is too small. Alpine works well for big maps, I think.
14:07:34  <supermop_Home> not only does the terrain generator suck, after 12 years of playing this game i still have no idea what result to expect from most of these settings
14:08:16  <supermop_Home> arikover the hills are certainly not limited my map size, there is plenty of flat land around them
14:08:34  <supermop_Home> i would expect a map of this size to have peaks at 30-40 height
14:15:22  <LordAro> it is well known that TGP has issues
14:24:01  <arikover> supermop_Home: Have you set Variety Distribution to None?
14:29:48  <arikover> supermop_Home: I just tried max height 128, 512x256, alpinist, variety distribution None, and I get a peak at 24 TTD-feet.
14:30:11  <arikover> supermop_Home: with 512x512, it gets as high as 30.
14:34:16  *** ZirconiumX has joined #openttd
15:02:36  *** Progman has quit IRC
15:15:08  <supermop_Home> i would say there needs to be better explanation of variety distribution and what to expect it does
15:15:43  <supermop_Home> the term itself is not really parseable
15:16:04  <arikover> That would be great, yes.
15:16:36  <supermop_Home> like i have no reason to think that none = bigger hills
15:24:10  <supermop_Home> also why do i get mountain tops flattened off at 24 when max height is 128?
15:26:15  <supermop_Home>
15:26:35  <supermop_Home> as you can see - i can raise the mountain above the flat level manually
15:26:47  <supermop_Home> but why is it flat to begin with?
15:31:42  *** HerzogDeXtEr has joined #openttd
15:38:54  <supermop_Home> well this has completely killed my desire to play a game. going outside
15:45:15  *** frosch123 has joined #openttd
15:45:48  *** HerzogDeXtEr1 has joined #openttd
15:48:13  <Timberwolf> Map edge length, usually.
15:48:43  *** HerzogDeXtEr has quit IRC
15:49:04  <Timberwolf> I think there's an internal restriction on how high hills are dependent on length of smallest map edge. I haven't seen it clip the peaks like that before though, normally it just gives smaller hills.
15:51:25  <Timberwolf> andythenorth: `flags = CONFIG_INGAME` on `AddSetting()`
15:56:29  <b_jonas> I wish one of the transparency options hid the trees of the tree-lined roads in towns
15:58:27  <FLHerne> Yeah, that annoys me sometimes too
15:59:22  *** Wormnest has joined #openttd
16:23:16  <frosch123> b_jonas: settings dropdown -> full details
16:23:39  <frosch123> the option exists, just the gui is messy
16:24:16  <b_jonas> frosch123: thank you, that works!
16:24:21  <b_jonas> I'll be using that
16:24:44  <b_jonas> that's the one that hides railway fences too, those can get in the way too sometimes, so that's useful
16:25:25  <b_jonas> meanwhile, I'm now spending a lot of time building a complicated junction, and trying to make sure that it won't jam or deadlock
16:25:51  <b_jonas> the space is a bit tight
16:26:05  <Boingo> FLHerne: Thanks!  I looked at FIRS, but I think I might try ECS.
16:26:12  *** gelignite has joined #openttd
16:26:20  <b_jonas> it's for one of the two oil refineries that I want to transmit oil to
16:27:05  <b_jonas> so all the oil from the sea on the northeast and east to this refinery in the west, and all the oil on the south side to the other refinery in east
16:27:58  <b_jonas> but I'm going to share the four-track spine with a high capacity passenger train line
16:28:47  <b_jonas> eventually that spine will be four tracks all in one direction, and all trains will go counterclockwise, but for now I only have a large section of it (two of the three connections between the three big cities) so it's two-way
16:29:57  <b_jonas> the city stations are all directly part of the spine, and they take passengers and mail (and goods in the future), but all the oil refiners will be on sidelines
16:30:59  <b_jonas> so I'm designing the complicated but cramped sideline for the west oil refinery, which has a lot of parallel tracks so that it can't get congested by either oil tankers or goods trains, and the passenger line can just pass straight through in priority
16:31:26  <b_jonas> the passenger line won't even have bridges, because I eventually want it to be a really fast vac train line
16:37:01  <TrueBrain> Wall of text hits you for 2 points ;)
16:47:40  <b_jonas> yeah, it'd look better on a screenshot I guess
16:59:54  *** Flygon has quit IRC
17:18:03  * andythenorth needs a name for the FIRS GS
17:18:13  <andythenorth> SRIF GS
17:18:18  <andythenorth> GS GS
17:19:26  <_dp_> YAGS
17:19:40  <andythenorth> ha ha
17:19:47  <andythenorth> Ultimate GS
17:19:56  <andythenorth> Yet Another Ultimate GS
17:20:02  <andythenorth> it's going to be quite confusing
17:20:14  <frosch123> i second "YAK Shaving"
17:20:29  <frosch123> YAKS
17:20:33  <andythenorth> YAKS
17:20:42  <_dp_> GS of Life, the Universe, and Everything
17:20:52  <andythenorth> I could just call it GS
17:21:14  <_dp_> GS42 for short
17:21:17  <andythenorth> it will combine daylength, town growth and goals
17:21:21  <andythenorth> so it's a bit confusing
17:21:29  <frosch123> call it "Buy a FIRS server at"
17:21:54  <andythenorth> that is nice
17:22:06  <andythenorth> domain is for sale also
17:22:11  <andythenorth> 95
17:22:59  <frosch123> it will probably get more expensive now
17:23:04  <frosch123> so many hits
17:23:37  <andythenorth> cheap at any price
17:23:39  <frosch123> is there some obvious secondary meaning for "Firs" in some language?
17:23:54  <frosch123> or do they register all 4 letter combinations
17:23:56  *** Wolf01 has joined #openttd
17:24:16  <andythenorth> I only get the trees when I google
17:25:25  <Wolf01> I get only lego when I google instead :P
17:25:30  <frosch123> it's the federal inland revenue service of nigeria
17:25:58  <frosch123> not sure what a revenue service is though
17:28:07  <frosch123> i like sentences that contain both "taxes" and "voluntary complicance"
17:30:41  <frosch123> there is a font named "TT Firs" :p
17:32:07  <frosch123> <- i guess not worth the price for using it on the docs page
17:33:07  <andythenorth> lol :)
17:36:27  <LordAro> it's quite a nice font
17:38:00  <andythenorth> nice font
17:38:09  <andythenorth> I should buy it :P
17:38:24  <andythenorth> hmm I could do with a better domain for my AWS buckets
17:38:35  <andythenorth> is not snappy
17:42:20  <frosch123> playfirs.* is available
17:42:44  <frosch123> oi, newgrf.* is available
17:43:01  <frosch123> www.newgrf.*/firs
17:43:47  <frosch123> .game is expensive
17:45:43  <frosch123> oh. .fail exists, :)
17:45:45  <andythenorth> oh
17:45:52  <andythenorth> can we get .newgrf as TLD?
17:45:58  <andythenorth> or .openttd?
17:46:08  <_dp_> you know it's a really terrible name when 6-letter com is available :p
17:46:30  <andythenorth>
17:46:50  <andythenorth> or we could offer paths to AWS buckets? :P
17:46:54  <andythenorth> controversial
17:47:10  <frosch123> there is also .lol
17:47:40  <frosch123> maybe ask V to buy
17:48:05  <Eddi|zuHause> newgrf.nsfw?
17:48:36  <frosch123>
17:49:06  <frosch123> oh, also .horse
17:49:14  <Eddi|zuHause> hey, i made a commit like a week ago
17:49:37  <Eddi|zuHause> or maybe 3 :p
17:50:28  *** virtualrandomnumber has joined #openttd
17:50:44  *** virtualrandomnumber has quit IRC
17:50:56  <andythenorth>
17:51:15  * andythenorth is curious about whether to do one horse grf, or one per roster
17:51:20  <andythenorth> confusing
17:51:21  <frosch123> andythenorth: we worked hard to prevent <iframe> on bananas
17:51:47  <andythenorth> but will serve anything :)
17:51:55  <andythenorth> and we have allowed anyone in to publish to it
17:52:02  * andythenorth has no idea about wisdom of that
17:52:18  <supermop_Home> nice font
17:52:18  <frosch123> andythenorth: you will run out of grfids if you use a new one whenver you delete/add a roster
17:55:51  <supermop_Home> Timberwolf why clamp to a flat top at all?
17:55:52  <andythenorth> so far I have only added 3 and deleted none
17:56:51  <supermop_Home> it doesn't help ensure enough usable valley space the way a shorter hill / clamped floor would
17:58:25  <supermop_Home> gameplay wise, this map would be just the same if the mountain continued 8 level higher as implied by the slope before level 24
17:59:00  <supermop_Home> these flat tops just encourage the scourge of Car Factories on top of mountains
18:01:39  <andythenorth> wasn't it just Another Bug in MHL?
18:01:42  <andythenorth> or TGP?
18:01:48  <supermop_Home> maybe
18:01:49  * andythenorth is sure it was all explained before
18:02:00  <LordAro> MHL added alpinist
18:02:09  <LordAro> but i'm pretty sure it was an issue before
18:02:19  <supermop_Home> I've yet to see an Alp with a flat top
18:03:34  <supermop_Home> there are other things in alpinist that bug me too, but i don't see them being fizxable
18:04:08  <supermop_Home> things like steep pyramidal craters and dead-end valleys
18:08:36  <supermop_Home>
18:08:48  <supermop_Home> like how doe these work geologinally
18:08:55  <supermop_Home> geollogically
18:10:06  <FLHerne> andythenorth: One per roster
18:10:48  <FLHerne> Smaller file downloads
18:10:51  <FLHerne> More discoverable
18:12:03  <andythenorth> is it confusing though?
18:12:13  <supermop_Home> i'd rather just the one grf, but invariably people will beg to play with all rosters on, and multiple grfs lets them do that
18:12:29  <andythenorth> I'm mostly concerned about compile time :P
18:12:47  <supermop_Home> all in one grf lets you BAD FEATURE some command and Conquer style into it with a GS
18:13:30  <supermop_Home> like CC Light blue gets british roster, Red gets continental,
18:13:38  <supermop_Home> etc
18:15:16  <supermop_Home> capture the other players HQ with an engineer to be able to build their trains
18:16:26  *** Compu has joined #openttd
18:17:06  <andythenorth> it's notable that NARS and UKRS are split and that's finr
18:17:07  <andythenorth> fine *
18:17:14  *** Compu has joined #openttd
18:17:21  <supermop_Home> indeed
18:17:23  *** Compu has quit IRC
18:17:51  <supermop_Home> they are different enough in style I've never tried to play with both of them together though
18:31:24  <DorpsGek_III> [OpenTTD/OpenTTD] ConnCraft commented on issue #7838: Crash in VehicleGroupWindow::GroupNameSorter
18:43:19  <b_jonas> and of course my network still had and has a lot of bug that I won't find out till later
18:43:46  <b_jonas> in this case I had to add waypoint to force trains to specific platforms designated for dropping oil and goods
18:45:54  <b_jonas> I tried two separate stations first, but that failed because the oil drop point didn't accept oil (and also would supply oil from a nearby unused oil rig)
18:59:05  <Gustavo6046> Squirrel works fine, but I think it's a bit outdated. Perhaps it would not be a vain investment to switch to (or at least supplement support for) embedded JavaScript. Using something like QuickJS or Duktape should be a good start, a step in the right direction; the difficult part, as it usually (read: almost always) turns out to be for an embedded language, would most likely be
18:59:07  <Gustavo6046> integrating with the existing codebase.
18:59:14  <Gustavo6046> I want your input, though.
19:00:03  <LordAro> how is it outdated?
19:07:18  <FLHerne> Gustavo6046: Remember that OpenTTD code has to be deterministic
19:07:31  <Gustavo6046> FLHerne: yes, it does
19:07:37  <FLHerne> Given that JS's only numeric type is floating-point, that's not going to work well
19:08:06  <Gustavo6046> Can't we configure the interpreter we choose to use to allow integers?
19:08:13  <Gustavo6046> FLHerne: Duktape supports BigInt, I think
19:08:27  <LordAro> *if* (and it's a big if) we went with another scripting language, it'd more likely be lua
19:08:35  <LordAro> which is actually designed for embedding
19:08:37  <Gustavo6046> Which is what you want if you accurately want large integers
19:08:40  <LordAro> and y'know, actually designed
19:08:42  <Gustavo6046> Ew, Lua
19:09:12  <Gustavo6046> It is not a general-purpose language
19:09:41  <LordAro> yes?
19:09:49  <milek7> there was some discussion about wasm
19:10:03  <FLHerne> In that case, you're no longer using JavaScript, but some poorly-specified subset of JS
19:10:17  <Gustavo6046> milek7: WASM? Why WASM?! That is only for targeting VMs that support it, and only for performance-sensitive scenarios. This is OpenTTD.
19:10:21  <FLHerne> I don't see what that buys you
19:10:39  <Gustavo6046> FLHerne: WASM is actually not JS.
19:10:42  <Gustavo6046> It's bytecode.
19:10:52  <Gustavo6046> asm.js is the subset. And iirc it's already deprecated lol.
19:10:53  <FLHerne> I mean the no-floating-point thing
19:11:00  <milek7> uh, openttd is not performance sensitive?
19:11:17  <FLHerne> no-floating-point WASM would be a poorly-specified subset of WASM instead
19:11:19  <milek7> and you're adding VM anyway, be it js or wasm
19:11:26  <Gustavo6046> Subset?! You mean superset, right? BigInt is standard since ES2015 (and everyone who is not using Windows 98 anymore is using ES2015)
19:11:34  <FLHerne> Gustavo6046: No, I mean subset
19:11:38  <Gustavo6046> mikegrb: joke's on you, Squirrel too is a VM!
19:11:55  <Gustavo6046> I mean, sure, it's another VM, but it is a very small price to pay to support existing Squirrel stuff.
19:12:02  <Gustavo6046> I'm fine with it.
19:12:08  <Gustavo6046> FLHerne: floats are not non-deterministic.
19:12:24  <FLHerne> Gustavo6046: The vast majority of extant JS code, including the standard library, uses and assumes floating-point values
19:12:30  <Gustavo6046> Maybe across platforms. But then again, only for ridiculously high precisions, and/or for ridiculously high ranges.
19:12:36  <FLHerne> They are when using the native instructions
19:12:47  <Gustavo6046> Are processors that dumb?
19:12:54  <FLHerne> And soft-floats are *sloooow*, which negates the entire point
19:13:04  <FLHerne> Weirdly, it's because they're not dumb
19:13:07  <Gustavo6046> I mean, if you have a float32  (16), and a float32 (40), and add them, you will ALWAYS get 56.
19:13:10  <FLHerne> Or not enough
19:13:30  <FLHerne> The x86 FPU uses 80 bits to store intermediate results
19:13:39  <FLHerne> Which increases the precision
19:13:52  <LordAro> this discussion sounds a lot like "Gustavo6046 wants to write JS" to me
19:14:00  <FLHerne> But means you get different results depending on which regs the compiler happens to spill
19:14:16  <FLHerne> Or from other non-x86 platforms
19:14:19  <milek7> ieee754 basic operations are defined (most except sin/etc.), but making sure that every compiler generates compatible code (correct rounding modes, intermediaries, not reordering operations) isn't easy
19:14:24  <Gustavo6046> Or you can use coerciom, to ensure that tiny 0.00000001 errors are vanquished (the existence of these tiny errors should be neglected, as iirc they are automatically corrected by modern libc's or whatever component I forgot about, way before they are even considered in the deterministicity-sensitive scenario of OpenTTD's VM).
19:14:34  <FLHerne> Gustavo6046: No, that doesn't work
19:14:45  <FLHerne> Lots of people have tried to invent robust ways to do that
19:15:11  <FLHerne> But it's basically impossible without essentially falling back to soft-floats as integer ops
19:15:21  <Gustavo6046> Unless you use numbers smaller than 0.00025 or larger than 2 to the power of some number larger than 15, yes they do.
19:15:30  <Gustavo6046> And at this point they are pretty much just slow ints.
19:15:50  <Gustavo6046> I think in JS integer support is explicit. You need to use BigInt, which is an arbitrary precision number thing, much like Python's.
19:16:02  <FLHerne> Yes
19:16:15  <milek7> even ULP difference is not acceptable, it can accumulate to desync some long time after that
19:16:16  <Gustavo6046> I think it is faster than floating points for integer arithmetic, granted the result isn't too big (which would make some mallocs inevitable).
19:16:33  <Gustavo6046> I don't nkow i
19:16:46  <Gustavo6046> I don't know if you can explicitly set hard limits, like cap it at 32 bits or 64 bits.
19:17:05  <Gustavo6046> I think you can preallocate a few bytes, though. I'll check.
19:17:11  <milek7> (and we probably wandered into newgrf territory, because strictly GS doesn't have to be deteministic)
19:17:33  <FLHerne> milek7: AIs do at least, IIRC
19:17:37  <LordAro> milek7: they do if you ever want to go near multiplayer
19:17:50  <FLHerne> (I have questioned *why* they have to be before)
19:18:12  <FLHerne> In principle, they should be able to run only on the server
19:18:25  <LordAro> in principle perhaps
19:18:32  <LordAro> but that's not how the game is architected
19:18:38  <LordAro> you're welcome to redo everything
19:18:43  <FLHerne> But then you have to be really careful that the AI/GS code doesn't change the game state at all directly
19:18:54  <FLHerne> Or affect the RNG
19:19:03  <Gustavo6046> FLHerne: I think this code is designed badly, Q.E.D..
19:19:05  <FLHerne> And as LordAro says ^
19:19:26  <Gustavo6046> AI code does not change the game state directly.
19:19:34  <milek7> anyway, I don't get why you are so bent on using js
19:19:39  <FLHerne> Gustavo6046: I think you have a very poor understanding of the issues
19:20:32  <Gustavo6046> FLHerne: network code is not an easy task, but the results depend a lot on whether the networking is *designed* properly.
19:20:47  <FLHerne> Yes
19:20:57  <Gustavo6046> You could take the Unreal approach, and have the clientside predict predictible things, but in a way that does not change the game state, while the server computes everything unpredictable.
19:21:12  <Gustavo6046> This is called replication, and not only does it REALLY save on bandwidth, it would help us with this deterministicity problem.
19:21:22  <FLHerne> But it's designed the way it is for sensible reasons
19:21:28  <Gustavo6046> (Is there a better noun for deterministic things? Determinism? Like, "related to determinism", but not "determinism".)
19:21:40  <LordAro> "completely rearchitect the game engine so that Gustavo6046 can use JS to write AI/GS" is a bit much
19:21:41  <FLHerne> ok, now I'm not even sure you understand how it works *now*
19:21:50  <Gustavo6046> LordAro: I know.
19:21:50  <FLHerne> "This is called replication, and not only does it REALLY save on bandwidth"
19:22:05  <Gustavo6046> FLHerne: it did back in the day, when there was still dial-up
19:22:06  <Gustavo6046> But that is beside the point
19:22:15  <FLHerne> It would be pretty much impossible to save bandwidth compared to the way OTTD multiplayer works now
19:22:17  <Gustavo6046> (hence "not only")
19:22:25  <FLHerne> The entire game state is replicated, continuously
19:22:37  <Gustavo6046> "Replication" is a misleading name
19:22:41  <FLHerne> The *only* thing sent over the network are user actions
19:22:46  <FLHerne> Which are tiny
19:22:51  <Gustavo6046> The way I used it, I referred to a very specific thing
19:22:52  <milek7> LordAro: hmm, so GS doesn't just send commands as every other client?
19:23:06  <LordAro> milek7: it's just a special AI
19:23:09  <LordAro> afaik
19:23:10  *** Kapytan has joined #openttd
19:23:26  <Gustavo6046> The entire point of replication is that you do not need to worry about deterministic algorithms while still having the server issue less data through the network.
19:24:15  <Gustavo6046> And also, that the clientside *VIEW* of the game state at T should not be affected by packet loss at T-N (Unreal's replication mechanism uses UDP).
19:24:45  <FLHerne> Gustavo6046: Do you have a source for your very narrow definition of "replication"?
19:24:52  <Gustavo6046> I think I am failing to explain. I apologize.
19:24:53  <Gustavo6046> FLHerne: yes!
19:25:13  <FLHerne> According to what I remember, OTTD is a textbook example of lockstep-style active replication
19:25:21  <Gustavo6046> I am unaware of more technical documents, but these do probably exist too. I'll pray the wiki at BeyondUnreal is up.
19:25:25  <Gustavo6046>
19:25:29  <Gustavo6046> Ah, it is up.
19:25:31  <Gustavo6046> Whew
19:26:07  <Gustavo6046> This implementation of replication is not lockstep. It was meant to eliminate it, as predeceding games suffered from it (remember Quake?)
19:26:41  <FLHerne> Gustavo6046: Your wiki is wrong :p
19:26:53  <FLHerne> Seriously, "Replication" is a well-defined term in CS for decades
19:27:33  <LordAro> FLHerne: tbf, so is CS's inability to name anything properly
19:27:46  <FLHerne> Well, maybe Unreal Engine specifically uses it as a term of art for something special, I don't know
19:29:45  <Gustavo6046> FLHerne: this definition also exists for decades.
19:29:55  <glx> anyway openttd server really issue almost no data
19:30:11  <Gustavo6046> I think it is a bit more domain-specific, as Unreal is a time-sensitive scenario, so it probably does concern with this.
19:30:44  <Gustavo6046> glx: only player commands, which I think is part of the (non-)issue that makes the determinicity of code so much more important.
19:30:44  <glx> it just dispatch commands received from clients, with some checks
19:30:56  <Gustavo6046> And maybe makes it very difficult to have serverside-only code run.
19:31:04  <Gustavo6046> (Or, by extension, clientside-only code, like effects.)
19:31:09  <Gustavo6046> It mure uses very
19:31:20  <glx> server side only code works well if done correctly
19:32:13  <glx> GS and AI are server side
19:32:50  <FLHerne> glx: Is that true currently? I didn't think so
19:33:33  <glx> it's guarded by !networking || server IIRC
19:34:52  <TrueBrain> hihi, fun fact, games from 1991 use "threads" by switching the stack pointer on regular intervals .. interesting :D (sorry, lovely random fun fact, just had to :D)
19:35:40  <Kapytan> Hi, I'm looking for a chat in CZ / CS. I can't know ENG. I use Goo..translat. The link "" does not work.
19:36:26  <milek7> TrueBrain: green threads?
19:36:47  <TrueBrain> pretty sure their colour is not relevant (owh, the jokes)
19:37:18  <TrueBrain> but no .. they basically implemented their own context switch in an interrupt
19:37:25  <TrueBrain> which on its own is pretty impressive tbh
19:38:40  <Gustavo6046> It sure uses very little bandwidth, but at the expense of CPU time, PLUS it makes it impractical to compatibly run code in one place only, PLUS it makes it VERY difficult to manage dependencies (as all peers must have the same dependencies at all times!), unless the server somehow either uploads them, or redirects the client to download from an external source (like OpenTTD's addon
19:38:42  <Gustavo6046> repository, whose name I fail to recall), even if just temporarily, for the sake to join the server.
19:39:17  <Gustavo6046> You are placing many limitations in place, and I see little to no advantages to continue this way, at least none that hold up to this day.
19:39:50  <Gustavo6046> May you please state what is the sensible reason behind this radical design decision? I would LOVE to be corrected.
19:40:12  <Gustavo6046> s/sake to join/sake of joining/
19:41:34  <milek7> i don't think it is radical, it's just obvious thing to do
19:41:36  <milek7> when you have clearly discernible actions that acts based on global state
19:41:44  <FLHerne> Kapytan: The last archived version is here
19:42:02  <TrueBrain> FLHerne: you looked that up? You are awesome :D 2017 .. nice :)
19:42:06  <Gustavo6046> milek7: why obvious?
19:42:08  <Gustavo6046> Also, why global state?
19:42:30  <glx> just remember when network code was implemented
19:42:31  <FLHerne> Kapytan: What page links to ""? I don't believe it's ever been official in any way
19:43:04  <FLHerne> Gustavo6046: A very large amount of the game state is directly visible to the user at any time
19:43:46  <glx> every thing displayed on the screen depends on game state
19:43:50  <Gustavo6046> I think that it is inconceivable to rely on a global state when you operate with multiple machines, in the non-deterministic (or non-guaranteed) transport that is the network (TCP/IP stack and all that stuff), with ANY non-zero (and usually non-negligible) amount of latency.
19:43:51  <FLHerne> (e.g. if you zoom out, you can see the location, sprite, animation frame etc. of everything on a large part of the map)
19:44:16  <FLHerne> In an FPS game like most Unreal games, you can synchronize only what the player happens to be looking aat
19:44:24  <glx> latency is not an issue
19:44:25  <FLHerne> Which is a relatively small amount of state
19:45:06  <glx> and server is giving the heartbeat anyway
19:45:14  <b_jonas> oh yeah, another question. when I click on a secondary industry, it prints how much it produced last month. but one month is very short, since I have long trains. is there some way to see how much of each cargo that industry received and produced in the last few years, and how much of the products got delivered successfully so far?
19:45:26  <FLHerne> Gustavo6046: I don't understand how you can find it inconceivable, given that it demonstrably works
19:45:46  <FLHerne> (even over my very bad multi-hop wifi connection, which is very much not low-latency)
19:45:49  <TrueBrain> I love when people use words like "inconceivable", while it has been reality for 15+ years :D
19:45:53  <Gustavo6046> And for this reason I think it is a fallacy, if not a vice, to write network code with the notion of a perfectly synchronized and deterministic global state, if the very physical and low-level assumptions network code depends on is, and will always be, non-deterministic.
19:45:58  <TrueBrain> finds his reality-check-machine
19:46:14  <FLHerne> Gustavo6046: Your imagined reality doesn't correspond to the actual one
19:46:28  <Kapytan> <FLHerne>Link from: ""
19:46:40  <FLHerne> TCP maintains packet ordering
19:46:49  <TrueBrain> you guys do understand you are on a rollercoaster right? Going from "replace squirrel" to debating if the TCP protocol is deterministic :D
19:46:50  <Gustavo6046> The most portable true random number generator is that of packet loss. You don't need to visualize "atmospheric phenomena" of any sorts, nor do you need to send HTTP requests (or requests of any sort) to someone who does.
19:46:52  <frosch123> LordAro: lua is shit. rather go for python
19:47:09  <milek7> python embedding is pita
19:47:14  <TrueBrain> frosch123: embedding Python? Are you mental?
19:47:16  <Gustavo6046> In fact, you don't even need to request information from any other server. Just loop packets around in a physical loopback, and count the packet loss.
19:47:27  <Gustavo6046> frosch123: Python is not a very sane choice for embedding.
19:47:40  <frosch123> TrueBrain: yeah, your f-strings ruined it
19:47:42  <FLHerne> Gustavo6046: If only someone had invented TCP
19:47:48  <TrueBrain> frosch123: I do not appoligize for that!
19:47:56  <TrueBrain> :D
19:48:10  <FLHerne> The main purpose of which is to hide packet loss from application authors
19:48:12  <Gustavo6046> FLHerne: still non-deterministic. Sure, it avoids packet loss, but I still count retransmission as part of what makes network data non-deterministic.
19:48:13  <glx> but most of things happening in openttd don't rely on network, just the really small commands
19:48:39  <FLHerne> Gustavo6046: Actions know which game tick they apply to, so timing determinism is irrelevant
19:48:54  <TrueBrain> can we switch to entropy pleas?
19:48:59  <TrueBrain> that would make this conversation better
19:49:01  <Gustavo6046> The impossibility of having a packet reach from point A to point B with the exact same delay reliably is enough to guarantee non-determinism.
19:49:14  <Gustavo6046> FLHerne: good point.
19:49:46  <frosch123> anyway, i am out of popcorn
19:49:52  <TrueBrain> frosch123: aaaawwwwhhhh
19:49:59  * TrueBrain gives frosch123 some more wood to put on the fire
19:50:04  <Gustavo6046> But what I mean is, you work very hard to make deterministic code work on a deterministic state, on a non-deterministic transport. You really put your effort into make it ROBUST, and it pays. I very much admire it, and I am in absolute awe.
19:50:42  <TrueBrain> TCP is a deterministic transport mechanism .. please don't try to convince people otherwise ;)
19:50:56  <glx> yeah it's not UDP
19:50:58  <_dp_> "work very hard" rofl, it's like the dumbest network code you can make :p
19:51:21  <Gustavo6046> TrueBrain: it only guarantees that all packets arrive, and that they can be reordered by the TCP stack code at the recipient end.
19:51:27  <TrueBrain> _dp_: wtf? you looking for a kick or something? *giggles*
19:51:33  <Gustavo6046> I do not think that means determinism.
19:51:38  <frosch123> _dp_: just because it is a standard design, it's not dumb. factorio does the same
19:51:49  <Gustavo6046> _dp_: dumb and difficult.
19:52:00  <milek7> and simplest, doesn't require different code for client/server behaviour, and is cheat-proof
19:52:02  <Gustavo6046> It is sometimes easier to make dumb things. I think here it might be the opposite.
19:52:04  <frosch123> actually, it's funny. factorio tried a lot of magic in the beginning and then converged towards normal
19:52:11  <Gustavo6046> milek7: does not require, but also does not allow.
19:52:16  <FLHerne> Gustavo6046: The only non-determism is timing, which as I said before is irrelevant
19:52:18  <glx> difficult ? client sends a command, server analyse and dispatch
19:52:20  <TrueBrain> DorpsGek: whoami
19:52:20  <DorpsGek> TrueBrain: TrueBrain
19:52:23  <Gustavo6046> It is sometimes good to have different clientside and serverside code.
19:52:25  <glx> how is that difficult ?
19:52:28  <TrueBrain> good to know that DorpsGek knows me :)
19:52:38  <andythenorth> so I'll call my GS 'GS'
19:52:49  <Gustavo6046> And if you really insist in this uniformity of code, just go peer-to-peer! That is good too. I've been investigating ditching client-server architectures for games.
19:52:49  <andythenorth> seems vanilla choice
19:52:50  <FLHerne> Gustavo6046: The only situation in which the data received is non-deterministic is if your network connection has dropped altogether
19:52:54  <TrueBrain> Gustavo6046: please look up the definition of deterministic :) Timing has nothing to do with it :) It has to do with state, and transitions :) You are mixing up stuff here ;)
19:52:57  <andythenorth> unless I"m calling it JS
19:53:00  <frosch123> andythenorth: what? still at that topic? i thought that was settled hours ago
19:53:06  <FLHerne> At which point no-one cares
19:53:08  <andythenorth> well now it might be JS
19:53:09  <Gustavo6046> TrueBrain: I'm not talking about the determinism of the game state.
19:53:43  <frosch123> andythenorth: anyway, JS does not have 4 letters
19:53:43  <andythenorth> supermop_Home do I actually want it?
19:53:44  <TrueBrain> TCP, the protocol, not the TCP/IP stack (I know, confusing names) guarantees deterministic behaviour on layer 7, barr some exceptins like connectionloss :)
19:53:58  <TrueBrain> frosch123: JSJS?
19:54:00  <TrueBrain> JSSS?
19:54:02  <TrueBrain> NOJS?
19:54:05  <TrueBrain> NoJS?
19:54:09  <Gustavo6046> I am trying to argue that it might not be necessary to have the game state be deterministic, and it could actually be easier to work with that assumption in mind, and to synchronize just enough that it would be almost invisible to your player client, and neglectable for external bot clients.
19:54:31  <Gustavo6046> Besides, it would open up many possibilities.
19:54:40  <frosch123> JSSS looks like you tried to type IEEE and shifted the keyboard under your fingers
19:54:43  <FLHerne> Gustavo6046: Sure, but you're trying to argue this in the face of several people familiar with the problem telling you it's a bad idea
19:54:46  <TrueBrain> Gustavo6046: but, mostly because I am growing a bit tired of debating fundamentals, you might realise by now you got a bit lost in your own conversation, and skipped why replacing Squirrel is a good thing :)
19:54:53  <andythenorth> TB was going to reimplement all of GS and NewGRF once
19:54:58  <andythenorth> I have the chat log somewhere
19:54:59  <Gustavo6046> Oh.
19:55:06  <TrueBrain> andythenorth: still think that is the best idea in the world, but meh :)
19:55:09  <Gustavo6046> I think Squirrel is not a very actively supported language, unlike JavaScript.
19:55:21  <TrueBrain> but is it broken?
19:55:26  <TrueBrain> does it need replacement?
19:55:26  <glx> doesn't mean JS is a good idea
19:55:33  <andythenorth> Gustavo6046 there are bigger problems with GS than the language choice :)
19:55:34  <Gustavo6046> Lua is also dying out slowly, and it is becoming a mess to maintain - 5.3 is not backwards-compatible, and LuaJIT can only dream of supporting it now that its lead dev has quit.
19:56:00  <Gustavo6046> The ecosystem in Lua is broken, and so is the development cycle.
19:56:09  <andythenorth> fortunately we don't have Lua :)
19:56:14  <Gustavo6046> I am not fond of the syntax, either. And I am also not fond of the absolute lack of typing in variables.
19:56:24  <TrueBrain> <- ps, 4 days ago. So much for being "not a very actively supported language" ;)
19:56:25  <andythenorth> this is such a classic open source conversation :)
19:56:26  <Gustavo6046> andythenorth: good point. Squirrel is heaps better. Unfortunately, it's also inactive.
19:56:41  <Gustavo6046> TrueBrain: really? Let me check.
19:56:45  <TrueBrain> so now we get to the real argument: you don't like Squirrel
19:56:49  <Gustavo6046> I can not believe in my eyes now.
19:56:52  <TrueBrain> now it becomes a completely different conversation :)
19:56:57  <Gustavo6046> I like it. I like it better than Lua.
19:57:08  <milek7> TrueBrain: playing devil advocate, squirrel 2 probably is dead :P
19:57:10  <Gustavo6046> But I think it would still be easier to allow using JavaScript.
19:57:11  <glx> anyway we still use a very old squirrel version
19:57:12  <Gustavo6046> It's simpler.
19:57:15  <TrueBrain> milek7: SSSSTTTTT
19:57:18  <TrueBrain> why spoil this :(
19:57:19  <TrueBrain> ffs
19:57:28  <FLHerne> Gustavo6046: Javascript is very clearly not simpler than Squirrel
19:57:35  <TrueBrain> 1 thing I think everyone can agree on: JavaScript is not simpler than Squirrel :)
19:57:43  <TrueBrain> that is not even worth a debate tbfh :P
19:57:55  <andythenorth> eh wat?
19:57:55  <TrueBrain> a sportscar really is more complex than my freaking bike :)
19:57:56  <FLHerne> The ECMA spec is enormous, while Squirrel is a tiny language
19:58:07  <andythenorth> but even I can write JS :P
19:58:16  <TrueBrain> andythenorth: which is why we are not using it :P
19:58:21  <TrueBrain> :D :D
19:58:22  <andythenorth> I still have the scars
19:58:22  * TrueBrain hugs andythenorth 
19:58:23  <glx> now I'm scared by andythenorth :)
19:58:27  <frosch123> can't we just interpret LLVM and let people use whatever compiled language they want?
19:58:38  <TrueBrain> frosch123: introduce GPMI again? :D
19:58:38  <andythenorth> I started writing JS in 2000
19:58:42  <andythenorth> when NOTHING FUCKING WORKED
19:58:45  <Gustavo6046> FLHerne: yet I feel like writing it is.
19:58:49  <Gustavo6046> At least ES5.
19:58:55  <andythenorth> can we embed Flash?
19:58:55  <TrueBrain> bias :)
19:59:01  <Gustavo6046> TrueBrain: good point.
19:59:07  <milek7> bring back PNaCl
19:59:08  <Gustavo6046> andythenorth: haha
19:59:09  <TrueBrain> andythenorth: till .. 2021? What was the date they picked
19:59:11  <Gustavo6046> andythenorth: so Haxe?
19:59:19  <FLHerne> Meh
19:59:24  <andythenorth> I wrote a lot of Flash
19:59:26  <FLHerne> We should go back to TTDPatch
19:59:34  <andythenorth> only if it gets mac support
19:59:36  <Gustavo6046> Let's just include the entirety of Internet Explorer 7
19:59:40  <frosch123> TrueBrain: hmm, that was before i was active. what was it?
19:59:45  <FLHerne> Demand that all extensions be written in x86 assembly
19:59:50  <andythenorth> weren't we going to include a browser?
19:59:52  <_dp_> ffs, that's what wasm is all about, native sandbox
19:59:52  <andythenorth> for docs?
20:00:01  <TrueBrain> frosch123: I think so ... you remember Tron?
20:00:12  <supermop_Home> andythenorth what about a pacer?
20:00:12  <TrueBrain> andythenorth: "On December 31, 2020, Adobe Systems will officially stop updating and distributing Adobe Flash. "
20:00:14  <TrueBrain> hurry up :P
20:00:15  <frosch123> TrueBrain: no, only people talking about tron
20:00:23  <andythenorth> supermop_Home not convinced :P
20:00:29  <TrueBrain> frosch123: so yeah, it was before your time :P Those whole 3 years in between .. :P
20:00:40  <Gustavo6046> Rust seems like a decent choice, too. It does not compile to Flash, but it does compile to WebAssembly, as well as other targets LLVM supports.
20:00:44  <supermop_Home> i want a railfreight sector pacer
20:00:52  <Gustavo6046> WASM is like portable assembly.
20:01:09  <TrueBrain> frosch123: basically GPMI allowed any language to work with an API, so you could write an AI in what-ever language you wanted
20:01:11  <frosch123> TrueBrain: yeah, but still, i read that term somewhere somewhen in the past
20:01:17  <TrueBrain> Tron raged and removed GPMI from the OpenTTD code-base :)
20:01:17  <Gustavo6046> FLHerne: we should implement VGA in WASM.
20:01:24  <Gustavo6046> Have it support mode 0x13.
20:01:35  <Gustavo6046> And also setting the palette indexes.
20:01:38  <TrueBrain> still not over it :P
20:01:47  <Gustavo6046> :P
20:01:58  <glx> I still have gpmi stuff somewhere here
20:02:06  <FLHerne> Gustavo6046: You can compile OTTD to wasm fairly easily, it's been done :-)
20:02:21  <Gustavo6046> Ah yey
20:02:25  <TrueBrain> looking back, GPMI was not the best idea in the world, especially as it embedded shit like Python and TCL
20:02:26  <TrueBrain> but still :)
20:02:28  <Gustavo6046> FLHerne: was it in 256 colors?
20:02:51  <TrueBrain> (I and "igor" wrote GPMI btw, for context :P)
20:02:59  <frosch123> TrueBrain: that "and" is weird. why would you use tcl, if you already have python?
20:03:02  <Gustavo6046> And restricted to a 64K framebuffer?
20:03:05  <TrueBrain> even wrote "edll", which makes DLLs work with lazy binding, to avoid it needed to be loaded on startup :D
20:03:10  <FLHerne> I suppose if you compile OTTD to asm.js, the AI/GS code is *technically* written in JavaScript already...? :D
20:03:21  <TrueBrain> frosch123: it allowed any language we could get our hands on, basically :D
20:03:23  <TrueBrain> it was a bit of a shit-show :P
20:03:34  <andythenorth> supermop_Home ?
20:03:49  <TrueBrain> but, it worked :D And solved this issue kinda
20:04:12  <TrueBrain> and also were I learned that embedding Python is a big no-no :P
20:04:36  <supermop_Home> andy i need it in N, and regional railways or WYPTE
20:04:37  <andythenorth> so more than 1 GS per game then?
20:04:47  <TrueBrain> andythenorth: why .... WHHYYYY???!!!!
20:05:23  <Gustavo6046> FLHerne: what I mean is, we could support native extensions, without having to build for lots of platforms, or including Little C Compiler or whatever
20:05:35  <Gustavo6046> Just use LLVM and embedded wasm!
20:05:39  <andythenorth> TrueBrain because 'do it in GS' has become the de-facto solution for many things
20:05:48  <TrueBrain> andythenorth: so why haven't you?
20:06:05  <andythenorth> I don't fancy trying to maintain the equivalent of a GS patchpack
20:06:14  <andythenorth> merging all the other people's GS together
20:06:18  *** Kapytan has left #openttd
20:06:21  <TrueBrain> somehow, I am a bit disappointed :D
20:06:27  <andythenorth> I considered it :P
20:06:29  <TrueBrain> make a bootloader!
20:06:30  <Gustavo6046> I suggest
20:06:39  <Gustavo6046> TrueBrain: TTD-OS
20:06:40  <TrueBrain> ask for implementing a "fetch-http" API
20:06:44  <Gustavo6046> Let's make a OpenTTD file system
20:06:52  <TrueBrain> so you can download other GSes in a GS
20:06:55  <Gustavo6046> and have the trains be folders
20:06:57  <Gustavo6046> and the cargo be files
20:06:59  <Gustavo6046> :P
20:07:00  <TrueBrain> so dynamically load it
20:07:18  <TrueBrain> andythenorth: this really is the next big thing! That would be awesome :D
20:07:26  <TrueBrain> also allowing to binary patch OpenTTD
20:07:33  <TrueBrain> so you can alter behaviour you otherwise cannot
20:07:41  <TrueBrain> which means needing OS detection, because, well, binary
20:07:42  <andythenorth> yes, that will go very excellently
20:07:50  <andythenorth> I can forsee zero problems
20:07:51  <TrueBrain> I do not see any (security-related) issue with this idea at all !
20:07:52  <andythenorth> of any kind
20:07:59  <andythenorth> we should do it next weekend
20:08:05  <TrueBrain> make it a jam!
20:08:20  <TrueBrain> I can lock everyone out of the GitHub repository, so we can merge it in some peace and quiet?
20:08:26  <andythenorth> ok
20:08:28  <andythenorth> I am considering uber frankenstein GS
20:08:33  <_dp_> btw, wasm (non)determinism seems to be quite well-defined
20:08:36  <TrueBrain> shit, this was not a PM? OWH DARN
20:09:02  <glx> oups :)
20:09:07  <TrueBrain> :D :D
20:09:13  <TrueBrain> it would really be such a bad idea :P
20:09:25  <Gustavo6046> hah
20:09:41  <frosch123> TrueBrain: aw, you would lock-out dorpsgek? how dare you?
20:09:57  <andythenorth> whenever I am sad about newgrf or GS spec I just....DRAW MORE TRAINS
20:09:57  <TrueBrain> :D I wouldn't even dream of it
20:10:16  <andythenorth> BAD DAY AT WORK....DRAW MORE TRAINS
20:10:21  <glx> andythenorth: and find bugs in my python code ;)
20:10:29  <andythenorth> oh that too
20:10:32  <TrueBrain> DorpsGek is my everything! My existence is tied to it!
20:11:15  <DorpsGek> oh thanks
20:11:31  <TrueBrain> :D Now for me the betting game ... I think it was glx :)
20:11:48  <glx> easy guess
20:12:10  <frosch123> TrueBrain: be careful though, you already spent 3 horkrux on the dorpsgeks
20:12:46  <TrueBrain> wtf is horkrux?
20:13:11  <glx> potterhead thing
20:13:25  <TrueBrain> ah, that explains
20:13:45  <TrueBrain> but, DorpsGek_III is not like DorpsGek
20:13:51  <TrueBrain> DorpsGek is more important
20:14:00  <TrueBrain> DorpsGek_III is replaceable
20:14:48  <TrueBrain> I like how this conversation died out; did I do good?
20:14:48  <milek7> if we adopt wasm.. and then compile ottd to web version using emscripten.. then there would be wasm running in wasm? ;P
20:15:04  <TrueBrain> milek7: INCEPTION! *boom*
20:16:17  <Gustavo6046> milek7: ...probably?
20:17:32  <andythenorth> hmm
20:17:38  <andythenorth> I should really finish a newgrf
20:17:52  <andythenorth> whenever I have a day off....I play tanks in Blitz
20:17:58  <andythenorth> oops
20:21:50  <_dp_> milek7, imagine someone then plays it in a browser running in wasm :p
20:23:24  <Gustavo6046> I like llvm yey
20:23:44  <frosch123> someone (probably andy) linked a talk some years ago. it was about processors abandoning buggy hardware isolation / protected mode, and instead running all processes is js vms
20:24:15  <milek7> probably from destroyallsoftware
20:24:25  <andythenorth> that wasn't me
20:24:35  <andythenorth> I watched it though
20:24:39  <andythenorth> wasn't it godbolt?
20:24:51  <milek7> this?
20:25:00  <TrueBrain> frosch123: lol
20:25:08  <frosch123> milek7: yes \o/
20:25:14  <frosch123> TrueBrain: it's a nice talk
20:25:40  <andythenorth> I think I watched this too
20:26:03  <andythenorth> ^ I think that one is much less lolz
20:31:31  <andythenorth> hmm nml in WASM?
20:31:37  * andythenorth wonders if we could make nml faster
20:34:51  <_dp_> andythenorth, that was actually the plan ;)
20:36:00  <_dp_> well, not nml I guess
20:36:38  <_dp_> but if wasm replaces newgrfs for extensions it makes perfect sense to implement newgrf parser in wasm for compatibility
20:36:57  <_dp_> and remove it from the game itself to simplify maintenance
20:37:20  <milek7> might be hard sell, as interpreter-in-interpreter would be slower than old newgrf
20:37:33  <frosch123> milek7: oh, we are now in that year, where that talk predicted 5 years of war
20:37:55  <_dp_> milek7, who knows mb slower, mb not, mb slower but acceptable...
20:39:02  <andythenorth> if _dp_ removes old newgrf, then that's probably cause of war
20:39:14  <andythenorth> transpiler :P
20:39:22  <andythenorth> that, and Apple going ARM
20:39:26  <_dp_> andythenorth, I never said anything about removing newgrfs completely
20:39:33  <andythenorth> shame
20:39:50  <milek7> transpiler seems possible
20:41:54  <_dp_> yeah, mb
20:42:25  <_dp_> but that's details, for now question is how feasible it is to make extension system based on wasm
20:43:03  <nielsm> the big issue with wasm-based mods is the reproducability across clients
20:43:05  <andythenorth> from scratch?
20:43:09  <andythenorth> or using existing spec?
20:43:41  <nielsm> from scratch would make sense, it would mean the base vehicle and industry sets could also be defined as "mods"
20:43:50  <_dp_> nielsm, I linked non-determinism doc for wasm somewhere above, seems very possible to avoid any non-determinism
20:43:50  <nielsm> instead of the newgrf baggage
20:44:26  <andythenorth> nielsm the purist burn-it-with-fire part of me agrees
20:44:38  <andythenorth> practically, I think we lack the ability to ever define a whole new spec
20:44:46  <andythenorth> it would be too big a task
20:44:58  <andythenorth> but I do like burn-it-with-fire :P
20:45:16  <nielsm> dp there's reproducability and then there's non-determinism
20:45:24  <nielsm> non-determinism in the execution environment is fine
20:46:18  <nielsm> reproducability would rely on the mod developer not doing unsafe things like modifying memory while being queried for a property which might only be queried depending on whether the item is being drawn on screen or the player's zoom level or such
20:47:28  <nielsm> unless you want to change the entire multiplayer game model too, so instead of transmitting commands and executing the game on every client, the server just tells all clients a full delta of the savegame every tick
20:47:50  <_dp_> nielsm, that's nearly impossible to guarantee
20:47:59  <_dp_> nielsm, also it's a language job, not wasm
20:48:29  <_dp_> nielsm, I'm not sure nml does it but if so nml to wasm compiler may make sense I guess
20:48:51  <milek7> could you design it so each function is isolated? so you don't provide player-specific info on gameplay related query
20:49:09  <_dp_> nielsm, but I'm pretty sure you can fuck it up even with newgrfs as they are now
21:07:39  <b_jonas> ok, now I have two networks that work well. first one is the long 2+2 track spine between three big cities, where I transfer passengers, and also run oil and goods sidelines for the west oil refinery.
21:08:49  <b_jonas> second one is a 2+2 track spine that doesn't run passengers yet, only oil and goods from sidelines to the east refinery. next step is to join these and close the spine to a circle,
21:10:17  <b_jonas> then modify the oil tankers and good trains to do a full clockwise loop with two transfers (one at each refinery) each, so they run empty much less,
21:10:46  <b_jonas> s/clockwise/counterclockwise/
21:11:48  <b_jonas> then direct the passenger trains to also do a full counterclockwise loop, and finally turn the spine to a one-way 4 track counterclockwise loop (this again will need a lot of fiddling with big junctions)
21:12:04  <supermop_Home> here andy i made this:
21:12:13  <b_jonas> I'm satisfied with how this map is goin
21:19:53  <TrueBrain> "Exception: PBR does not match code block: 0xc"
21:20:03  *** cHawk_ has quit IRC
21:20:07  <TrueBrain> this is just evil ... code being executed in another page than it should ... WHY DO YOU HATE ME CODE :(
21:20:25  *** cHawk_ has joined #openttd
21:21:44  *** SpComb has quit IRC
21:22:04  *** frosch123 has quit IRC
21:27:54  *** SpComb has joined #openttd
21:37:55  *** nielsm has quit IRC
21:39:23  <TrueBrain> "Exception: PC on stack different from what expected: 8031 vs 8059" <- booooo .. tracing these kind of issues is annnnoooyyyyiiiinnnngggg :D
21:41:12  <LordAro> TrueBrain: usually involves adding *lots* of prints, in my experience :)
21:41:23  *** andythenorth has quit IRC
21:41:26  <TrueBrain> yeah .... but if you have any idea how this code looks, that is another challenge :P
21:41:35  <LordAro> oh no
21:41:37  <TrueBrain> 428 files :P
21:42:28  <glx> seems you're having the same fun as with dune2
21:43:00  <TrueBrain>
21:43:02  <TrueBrain> pretty sure it is broken :D
21:43:46  <glx> somehow wrong data is read at some point :)
21:45:02  <TrueBrain> yup .... but nowhere in the code I can find 8031 .. this is a true mystery :)
21:47:28  <TrueBrain> glx: <- different language this time :P
21:47:52  <glx> haha libEMU in python
21:48:29  <TrueBrain> my CPU is 2000 times faster .. I would imagine Python should be sufficient ... no clue if it holds true .. so far .. it seems to be
21:48:30  <LordAro> eesh
21:48:54  <TrueBrain> but internally it is in an AST, so it can be what-ever language tbfh :P
21:54:47  <TrueBrain> I love looking how code was written in 1991 ... what they did here: on VBLANK (so when the video is not doing anything), they change thread. Now half-way in drawing the screen (think CRT-screens), it switches back to the main thread. Basically: 2 threads run 50/50 in CPU time
21:54:48  <TrueBrain> how elegant :)
21:55:52  <glx> and interthread communication via globals ?
21:56:18  <TrueBrain> Everything is a global ;)
21:56:30  <glx> yeah of course
21:57:32  *** sla_ro|master2 has quit IRC
21:58:08  <glx> what kind of cpu is it ?
21:58:47  <glx> looks like an evolution of 6502
21:59:30  <TrueBrain> impressive :P As it is the next gen of the 6502
21:59:40  <TrueBrain> the 65C816 to be exact
21:59:51  <TrueBrain> which is nearly fully compatible with 6502 in emulation mode
22:00:39  <TrueBrain> main difference I guess is that it can be in 16bit mode
22:00:47  <TrueBrain> and code constantly changes between 8bit and 16bit mode, all the time
22:00:51  <TrueBrain> which is very annoying :P
22:00:59  <glx> and more registers it seems
22:01:12  <TrueBrain> not ones that are useful
22:01:23  <TrueBrain> there is "pbr" and "dbr", but that is only to address 24bit pointers (instead of 16bit)
22:01:39  <TrueBrain> but those are the banks for pc and d, which is not something you can use for calculation
22:01:54  <TrueBrain> so still a / x / y register ..  well, a is called c here, because it is 16bit :P
22:02:43  <TrueBrain> (CPU-specs are weird in those details .. names .. references ...)
22:03:15  <glx> as always
22:04:13  *** Samu has quit IRC
22:08:15  *** Wolf01 has quit IRC
22:19:37  *** nielsm has joined #openttd
22:22:54  <glx> just reading wiki, switching mode seems to use weird ops
22:23:56  <TrueBrain> "This is the only instruction in the 6502 family where the flags affected depends on the addressing mode."
22:24:00  <TrueBrain> I love those ... exceptions
22:25:21  <glx> and even in native mode you can also be partially in 8bit
22:26:09  <glx> it really looks like a hack of 6502 for 16bit
22:26:30  *** keoz has quit IRC
22:26:36  <TrueBrain> it really is
22:26:45  <TrueBrain> for example, if you switch from 16bit to 8bit
22:26:55  <TrueBrain> C keeps its higher-bits
22:26:58  <TrueBrain> but X and Y are cleaned
22:27:05  <TrueBrain> which makes next to ZERO sense
22:27:17  <TrueBrain> (well, most likely it does in the microcode, ofc :P)
22:28:04  <glx> yeah and switching back to 16bit doesn't touch accumulator bits but still resets MSB of X and Y
22:28:27  <TrueBrain> pretty difficult to implement, I found out
22:28:29  <TrueBrain> well .. not difficult ..
22:28:35  <TrueBrain> you need to keep paying attention
22:28:40  <TrueBrain> like, a lot
22:28:48  <TrueBrain>     cpu.c = (cpu.c & 0xff00) + value
22:28:49  <TrueBrain> stuff like that
22:28:52  <glx> oh and it also depends on m flag
22:29:05  <TrueBrain> or the x, depending what register :P
22:29:27  <TrueBrain> <- just check the list of arguments an opcode can have (chapters 5.2 till 5.21)
22:29:35  <TrueBrain> and mind the (DIRECT,X) and (DIRECT),Y
22:29:44  <TrueBrain> which means two totally different things
22:29:45  <TrueBrain> :P
22:29:51  <TrueBrain> (found out the hard way)
22:29:56  <glx> hehe
22:30:13  <glx> 6502 accessing modes are easy
22:30:15  <TrueBrain> but .. as that is with CPUs ... easy to bitch about the specs now .. implementing it was most likely not so easy ;)
22:30:29  <TrueBrain> why did you do anything with a 6502?
22:30:32  <TrueBrain> these are ancient
22:31:00  <glx> never touched, but I watched ben eater videos on youtube
22:31:10  <TrueBrain> who? :D
22:31:23  <glx>
22:31:27  <TrueBrain> ah, that crazy bastard :P
22:31:27  <glx> this guy
22:31:29  <TrueBrain> (in a positive sense)
22:31:44  <glx> 8bit cpu on breadboard
22:31:48  <TrueBrain> I like his CPU on breadboard :)
22:31:49  <TrueBrain> yeah :)
22:32:20  <glx> and I also follow someone writing a NES game on twitch
22:32:52  <TrueBrain> yeah, the CPU I am working on is the SNES ;)
22:34:25  *** HerzogDeXtEr1 has quit IRC
22:34:34  <TrueBrain> okay, I really do not know why my pc gets corrupted .. I am missing something :D
22:34:41  <TrueBrain> implemented a lot of other instructions .. but alas ..
22:35:21  <glx> and you can't trace PC changes ?
22:35:42  <TrueBrain> I don't track PC really
22:36:01  <TrueBrain> (as you might hav eguessed .. I am decompiling it to Python and executing that, instead of emulation every opcode)
22:36:10  <TrueBrain> so PC is irrelevant to me .. except when it is not :D
22:36:18  <glx> seems to be a nice debug option
22:36:27  <glx> but maybe not easy
22:37:15  <glx> yeah you do it libEMU style
22:37:18  <TrueBrain> more things are not completely correct .. and so far it has been that every bug I fix, a lot of other problems resolve too :P
22:37:35  <TrueBrain> yeah .. I really like that approach :) As my goal is to take a peek under the hood, understand how they did stuff
22:37:39  <TrueBrain> that requires code to be in an AST
22:37:45  <TrueBrain> and do .. a lot of manipulation on it :)
22:38:24  *** FLHerne has quit IRC
22:38:30  <glx> and it's probably even simpler with python
22:38:41  *** FLHerne has joined #openttd
22:38:50  <TrueBrain> writing those AST visitors, yes
22:39:00  <TrueBrain> but the lack of real interrupts is a bit more challenging than I expected
22:39:04  <TrueBrain> but generators mostly solved that issue
22:39:25  <TrueBrain> but my codebase is already 3300 lines of code :P
22:39:42  <glx> yeah python tends to grow fast :)
22:41:52  <TrueBrain> this is also really complex :P
22:41:59  <TrueBrain> libemu was larger, so what-ever :P
22:46:06  <glx> <-- just this can cause brains to explode :) (luckily your are doing it in reverse)
22:47:28  <glx> oh no it's really the same opcode, but data length changes
22:47:51  <glx> so even on your side it's not easy
22:48:31  <glx> but an error in this handling could corrupt PC I guess
22:50:10  <TrueBrain> yeah, but I think I fixed most bugs related to that
22:50:14  <TrueBrain> that documentation is pretty well done
22:50:21  <TrueBrain> so for every instruction it mentioned what flags to watch out for
22:50:33  <TrueBrain> but it made decoding at first very difficult
22:50:53  <glx> yeah this CPU is really a hack :)
22:51:00  <TrueBrain> yeah .. and that is why I love it :)
22:51:06  <TrueBrain> and I mean .. I already got an image on the screen :D
22:51:16  <TrueBrain> not always the right one .. but details details
22:51:17  <TrueBrain> ;)
22:51:21  <TrueBrain> right, enough for today .. night!
22:51:59  <glx> yeah it's a very good start if you get an output in the right place (maybe not with the right sprites)
22:54:03  *** arikover has quit IRC
23:20:12  *** Progman has joined #openttd
23:21:52  <DorpsGek_III> [OpenTTD/OpenTTD] techgeeknz updated pull request #8217: Port GUI rendering improvements from JGRPP
23:31:10  <DorpsGek_III> [OpenTTD/OpenTTD] techgeeknz updated pull request #8217: Port GUI rendering improvements from JGRPP
23:33:16  <DorpsGek_III> [OpenTTD/OpenTTD] techgeeknz updated pull request #8217: Port GUI rendering improvements from JGRPP
23:37:26  <DorpsGek_III> [OpenTTD/OpenTTD] techgeeknz commented on pull request #8217: Port GUI rendering improvements from JGRPP

Powered by YARRSTE version: svn-trunk