IRC logs for #openttd on OFTC at 2022-01-25
⏴ go to previous day
00:03:18 *** _aD has quit IRC (Quit: leaving)
00:49:03 *** supermop_work has quit IRC (Read error: Connection reset by peer)
01:41:17 *** Wormnest has quit IRC (Quit: Leaving)
01:57:50 *** Gustavo6046 has joined #openttd
01:59:09 *** ChanServ sets mode: +v tokai
02:06:11 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
03:09:23 *** toktik has quit IRC (Remote host closed the connection)
03:28:47 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:49:15 *** boomaa23 has joined #openttd
04:05:24 *** cathartes has joined #openttd
05:17:11 *** _aD has quit IRC (Quit: leaving)
07:19:44 *** cathartes has quit IRC (Quit: fly away)
07:20:31 *** WormnestAndroid has quit IRC (Remote host closed the connection)
07:37:08 *** sla_ro|master has joined #openttd
07:48:39 *** wiscii has quit IRC (Remote host closed the connection)
07:49:36 *** wisbascii has joined #openttd
07:49:36 *** azubieta60 has quit IRC (Quit: Ping timeout (120 seconds))
07:49:50 *** azubieta60 has joined #openttd
09:17:31 *** basxt0 has quit IRC (Quit: WeeChat 2.7.1)
10:25:06 *** andythenorth has joined #openttd
11:20:06 *** Gustavo6046 has quit IRC (Quit: Leaving)
12:04:46 *** Eddi|zuHause2 has joined #openttd
12:10:36 *** Eddi|zuHause has quit IRC (Ping timeout: 480 seconds)
12:40:46 *** Etua has quit IRC (Quit: Etua)
13:33:22 <andythenorth> looking at simple pathfinders, there's a lot of handling of e.g. x and y components, and signs of deltas
13:33:36 * andythenorth was hoping for a way to it by summing simple integers
13:34:04 <andythenorth> seems like it should be possible to do it using array accessors, not if statements
13:34:19 <andythenorth> every time I write an if statement for anything, I feel like a kitten dies
13:35:15 * andythenorth pencil and paper
13:37:47 <andythenorth> hmm might have found a neat way
13:58:44 <andythenorth> GS doesn't have squirrel array.find
13:59:18 <andythenorth> is this some desync thing?
13:59:29 <andythenorth> assembling programming primitives is getting boring :)
14:00:25 <andythenorth> I guess I can use GSList, which seems more feature complete
14:11:07 <andythenorth> ok so I never bothered to learn how x and y relate to N / E / S / W in the OpenTTD map
14:11:28 <andythenorth> I have 8 directions numbered 0..7
14:11:51 <andythenorth> and I have x,y vectors in the form [0, 1], [-1, -1] etc
14:12:04 <andythenorth> but I don't know which vectors map to which direction :D
14:13:04 <andythenorth> ok [1, 1] seems to go due south
14:31:07 *** WormnestAndroid has joined #openttd
14:31:34 *** ioangogo has joined #openttd
14:33:11 *** wisbascii is now known as wiscii
14:37:39 <_dp_> andythenorth, x goes NE->SW, y goes NW->SE
14:37:57 <andythenorth> I tested by building in each direction :P
14:38:17 <andythenorth> I should know the compass directions from grf stuff, but I never bothered learning
14:38:34 <_dp_> you can just check tile coordinates with ? tool if you forget
14:40:47 <andythenorth> never thought of that :D
14:41:02 <andythenorth> first I read openttd docs, then I wrote GS to figure it out
14:56:37 <andythenorth> chances I can compare two arrays in squirrel directly?
14:56:46 <andythenorth> guess I write my own compare function
15:02:32 <andythenorth> local vars declared in an 'if' statement are local to that statement?
15:03:37 <andythenorth> how the fuck is this supposed to work :(
15:04:02 <andythenorth> can I please go back to nfo?
15:05:05 <andythenorth> someone please send lolz
15:05:17 <andythenorth> I want to conditionally set the value of a var
15:05:30 <andythenorth> but I can't set it for reuse outside the conditional block
15:06:15 <andythenorth> this is braindead crippled
15:06:43 <andythenorth> ok I'll delegate it to a function
15:09:36 *** supermop_work has joined #openttd
16:24:44 *** Wormnest has joined #openttd
16:32:17 *** frosch123 has joined #openttd
16:51:38 <glx> andythenorth: openttd is stuck with squirrel 2 (squirrel 3 is not fully backward compatible)
16:53:13 <glx> <andythenorth> but I can't set it for reuse outside the conditional block <-- declare it outside the block then
17:24:42 *** gelignite has joined #openttd
18:02:31 *** Flygon has quit IRC (Read error: Connection reset by peer)
18:08:35 <frosch123> quite surprised there are different locales for HK and MO
18:12:34 <nielsm> fresh windows install, fresh VS 2022 install, OTTD still compiles just fine
18:36:02 *** TinoDidriksen has quit IRC (Remote host closed the connection)
18:36:13 *** TinoDidriksen has joined #openttd
18:36:45 *** TinoDidriksen is now known as Guest572
18:40:23 <supermop_work> so i told an architect on this project i could meet anytime today except 12:00-13:00, suggested 13:30. Dont hear anything... then at 12 when i'm in another meeting, i get an invite for 12:30.
18:42:59 <andythenorth> adventures in pylon building
18:43:09 <andythenorth> it's not strictly a pathfinder
18:45:02 <andythenorth> it uses some crude arithmetic to find which of 8 possible directions are valid
18:45:20 <andythenorth> and it chooses a random valid direction every 5 loops
18:45:27 <supermop_work> at 13:05 i get out of my meeting and respond, 'did you mean 13:30? your invite said 12:30?'
18:45:55 <supermop_work> and they respond "we already had the meeting, we had it at 13:30 as scheduled"
18:46:20 <supermop_work> andythenorth: those look good
18:46:32 <andythenorth> I don't like 90 degree turns
18:46:52 <glx> supermop_Home: different time zone ?
18:46:54 <supermop_work> it seems chamfered enough
18:47:33 <supermop_work> glx: we specified eastern standard in the email, but they are in pacific
18:47:52 <andythenorth> mhttps://media.discordapp.net/attachments/337701432230805505/935606890757492766/unknown.png
18:48:14 <andythenorth> I might try a different approach
18:48:29 <supermop_work> not sure how you could get to be 40 years old in this country without knowing that pacific is 3 hours behind, not 2
18:48:48 <supermop_work> espescially when Outlook does this for you
18:49:02 <andythenorth> I might try following the bird path tiles, but only building along 45 degrees, and measuring the distance from the bird path to nearest tile on a 45 degree vector
18:49:24 <andythenorth> alternately _dp_ has a pathfinder which goes around e.g. sea
18:49:27 <andythenorth> which looks good
18:49:30 <andythenorth> but might be slow
18:49:49 <andythenorth> this is the most interesting ottd thing I've done for some time :P
18:49:51 <supermop_work> andythenorth: some kind of tube map rules?
18:50:07 <supermop_work> or leader lines
18:50:18 <andythenorth> there are so many valid approaches
18:50:45 <supermop_work> go only in straight line then bend 45 at the last moment,
18:50:50 <andythenorth> on the one end simple geometries, which are fast, but get complex if they need to handle edge cases
18:51:02 <andythenorth> on the other end, pathfinding with weights
18:51:13 <andythenorth> which is much better at routing around obstacles, but is glacially slow
18:51:29 <andythenorth> 40 game years to connect 10 industries with the road pathfinder
18:51:40 <supermop_work> do the pylons do anything? or is it ok if a few towns or power plants are left disconnected if pathfinder can't reach them?
18:51:43 <andythenorth> 1 game or less for bird path
18:51:54 <andythenorth> the current thinking is they're just eye candy
18:52:10 <andythenorth> the power grid will be treated as a single entity
18:52:20 <supermop_work> if the pylons are just for looks, then probably can just ignore or silently fail at weird edge cases
18:52:21 <andythenorth> all players, all power plants, all towns, one grid
18:52:33 <andythenorth> well I can look ahead or look behind and change the sprites, or fail
18:53:08 <supermop_work> is there a terminal pylon sprite? substation?
18:53:25 <andythenorth> there are loads of option in Auz powerlines obejcts
18:53:35 <andythenorth> the sprites need some tweaks, but are pretty good
18:53:42 <andythenorth> wow so many typos
18:54:01 <supermop_work> if pathfinding fails just put one of those on the last pylon, and we can imagine they ponied up the cash for underground vault at that point
18:54:59 <andythenorth> definitely trying to create an impression of 'grid' not a perfect model
18:55:19 <andythenorth> original concept was to connect each town individually by adding a substation
18:55:35 <andythenorth> I think that's just the yak-shaving equivalent of building statues though
18:55:52 <andythenorth> (as in: player chooses to build a substation, or GS randomly does it)
18:57:00 <andythenorth> and filling up the landscape with transmission towers will be annoying
18:57:32 <supermop_work> i think small bonus for building a substation is nice, as long as its not critical
18:58:08 <supermop_work> but player built lines would be a huge pain
18:58:50 <supermop_work> feeder station near electric rail or electric rail depot?
18:59:59 <supermop_work> andythenorth: my dad says he doesn't know that the lines are actually that much bendier in the UK on the whole
19:02:43 <andythenorth> so objects don't have storage afaict?
19:02:59 <frosch123> they have animation state
19:03:07 <frosch123> so 8bits of storage
19:03:11 <andythenorth> GS can't set it on build
19:03:25 <andythenorth> currently pylons are player-removable
19:03:26 <frosch123> nah, that's the view then
19:03:32 <frosch123> no idea what's the limit for views
19:03:38 <andythenorth> 4 per ID I belive
19:04:09 <andythenorth> I was considering having the graphics chain check the state of the 'next' and 'previous' pylons in the chain
19:04:14 <andythenorth> which are known locations when building
19:04:37 <andythenorth> but the range of possible values is very large
19:05:21 <andythenorth> I guess GS could monitor all the tiles in the monthly loop, but might be achingly slow
19:06:00 <frosch123> the object can also check surrounding tiles
19:06:07 <frosch123> in area of -8..7 probably
19:06:07 <wiscii> supermop_work: bendy lines ???
19:06:13 <andythenorth> I could spiral walk them
19:06:42 <andythenorth> if no pylon within n tiles, show the terminating sprite
19:06:50 <frosch123> so the object could check for nearby pylon (within distance 8), and store that info in the animation state
19:06:54 <supermop_work> that could work
19:07:17 <andythenorth> the potential to get lost in this is immense
19:07:23 <andythenorth> basically this is dynamic landscape
19:07:42 *** jottyfan has joined #openttd
19:07:42 <frosch123> i think you are well past the point of return :p
19:11:49 *** jottyfan has joined #openttd
19:18:07 <Eddi|zuHause2> when placing a new pylon you need to re-trigger the animation of the other pylons in range
19:24:22 <andythenorth> also does transmission loss increase with distance? :P
19:24:24 <andythenorth> I could model it
19:24:52 <andythenorth> also...is it really just not possible to have squirrel math lib?
19:25:06 <andythenorth> I know that some things like random might be dangerous in MP
19:25:18 <frosch123> pretty sure there is a forum topic about that from 15 years ago
19:26:01 <frosch123> it claims it is enabled
19:30:50 <frosch123> i think they are all in global scope
19:31:13 <andythenorth> ok maybe it's a sq 2 vs 3 issue
19:31:23 <andythenorth> I was using sq 3 docs
19:32:10 <frosch123> [20:24] <andythenorth> also does transmission loss increase with distance? :P <- the voltage drops over distance, which reduces the losses
19:32:41 <frosch123> in large sparse countries (asia) there are booster stations, which increase the voltage on the line again
19:33:19 <frosch123> so, voltage drops 20% over some hundred kilometers, transfomer station reincreases it to normal
19:33:27 <supermop_work> andy those purple high voltage ones look pretty straight to me
19:33:51 <supermop_work> if you zoom in to look at the segments
19:34:03 <supermop_work> 330kv and above i think
19:35:40 <andythenorth> is the API compatibility relevant?
19:36:02 <andythenorth> Log.Info(math.abs(1));
19:37:08 <frosch123> just "abs" and "fabs"
19:38:02 <frosch123> you specify the api version in info.nut
19:38:21 <frosch123> you should set it to the current api version, otherwise you will get monkeypatches to some older api for some functions
19:41:24 <andythenorth> do script API versions match to OpenTTD version, or their own scheme?
19:41:31 * andythenorth looking in src/script
19:42:18 *** murr4y has quit IRC (Quit: WeeChat 3.4)
19:42:59 <frosch123> well, "13" in master
19:44:52 <andythenorth> why is it math.abs() in squirrel docs examples?
19:44:58 <andythenorth> some 2 to 3 thing maybe
19:45:10 <frosch123> i never read sq docs, i only looked at zuu scripts
19:45:46 <andythenorth> sq docs are not the best feature of squirrel :P
19:46:30 * andythenorth wonders if anyone understands squirrel
19:46:36 <andythenorth> seems to be a very minority language
19:47:01 <frosch123> there are not many options for languages
19:47:20 <frosch123> i think squirrel is one of the better ones
19:48:19 <frosch123> it's goal is to be better than lua, and i think it succeeded with that
19:49:38 <andythenorth> I'm not against it :)
19:49:39 <andythenorth> it's completely friendly
19:50:00 <andythenorth> just performs poorly for search results
19:50:11 <andythenorth> tends to be a lot of real squirrels
19:50:25 <nielsm> squirrel is worse than lua in one important metric though: adoption
19:50:26 <andythenorth> or a python tutorial for a game called 'squirrel squirrel'
19:51:13 <frosch123> nielsm: the "you can't have nice things" metric :)
19:51:38 <andythenorth> also, are the ; line endings purely optional?
19:51:47 <andythenorth> all examples use them, but the compiler doesn't seem to care so far
19:51:58 <frosch123> what to the other ai/gs do
19:52:09 <andythenorth> except sometimes
19:54:35 <frosch123> i don't unterstand why people keep on using windows...
19:55:08 <frosch123> work notebook ran windows update for 3 hours, now it finished, i login again, it says "hi, we need up run more upgrades"
19:56:29 <andythenorth> also squirrel seems to not need {} if the result is on the same single line as the predicate
19:57:17 <frosch123> isn't that the case in about every language?
19:59:14 <andythenorth> I only know one language :P
19:59:46 <andythenorth> it is Burns Night today
20:01:31 <wiscii> what's for supper ? ;-)
20:08:58 *** frosch123 has quit IRC (Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn)
20:53:22 *** gelignite has quit IRC (Quit: Stay safe!)
20:55:48 <supermop_work> surprised how many undersea cables to denmark and norway there are
21:06:43 *** Guest572 is now known as TinoDidriksen
21:07:46 <supermop_work> someone on this zoom call has their building's fire alarm going off
21:09:16 <supermop_work> and they are not muting
21:10:33 <nielsm> well you should just drop them from the call, they're hopefully too busy evacuating to care about details like that
21:11:26 <supermop_work> i'm not the host
21:11:58 <supermop_work> the host is the one with the alarm... and they seem to just be continuing to run the meeting
21:18:34 *** nielsm has quit IRC (Ping timeout: 480 seconds)
21:51:40 *** Eddi|zuHause2 is now known as Eddi|zuHause
21:59:16 <wiscii> maybe a different building
22:09:31 *** Etua has quit IRC (Quit: Etua)
22:17:44 *** jottyfan has quit IRC (Quit: jottyfan)
22:17:53 *** andythenorth has quit IRC (Quit: andythenorth)
22:17:55 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
22:19:01 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
22:44:28 *** wiscii has quit IRC (Quit: Thanks)
22:46:55 *** Wormnest has joined #openttd
23:18:56 *** WormnestAndroid has joined #openttd
23:36:23 *** sla_ro|master has quit IRC ()
23:38:00 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
continue to next day ⏵