IRC logs for #openttd on OFTC at 2022-09-17
โด go to previous day
00:33:02 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
01:10:44 *** Wormnest has joined #openttd
01:33:32 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
01:33:49 *** WormnestAndroid has joined #openttd
02:33:05 *** Wormnest has quit IRC (Quit: Leaving)
02:59:50 *** debdog has quit IRC (Ping timeout: 480 seconds)
03:56:10 *** D-HUND is now known as debdog
05:02:17 *** wallabra has quit IRC (Ping timeout: 480 seconds)
07:30:06 <andythenorth> shall we do an OpenTTD release?
07:31:28 <NGC3982> i had this dream about people like you making openKSP
07:43:52 <FLHerne> KSP but isometric 2.5D
08:42:47 *** HerzogDeXtEr has joined #openttd
09:44:56 *** WormnestAndroid has quit IRC (Remote host closed the connection)
09:56:20 <andythenorth> does github have a tree->branch view like Bitbucket?
09:56:33 * andythenorth trying to figure out the parents for various branches
09:56:37 <andythenorth> need to rebase to maste
10:27:31 <andythenorth> rename master->main in my active repos
10:27:42 <andythenorth> turns out very easy to do
10:30:57 *** lobstarooo_ has joined #openttd
10:31:35 <glx[d]> Maybe `git log --graph`
10:32:44 *** lobstarooo__ has joined #openttd
10:35:20 *** lobstarooo___ has joined #openttd
10:38:34 *** lobstarooo has quit IRC (Ping timeout: 480 seconds)
10:38:41 *** lobstarooo___ is now known as lobstarooo
10:40:21 *** lobstarooo_ has quit IRC (Ping timeout: 480 seconds)
10:42:48 *** lobstarooo__ has quit IRC (Ping timeout: 480 seconds)
10:58:06 *** WormnestAndroid has joined #openttd
11:06:54 <andythenorth> git merges are very confusing
11:07:12 <andythenorth> if I'm on a branch, e.g. 'foo'
11:07:19 <andythenorth> `git rebase main`
11:08:02 <andythenorth> why are changes in foo labelled REMOTE and changes in the branch I am rebasing to labelled LOCAL?
11:08:49 <andythenorth> does a rebase invert branch context?
11:18:33 <glx[d]> I never understood how remote/local are determined:)
11:46:17 *** wallabra has joined #openttd
11:50:31 <andythenorth> big rebase, 200+ commits ๐
11:50:40 <andythenorth> only introduced 2 compile failures ๐
11:50:46 <andythenorth> wonder how many silent bugs though?
11:52:49 <Wolf01> Wow, I've noticed that steam deck's joysticks are touch too
11:59:30 <petern> Difficult to operate without touching them...
12:01:22 <Wolf01> No, the joystick cap is touch, you can bind an action to just touching it and not moving or pressing
12:42:00 <andythenorth> meh, xcode updating git
12:42:20 <andythenorth> my connection has some bandwidth issue today ๐
13:05:43 <petern> Debugging with printfs, always the best.
13:19:00 <Rubidium> you're getting there ;)
13:46:50 <petern> Not sure what is going on with the truck...
13:47:54 <petern> Also standard text is completely broken, but you know...
14:36:17 <Wolf01> So, it's snowing on the mountains near here
16:33:04 *** Wormnest has joined #openttd
16:34:35 <Eddi|zuHause> winter is coming.
16:34:58 <Eddi|zuHause> it's raining here. and my car is acting up
16:34:59 <petern> Messed up letter spacing but who's checking...
16:35:17 <petern> (Messed up offsets too)
16:36:21 <petern> This is bypassing the GetFontTables for now. Because I haven't bothered to check what the data format is.
16:45:28 *** michi_cc[d] has joined #openttd
16:49:50 <petern> Hmm, I wondered if just passing through to the parent fontcache GetFontTables would work. Sadly not ๐ฆ
16:51:28 <petern> Our stuff doesn't seem to be suited for allowing overrides / fallbacks, the sprite font fallback is pretty much a special case.
17:19:27 <petern> michi_cc[d]: Seems to be a lot of data that we pass through directly from the font.
17:24:59 *** Tirili has quit IRC (Quit: Leaving)
17:40:43 <petern> Oh it's only used by ICU I think.
18:00:50 <petern> GetOSHandle() => this->parent->GetOSHandle() but...
18:01:10 <petern> Works but not great as a general fallback mechanism.
18:08:24 <petern> dP: It's actually better than I expected
18:09:13 <petern> Antialiased, so a bit iffy.
18:11:00 <dP> petern: yeah, but didn't you basically vectorize 1x icons?
18:11:34 <petern> Not exactly. There are some curves instead of jaggies.
18:13:48 <petern> Yeah, spacing is off ๐
18:14:54 <dP> petern: I'd still call that mostly 1x icons :p
18:17:41 <TrueBrain> petern: It looks cool ๐
18:21:10 <petern> Thanks. Sadly the code is pretty horrible proof of concept-only...
18:23:14 <petern> Also because it's handled as a font it ignores colour, as all text is drawn with remapping.
18:24:35 <petern> Maybe SVG sprite loader ๐
18:25:03 <petern> Although we kinda have the possibility of different sprite loaders it's very much hooked into the NewGRF data format anyway.
18:31:02 *** esselfe has quit IRC (Remote host closed the connection)
18:35:27 *** esselfe has joined #openttd
18:39:44 <Eddi|zuHause> iirc font sprites use 3 colours, text, shadow and transparent
18:40:13 <dP> isn't shadow just same text but offset?
18:42:22 <Eddi|zuHause> i've done a handful of text sprites for CETS, for all the superscript and subscript numbers
18:43:48 <Eddi|zuHause> that's 4 sprites per character
18:44:14 <Eddi|zuHause> (small, medium, large, mono)
18:45:24 <petern> Yeah, for a sprite font it's baked in, for truetype it's either double rendered each draw with AA or double rendered into the sprite if no AA.
18:46:12 <petern> That's why my 1x aircraft has a "hole" in the shadow at the rear -- it's from the window. If you were hand crafting the shadow you'd make that black too...
18:46:44 <petern> AA depends on what's previously been rendered.
18:47:19 <petern> Also black text doesn't have a shadow, so the mask is wrong.
18:48:24 <andythenorth> oof 6 more hours of rebasing a feature branch ๐
18:48:39 <andythenorth> should have just done diff > foo.diff and reapplied ๐
18:49:01 <petern> We did originally always bake the shadow in to the sprite for TTF, but it looked bad, so we changed it.
18:50:42 <petern> Still got those for some reason...
18:52:00 <petern> With baked in shadow, you can't have AA because there's no way to say if a pixel should be partially face and partially shadow.
18:52:21 <dP> petern: this look like text wasn't antialiased over shadow
18:53:33 <dP> petern: and this seems ok on a first glance
18:54:35 <petern> Yes, the second one is double rendered. Discord helpful turns my hyperlinks with filenames into images without filenames...
18:54:54 <petern> First is "oldshadow", second is "newshadow" (it was new at one point :D)
18:55:36 <dP> petern: yeah, there is way to see in the discord it just doesn't explain much either :p
18:56:46 <dP> but what I'm saying what's the difference between rendering text directly or rendering it to a sprite with alpha in between?
18:57:05 <DorpsGek> - Update: Translations from eints (by translators)
18:57:15 <petern> Colour mapping is done later.
18:57:33 <dP> oh, so it's 8bpp basically?
18:57:58 <petern> It's 8bpp (although only using 0 or 1) with alpha.
18:59:06 <dP> huh? if it has alpha can't you map the color and keep the alpha?
18:59:33 <petern> Sure, do you want a face pixel or a shadow pixel at that alpha?
19:00:49 <dP> ah, yeah, it needs color mixing...
19:01:55 <dP> have 8 bpp not for just 0-2 but full luminosity? ;)
19:02:02 <petern> We render the shadow directly before the face. It's not like the whole string is parsed again, and then sprites are looked up again, etc...
19:03:26 <dP> yeah, I guess it's not that much of an overhead
19:04:38 <petern> And if you don't have AA enabled (or it's an 8bpp blitter for some reason) then the shadows are baked in the old way. Probably a pointless "optimisation" but there you go.
19:06:28 <petern> Hah, that looks kinda neat in a way...
19:07:20 <dP> petern: what did you do to it?
19:08:47 <petern> I believe it was one of those fancy "hq2x" scalers.
19:09:31 <petern> In the code path where sprites are scaled up, so pre-processed rather than post-processing the screen.
19:10:41 <petern> Hah, I still have a diff, from 2011.
19:11:49 <dP> out of scalers I saw so far upscayl on original graphics is my favourite
19:12:46 <petern> That wipes out quite a lot of detail.
19:14:30 <dP> petern: yeah, that it does, but it kinda has that cartoon-ish look
19:16:39 <dP> almost looks like a style, not just scaling artifacts
19:16:54 <andythenorth> all these things have the same smush
19:17:18 * andythenorth considered writing a pixel interpolator
19:17:52 <andythenorth> my maths isn't good enough
19:19:08 * andythenorth now addicted to rebasing this branch
19:19:28 <andythenorth> was 45 commits away from main, with conflicts every time I rebased to main for updates
19:19:31 <petern> Simutrans had a nice cartoonish set back in the day.
19:19:43 <andythenorth> now it's 6 commits from main, and doesn't conflict ๐
19:19:53 <andythenorth> I should get a git scouts badge
19:20:09 <petern> Are you rebasing chunks to avoid everything going wrong at once?
19:20:31 <andythenorth> I'm moving and squashing things
19:20:38 <andythenorth> and I wanted about 10 of the commits in main
19:21:01 <andythenorth> usually I only use rebase -i to hide mistakes ๐
19:26:26 *** gelignite has joined #openttd
19:41:31 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
19:53:17 <andythenorth> 45 commits -> 1 commit ๐
19:53:24 <andythenorth> wonder how many bugs I added
20:13:32 *** WormnestAndroid has quit IRC (Ping timeout: 480 seconds)
20:15:57 *** WormnestAndroid has joined #openttd
20:22:16 *** Wormnest has joined #openttd
20:29:44 <andythenorth> stations time? ๐
20:43:17 <petern> Hmm, I've clearly broken the sprite font somehow ๐
20:45:43 *** Flygon has quit IRC (Quit: A toaster's basically a soldering iron designed to toast bread)
20:48:13 <petern> e becomes H, O becomes 2. Smells like the character sprite index offset is getting applied twice.
21:14:27 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
21:21:35 <petern> Hmm, I think I see the issue. The mapping is not right, but normally it's hidden because the parent fontcache isn't called for ascii characters.
21:22:11 *** gelignite has quit IRC (Quit: Stay safe!)
21:27:14 <petern> GlyphID glyph = 3. That's a sprite ID, not a glyph ID. Hmm.
21:52:33 *** Wormnest has joined #openttd
21:53:36 <petern> Hmm, so it's mapped within Uniscribe somehow.
22:06:35 <petern> Yeah I have no clue where that happens :/
22:32:56 *** TallTyler has joined #openttd
22:32:56 <TallTyler> I'm working on a PR to add a "honk the horn" button after the other day's semi-serious (?) conversation and am having trouble updating openttd.grf to include my new sprite. The CMakeList in the baseset folder says it'll generate the GRF if NFORenum and GRFCodec are found...but where does it look?
22:40:12 <petern> In your $PATH, I would think.
22:41:19 <nielsm> yeah just "can we run the command grfcodec in the shell and get something that looks like a supported version of grfcodec running?"
22:42:28 <petern> Hmm, is there a cache of WChar or GlyphIDs to SpriteIDs that I'm missing somewhere...
22:43:26 *** HerzogDeXtEr has quit IRC (Read error: Connection reset by peer)
22:45:12 *** Wormnest has quit IRC (Ping timeout: 480 seconds)
22:51:57 *** Wolf01 has quit IRC (Quit: Once again the world is quick to bury me.)
23:01:36 <TallTyler> Okay, I've installed it in my path and it appears to be TRYING to generate it, but only makes an empty file `media/baseset/openttd/openttd.new`
23:15:33 <TallTyler> Maybe someone here can just build it for me?
23:15:49 <TallTyler> (It'll probably need to get redrawn eventually)
23:22:51 *** Wormnest has joined #openttd
23:23:14 <petern> Well you need a bit more than just the image.
23:25:37 <petern> Hmm, if I take out the uniscribe layouter then the sprite font works properly. Weird.
23:27:48 <TallTyler> Oh right, you also need this
23:28:27 <TallTyler> I can also just open a draft PR
23:30:46 <petern> Did you try building an unmodified one?
23:35:25 <TallTyler> I guess GRFCodec could be silently throwing an error
23:39:39 <TallTyler> Hmm, not sure how to force it to build openttd.grf
23:44:21 <TallTyler> I guess I could do it manually but I'd have to rearrange the baseset folder to make a sprites folder...
23:52:15 <TallTyler> `openttd.nfo:1: Warning: Found 9 more sprites than sprite 0 reports.`
23:54:23 <TallTyler> We're now up to 192 sprites
23:58:11 *** wallabra_ has joined #openttd
continue to next day โต