IRC logs for #openttd on OFTC at 2020-07-21
⏴ go to previous day
01:26:42 *** ChanServ sets mode: +v tokai
02:52:42 *** WormnestAndroid has quit IRC
02:52:55 *** WormnestAndroid has joined #openttd
04:22:07 *** snail_UES_ has joined #openttd
04:28:05 *** Gustavo6046 has joined #openttd
06:22:31 *** virtualrandomnumber has joined #openttd
08:40:23 *** arikover has joined #openttd
08:52:41 *** dihedral has joined #openttd
09:06:01 *** LegantoCze has joined #openttd
11:16:02 *** Smedles has joined #openttd
11:19:32 *** Smedles has joined #openttd
11:24:45 *** Smedles has joined #openttd
13:28:02 *** snail_UES_ has joined #openttd
14:05:25 <supermop_Home_> quiet 23 hours
14:05:45 <Eddi|zuHause> and you broke it
14:21:51 <argoneus> it's amazing how this game is like 23 years old technically
14:22:13 <argoneus> and there still isn't any other game that captures the feel of ttd
14:22:29 <argoneus> though i haven't played train fever so maybe that one is
14:22:36 <argoneus> but people don't seem to like it much (?)
15:04:43 *** WormnestAndroid has quit IRC
15:06:34 *** WormnestAndroid has joined #openttd
16:49:17 <Eddi|zuHause> argoneus: more like 26
16:52:00 *** Speeder has joined #openttd
17:28:40 *** longtomjr has joined #openttd
17:29:44 <longtomjr> Good day all. Is there a way to load a large amount of data into a variable (or the global table) using gamescripts?
17:30:22 <longtomjr> I am trying to alter world generation (spesicfically tree generation) using a gamescript. Is there other ways I can go about this?
17:36:57 *** Wormnest has joined #openttd
17:42:44 <Eddi|zuHause> i'm not quite sure what you're actually asking
17:49:24 <longtomjr> I have an array of coordinates on the map that I would like to place either 1, 2, 3, or 4 trees.
17:49:51 <longtomjr> current treemap is ~ 2k*4k
17:53:59 <longtomjr> I already have a way to load the data, but it takes too long and times out
17:55:18 <longtomjr> I have a script that generates a squirrel array with all the coordinates, and then I require that file. However, the game fails to load if I require it during the init loop
17:55:25 <longtomjr> since the gs takes too long to load
17:55:59 <longtomjr> Is there a way to override that temprorarily somehow, force the game to wait untill everything has been loaded?
18:07:00 *** Gustavo6046 has joined #openttd
18:12:30 <glx> don't do it in init loop then
18:13:47 <glx> you can do it once in the main loop
18:23:00 <longtomjr> Tried that, it still times out
18:23:06 <longtomjr> or gives up loading it rather
18:28:26 <Eddi|zuHause> next step would be splitting up into multiple files, and loading them in subsequent loops. or injecting the data in chunks through the admin port
18:29:10 <Eddi|zuHause> or increasing the AI/GS ticks in the .cfg
18:34:12 *** Progman has joined #openttd
18:35:11 <nielsm> how are the data stored in the squirrel script? as an actual squirrel array of static data, or as a string?
18:35:36 <nielsm> I think perhaps if you store it as a single huge string and parse that string after init it can work
18:47:25 <Timberwolf> Train/Transport Fever are quite fun, but they don't capture that same "I have 300 trains using this station" late-game TTD feeling.
18:49:07 <longtomjr> Eddi|zuHause, I am busy doing Run Length Encoding on the data, and then I can split it and require it on different ticks
18:49:33 <Timberwolf> I prefer their passenger model to cargodist ;), although it still leaves a little to be desired - IMO a blanket "passengers will travel for 20 minutes max, find them destinations" misses out on the crazy long-distance routes.
18:50:00 <longtomjr> also, how do I increase the ticks? If I can make it large enough just for generation I can then set it back afterwards.
18:51:14 <longtomjr> nielsm, Currently storing it as a squirrel array. I can try a string as well and see if that has any benefit. afaik the string is just a char []
18:53:22 <Timberwolf> I hit similar problems with Villages Is Villages, not found anything so big where loading the raw data exceeds the tick count but it only processes the town array once it's up and running.
18:54:54 <Timberwolf> Could you use something like a sparse quadtree rather than a 2D array? (not sure what kind of tree effect you're going for, that might work if you want a few clusters and none elsewhere)
18:56:09 *** HerzogDeXtEr has joined #openttd
18:56:52 <longtomjr> Timberwolf, The data is from a PNG that looks like a heightmap
18:57:37 <longtomjr> but it is a treemap, so I have a script that converts it into a squirrel array
18:59:54 <longtomjr> So what I am going to try to do now is have several runs with the RL encoded data for each tree level, and see if that loads
19:00:18 <longtomjr> The only other concern is the overhead of inflating the array again
19:00:34 <longtomjr> and if that can run quickly enough
19:15:04 *** b_jonas has joined #openttd
19:16:43 *** gelignite has joined #openttd
19:45:51 <DorpsGek_III> - Update: Translations from eints (by translators)
20:12:49 <longtomjr> update on my treemap situation. dP added the feature to citimania client :)
21:19:25 <nielsm> oh they left, was just about to suggest the real crazy solution: send the treemap data to the GS via admin port
21:20:12 <_dp_> I'll pass it to him on discord xD
21:20:18 <_dp_> though it's kinda solved already
21:31:16 *** y2kboy23 has joined #openttd
21:40:50 <Eddi|zuHause> nielsm: i said that
23:08:32 *** WormnestAndroid has quit IRC
23:18:08 *** WormnestAndroid has joined #openttd
23:18:24 *** WormnestAndroid has joined #openttd
23:38:39 *** WormnestAndroid has quit IRC
23:39:24 *** WormnestAndroid has joined #openttd
23:49:18 <DorpsGek_III> [OpenTTD/OpenTTD] michicc opened pull request #8277: Fix: [CMake] Don't strip final newline from regression output. https://git.io/JJWgx
continue to next day ⏵