IRC logs for #openttd on OFTC at 2023-06-29
âī go to previous day
00:00:48 <FLHerne> (if you didn't find them earlier)
00:02:27 <kageblink> Progress! ð Going to start renaming things
00:03:05 <kageblink> wait what? lol the wayback machine isn't showing up lol
00:04:23 <kageblink> Ohhh I see they're files for photoshop
00:05:47 <FLHerne> you need to import it for editing/saving the sprites if you're editing them by hand
00:06:34 <kageblink> Yeah still thinking about how I'm going to do that, might be able to do something simple with houdini honestly
00:10:08 <kageblink> actually blender should have it
00:10:38 <FLHerne> kageblink: definitely look at Timberwolf's videos if you're going the voxel route, he's got a whole series
00:10:56 <kageblink> Yea that's painting blocks by hand though from what I've seen
00:11:58 <kageblink> Where as blender can remesh for you
00:12:39 <FLHerne> in that case, I'm not sure I see the point of going to voxels first
00:13:22 <FLHerne> the advantage of painting the blocks by hand is that you can make sure the "details" line up nicely with the block grid, which in turn is planned to line up with OTTD's low-res pixel grid
00:13:41 <kageblink> Yeah I have a whole bunch of stuff I made up already for other projects, so I have a lot to play around with.
00:13:58 <FLHerne> (not that the visible 'details' at OTTD scale are very detailed)
00:15:19 <FLHerne> if you're starting with existing models, an automated conversion to voxels probably isn't better than rendering to low-res pixels directly
00:15:47 <FLHerne> but it sounds like you probably know better than me on the graphics side :D
00:16:08 <FLHerne> so I'll get some sleep and see what you come up with ;-)
00:21:09 <kageblink> thanks for all the help today flh, much appreciated
00:36:37 *** DDR has quit IRC (Ping timeout: 480 seconds)
01:36:34 *** Wormnest has quit IRC (Quit: Leaving)
02:34:36 *** debdog has quit IRC (Ping timeout: 480 seconds)
02:47:01 *** D-HUND is now known as debdog
04:15:52 *** ChanServ sets mode: +v tokai
04:22:52 *** tokai|noir has quit IRC (Ping timeout: 480 seconds)
05:47:58 *** keikoz has quit IRC (Ping timeout: 480 seconds)
06:05:28 *** HerzogDeXtEr has joined #openttd
07:14:07 <andythenorth> still trying to avoid using state that requires saveload
07:14:55 <andythenorth> but I do need some timeseries type data:
07:14:55 <andythenorth> when a town last tried to do XYZ
07:14:55 <andythenorth> when an industry last increased production
07:15:08 <andythenorth> maybe I can store these as really simple queues
07:15:24 <andythenorth> just key-value pairs
07:16:08 <andythenorth> very little chance that will lead to broken state when the GS or grf changes
07:16:43 <andythenorth> and if a data migration is needed, 'delete the queue' is probably enough to preserve the savegame
07:17:54 <andythenorth> might be quite inefficient to parse them, as they would be flattened lists of key-value pairs for e.g. every town on the map, or every industry on the map
07:18:35 <andythenorth> don't really want to be fucking around with serialise / deserialise to more efficient formats for computation
07:44:56 <pickpacket> andythenorth: could you use a hashmap/hashtable?
08:02:48 <pickpacket> I see both "return_cmd_error(...)" and "return CMD_ERROR". I guess the former maps to an error message, but I can't find a definition for CMD_ERROR and I don't know which one of them to use
08:14:57 <_jgr_> pickpacket: See the top of src/command_func.h
08:15:25 <_jgr_> Basically CMD_ERROR returns an error without any associated error string
08:15:27 <andythenorth> not sure whether squirrel supports hashmaps
08:15:42 <andythenorth> I wouldn't roll my own, chances of success there are nil
08:15:55 <andythenorth> also I'd want the problem better defined ð
08:16:19 <_jgr_> The return_cmd_error is a bit dubious really, but it just expands to `return CommandCost(errmsg)`
08:16:36 <andythenorth> the performance concern currently is that I might have to walk through 1000s of name-value pairs to find e.g. 'last production increase date for this industry'
08:16:52 <andythenorth> but we don't really have any evidence about squirrel performance, afaik
08:17:31 <andythenorth> and there are no timing tools for squirrel, unless the C++ client is patched, or maybe a call stack analysis tool can do it
08:18:11 <andythenorth> storing more complex structures would be faster for lookups, but is liable to constantly break as the GS changes
08:18:41 <pickpacket> _jgr_: CommandCost is a bit of an odd name for a class that stores an error string ðĪ
08:19:18 <pickpacket> andythenorth: no index?
08:19:18 <_jgr_> It stores the result of a command, whether that is the cost of the operation or that the operation failed
08:19:56 <andythenorth> pickpacket: could probably create an index on saveload
08:20:06 <andythenorth> that's my strategy if this appears to be slow
08:20:10 <_jgr_> Arguably, it'd be better off named CommandResult
08:20:17 <andythenorth> but the timing tools in Squirrel are crap, so eh, who knows
08:20:32 <andythenorth> I can only time to the nearest second
08:20:52 <andythenorth> but that relies on Squirrel execution, which is highly unpredictable
08:21:50 <_jgr_> Squirrel has arrays/lists and maps/tables
08:22:13 <_jgr_> It's not necessary to iterate a table to find a particular key
08:22:27 <_jgr_> You could also use a sparse array for things like industry IDs
08:23:28 <pickpacket> _jgr_: I don't know whether I should return a string message with my cmd failure or not ð
08:24:16 <pickpacket> truebrain might have an opinion on that, seeing as they pointed me to the return_cmd_error(...) usage
08:24:34 <_jgr_> If the failure could be plausaibly triggered by a human player, returning some sort of message is probably a good idea
08:25:05 <_jgr_> You can use one of the existing strings if suitable
08:25:33 <andythenorth> hmm maybe I could just serialise to actual strings ð
08:25:42 <andythenorth> then deserialise to a sensible structure on load
08:25:53 <truebrain> I don't really have an opinion; it is not worth adding another string for this, as it can only be triggered by a modified client. That is all what my opinion says ð
08:26:56 <peter1138> Uh, feels like I need a jumper on...
08:27:10 <andythenorth> same identical though
08:27:29 <andythenorth> do we have an XML parser for Squirrel?
08:27:36 * andythenorth considereding using XML as saveload
08:31:49 <pickpacket> truebrain: that's along my lines of thinking too
08:37:02 <m3henry> andythenorth: I noticed another sprite issue with IH, all metro trains have reversed second vehicle in the buy menu (and the docs)
08:46:40 <pickpacket> I have a NewGRF problem. I start a game using the latest versions of my NewGRFs, but before I've gotten far in that game I update the NewGRFs and release new versions and of course want to play with them...
08:47:53 <andythenorth> m3henry: lol again? ð That's a recurrring bug I've fixed before ð
08:48:31 <m3henry> It's not easy to spot
08:49:21 <m3henry> Do the xxi numbers underneath represent TE?
08:49:40 <andythenorth> no, they represent the ratio of horsepower to maximum speed
08:49:46 <andythenorth> they're only really there for me
08:50:13 <andythenorth> it's quite easy to make a train 'upgrade' which is actually 'worse' as it has less HP relative to speed, and takes longer to accelerate to max speed
08:55:15 <m3henry> Also, are half length wagon trains meant to load faster than full length wagon trains with the same capacity?
08:56:05 <andythenorth> all wagons should load at the same rate
08:56:57 <m3henry> e.g. it takes 8 ticks to load 86 units on a wagon, but only 4 ticks to load 2 * 43 units on half wagons
08:58:03 <andythenorth> might be an unintended exploit ð
08:58:11 <andythenorth> they're supposed to be normalised
08:58:31 <andythenorth> not sure if the game loading setting affects that
08:59:09 <peter1138> Isn't the default load speed "x units per tick"?
08:59:45 <peter1138> Hmm, no, of course not.
08:59:50 <peter1138> I'm forgetting ð
09:00:44 <peter1138> Parallel loading exploit ð
09:00:49 <peter1138> Might as well remove it.
09:00:59 <peter1138> Also remove stations
09:02:01 <andythenorth> make them objects
09:02:23 <peter1138> Let the user specify what is accepted and produced
09:03:47 <andythenorth> there used to be code to try and balance loading speeds across vehicle generations, capacities and lengths
09:03:53 <andythenorth> I deleted it all and just do what OpenTTD does
09:04:00 <andythenorth> not sure why that doesn't work, but eh
09:06:08 <m3henry> It would work if serial loading was enabled, But I get the feeling that it's TTDpatch only
09:09:11 <peter1138> load amount isn't scaled by wagon length by default
09:11:07 <peter1138> And yes, OpenTTD implemented gradual loading (tick based) instead of instant loading (delay based), but not serial loading.
09:13:41 <peter1138> (Serial loading doesn't make sense for passengers, etc)
09:13:52 <m3henry> Indeed. It'd be nice to have different load/unload speeds to differentiate open/hopper wagons further.
09:28:02 *** _aD has quit IRC (Quit: leaving)
09:35:47 <peter1138> Someone from the dev team decides.
09:35:57 <peter1138> However, you should probably read up on how to contribute.
09:36:27 <peter1138> We have style requirements for the comment messages which you have ignored.
09:40:35 <peter1138> I recomment rebasing and merging into a single commit.
09:41:26 <peter1138> Or maybe two, if you consider the bribing action to be separate.
10:41:46 <FLHerne> pickpacket: it is possible to update newgrfs in-game, if you ignore the big red warnings
10:42:44 <FLHerne> and since it's your grf, you can know whether the big red warning is important or not :-)
10:43:55 <FLHerne> short version is that removing or changing the ID of something that exists in-game is a bad time, otherwise it's probably fine
10:46:39 <FLHerne> I don't know what happens if you change code using persistent storage, bad things probably
10:58:30 <pickpacket> FLHerne: Thanks :D
10:59:27 <andythenorth> FLHerne: magic bulldoze the industry and rebuild
10:59:29 <pickpacket> peter1138: I'm squashing it to one commit :) Makes sense
11:14:39 <pickpacket> ð Remember, children, that general bitching goes into the *body* of your commit message! "Further explanations, general bitching, etc. don't go into the first line."
11:20:51 <pickpacket> Not sure that entirely adheres to the contribution guidelines yet. I'll read through the docs a couple of extra times and I hope you'll let me know if you find something wrong/missing :)
11:29:19 <peter1138> "more intuitive" itself is not intuitive ;p
11:31:27 <peter1138> andythenorth: lunch?
11:32:58 <andythenorth> got distracted by forum station rating chat
11:33:12 <andythenorth> I should PR for GSStation.SetRating()?
11:33:16 <andythenorth> seems to be missing
11:39:48 <pickpacket> peter1138: haha, that's true
11:40:23 <pickpacket> "Exclusive Rights more exclusive"?
11:43:29 <pickpacket> that's probably actually a good description of it, silly as it sounds
11:48:55 <emperorjake> I forced 8bpp-simple blitter and this happened lol
11:51:58 <emperorjake> Windows x64 JGRPP
11:52:46 <emperorjake> Vanilla nightly looks normal, same cfg file
11:56:29 <truebrain> it is the new disco-mode JGR introduced; didn't you read the changelog? ð
11:56:42 <truebrain> it looks fantastic ð
11:59:38 <peter1138> Everyone's favourite font. And those non-contiguous font-sizes ;D
12:02:51 <peter1138> It's contiguous from 4 to 20, but with ScaleGuiTrad()
12:03:19 <peter1138> So those are the only selectable values anyway. It's a little more intuitive that the font console command.
12:33:15 <truebrain> it looks darn nice peter1138
12:33:42 <truebrain> (not the font, btw)
12:40:49 <truebrain> Will there also be a checkbox for AA?
12:42:00 <m3henry> Be careful with subpixel-AA, sometimes the OS doesn't report the correct layout, and it looks awful
12:43:19 <peter1138> We never use subpixel AA.
13:17:19 <peter1138> Not sure why I made antialiasing a per-font setting back in the day...
13:21:48 <truebrain> Young us .. we did the craziest shit ð
13:29:11 <talltyler> I have nothing of substance to say about the font picker, but it does look very nice! ð
14:02:32 <m3henry> Has anyone ever done twin single bolsters as a wagon?
14:19:28 <peter1138> That link does not work.
14:20:21 <peter1138> Not actually a 404. No doubt a "is your refer set, to stop remote-linking" site.
14:22:35 <Eddi|zuHause> anyway, if it is what i think it is, i intended to include those in CETS
14:27:32 *** Wormnest has joined #openttd
14:34:43 <LordAro> Rubidium_: hope you're making a list of these other clean areas :p
14:38:07 <Rubidium_> LordAro: anything with memset, str(r)chr, and so on comes to mind
14:38:20 <_glx_> Rubidium_: If I understand the commit message it should be easy to test
14:39:06 <_glx_> exit<enter> vs exit<enter><enter>
14:42:34 <_glx_> Rubidium_: #11083 works fine for me
14:43:08 <_glx_> just tried `companies` and `exit` with `openttd -D`
14:48:51 * Rubidium_ wonders how to get rid of strecpy in strgen. The thing is that the buffers the strecpy is to as in the object that is just serialised directly to disk for the language file
15:16:03 *** merni has quit IRC (Quit: User went offline on Discord a while ago)
15:18:55 <triple_xx> Why does connecting to servers any bigger that 2k worlds suck?
15:20:23 <triple_xx> I know it's because of the world size, but from all the modernisation the game has received it still can't connect when the map size is over 20mb
15:25:17 <triple_xx> If someone could tell me where the files related to the world downloading for connecting to the server is I would appreciate that a lot.
15:28:41 <Eddi|zuHause> the server owner could try increasing the timeout for joining, if you have trouble
15:43:15 <_jgr_> emperorjake: This is fixed now, the 8bpp-simple blitter does not get tested much to put it mildly ð
15:44:53 <_jgr_> I'd changed _string_colourremap to no longer be a global, so it was no longer all 0 by default
15:45:32 <_jgr_> And it seems that only the 8bpp-simple blitter actually uses the field that should always be 0
15:58:27 <andythenorth> m3henry: considered it, didn't do it because the cargo would need to bend in curves
15:58:41 <andythenorth> have done articulated vans, and some narrow gauge things
15:59:00 <m3henry> I do like watching the skips go round corners
16:07:59 <m3henry> I wonder if doing 3 part vehicles would make it work, like the garratt
16:10:24 <andythenorth> or like the torpedo cars
16:10:39 <andythenorth> there are more complicated ways to do it in grf, but I won't use those
16:40:46 <andythenorth> decor layers for tiles?
16:50:47 <talltyler> Would be far better than the tramtypes hack
16:55:14 <andythenorth> wonder what the spec would be
16:55:25 <andythenorth> wonder what the UI would be ð
16:55:34 <FLHerne> peter1138: that's very nice
16:57:04 <FLHerne> would it be practical to make each list entry in its own font, so it's easy to scroll through and find one?
16:57:38 <FLHerne> I can imagine that being a "widgets just don't work that way and it's a nightmare" idea though
16:58:02 <FLHerne> plus memory usage of loading All The Fonts
17:13:13 <truebrain> And lets sing, all together now: if you happy and you know clap your hands!
17:21:55 *** Flygon has quit IRC (Remote host closed the connection)
17:49:17 *** gelignite has joined #openttd
17:56:53 <FLHerne> the defaults are 500 ticks (~15 seconds) for max_join_time and 1000 ticks (~30 seconds) for max_download time
17:56:59 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
17:57:08 <FLHerne> that should be enough for a 20MB map even on quite a slow connection
17:57:35 <_glx_> main issue will be fast forward capability of joining client
17:57:36 <FLHerne> pause_on_join will help quite a bit
17:58:15 <locosage> there is also compression speed
17:58:28 <locosage> I remember download timing out even on localhost
17:58:32 <FLHerne> I was thinking just from a network PoV, but if there's a lot of stuff on the map the client might not catch up just through lack of FF
18:22:08 <peter1138> Flherne, no, a preview might be possible but showing each font in its own font is not really useful and fairly impractical with our font cache system
18:31:50 <FLHerne> I think it would be useful; the list illustrated means having to blindly click through options
18:32:04 <FLHerne> (unless you already know what each font on your system looks like)
18:32:58 <FLHerne> a preview in the list separately from the font name would work too of course
18:36:29 <peter1138> You have to load each font, while drawing each line, to do that, and then each font has different styles too
18:36:40 <peter1138> A single preview is more practical and more useful
18:37:04 <peter1138> Oof 182 BPM on the road
18:40:20 *** Wormnest has joined #openttd
18:44:26 <FLHerne> I can't really accept "more useful" -- not having to do <click> "oh, that's what Cartograph looks like, meh" <click> "Centaur, nope" <click> "Century...maybe?" <click>... would be a huge win for usability in the normal case of not having a clue which font might be relevant
18:44:41 <FLHerne> but I can accept "not practical", which kind of makes the argument moot :p
18:48:54 <Rubidium_> FLHerne: also consider having something in version 14 is better than *maybe* having the perfect solution in half a decade or more
18:49:54 <FLHerne> Rubidium_: well, true, *anything* is a huge win for usability over manually specifying the font name in an obscure config file setting
18:51:04 <Rubidium_> adding functionality to load many fonts at once would complicate a lot of things *and* interact heavily with many libraries and so, which would make it much harder to even review. Given how small I have to make changes to get them accepted in a reasonable time... it's going to take a while when the whole font backend needs to be refactored
18:53:57 <_glx_> 13 got the suboptimal console command, 14 can get a suboptimal gui for font
18:54:19 <_glx_> It will still be better than before
19:28:28 <_zephyris> But if a font preview is ever added, please, please don't take the "whole font name in the font" approach... It's horrible for useability. A simple "Aa" preview of the font, then the font name in the current UI font works best.
19:34:29 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
19:39:25 <frosch123> i wonder whether "Aa" would be subject to translators, so languages with non-latin alphabet can show something else
19:47:16 <Rubidium_> it might even be useful to use a pangram to check whether the font supports a particular language good enough, preventing the Zloty issue peter1138 mentioned earlier this week
19:54:54 <_zephyris> Hmm, not sure. GIMP's code might help - it uses an "Aa" approach, and skimming through my fonts I can see arabic, hebrew and cyrillic handled.
19:57:48 <peter1138> Very unlikely to help, GIMP invented its own toolkit...
20:00:45 *** Wormnest has joined #openttd
20:24:54 <_zephyris> peter1138: Just in terms of which character to select for a font preview
20:32:18 *** nielsm has quit IRC (Ping timeout: 480 seconds)
20:35:28 <peter1138> Hmm, should font names be translatable?
20:36:00 <peter1138> Specifically the text for the built-in sprite font.
20:36:45 <brickblock19280> I think that makes sense
20:36:57 <LordAro> sprite font is a special case
20:39:58 <peter1138> Uh-oh, changed english.txt... 123/441 compiled ð
20:46:12 <andythenorth> so how do I get a random item from a squirrel list?
20:46:28 <andythenorth> the only thing I have to copy from is this
20:46:29 <andythenorth> `local cabbage = ["Ham", "Eggs", "Popeye", "Alligator", "Zebedee", "The KLF"][GSBase.RandRange(5)];`
20:46:34 <andythenorth> do we like that?
20:47:17 *** gelignite has quit IRC (Quit: Stay safe!)
20:49:41 <peter1138> RandRange(5) would never pick "The KLF"
20:50:18 <andythenorth> this would be unfortunate
20:50:28 <andythenorth> my actual code is
20:50:29 <andythenorth> `local candidate_industry = candidate_industries[GSBase.RandRange(candidate_industries.len())];
20:50:35 <andythenorth> not sure if that will be obiwan or not
20:51:34 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
20:54:51 <FLHerne> <FLHerne> andythenorth: wait, you use "cabbage" as an arbitrary variable name
20:55:01 <FLHerne> do you use it as an arbitrary substitute word in general? (i.e. in place of, approximately, "thing")
20:55:12 <andythenorth> I learnt it from someone else
20:55:14 <FLHerne> I've met one person in my life who does that and always wondered why
20:55:20 <andythenorth> where are they from?
20:55:43 <andythenorth> hmm not a localised thing then
20:55:54 <FLHerne> to be fair, I've now learned it from him
20:58:33 <andythenorth> my side channel won't work
20:58:46 <andythenorth> there's no way for GS to know if an industry has actually increased production
20:59:32 <andythenorth> so I will set a flag on the grf industry, then it will just sit increasing production every month
20:59:41 <andythenorth> and natch, the grf isn't allowed to clear the flag
20:59:50 <andythenorth> because GS authors and grf authors may never communicate
21:00:00 <andythenorth> pls send lol gifs
21:01:17 <peter1138> That was enough ð
21:07:16 *** tokai has quit IRC (Quit: c('~' )o)
21:08:13 <andythenorth> must be another side channel I can abuse
21:09:14 <andythenorth> CargoAcceptState can be read by GS and set by grf
21:09:22 <andythenorth> tends to mess with gameplay though ð
21:10:14 <andythenorth> oh GS can read GetStockpiledCargo
21:10:24 <andythenorth> which grf can add or remove to in the production cb
21:26:03 <andythenorth> maybe it's time for GS <-> GRF comms
21:29:32 *** _aD has quit IRC (Quit: Lost terminal)
21:34:06 <andythenorth> or just expose industry prod_level to GS
21:34:18 <andythenorth> not via the monthly cb, just allow direct get/set
22:00:22 *** keikoz has quit IRC (Ping timeout: 480 seconds)
22:07:33 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
continue to next day âĩ