IRC logs for #openttd.dev on OFTC at 2014-04-12
⏴ go to previous day
02:02:18 *** tycoondemon2 has joined #openttd.dev
07:00:25 *** Alberth has joined #openttd.dev
07:00:25 *** ChanServ sets mode: +v Alberth
10:54:07 *** frosch123 has joined #openttd.dev
10:54:07 *** ChanServ sets mode: +v frosch123
10:57:51 *** mg_ has joined #openttd.dev
11:10:44 <planetmaker> I've some code changes. I didn't any reason to store tile_map.m1 bit7 as 'Industry is completed' state.
11:11:07 <planetmaker> Comments say, that it's (ab)used as animation state for some default instries, but I didn't find trace of that
11:11:43 <frosch123> the construction state is used for other stuf
11:12:09 <frosch123> yes, forest uses construction stage as animation, because it uses the same graphics
11:13:41 <Alberth> not sure if you should still store that 1 in bit 7, it seems a bit silly (but another patch perhaps?)
11:14:23 <planetmaker> it could instead be moved to another bit or stored elsewhere (maybe only in industry struct).
11:14:24 <frosch123> what are those patches doing?
11:14:40 <planetmaker> the 2nd is just some preparatory moving functions around
11:15:08 <planetmaker> the 3rd basically removes usage of the 'industry is finished bit'.
11:15:11 <frosch123> the last one doesn't even look like it would compile
11:15:23 <frosch123> how does the 3rd work?
11:15:26 <planetmaker> the 4th adds a (possibly) pointless handling of old savegames
11:15:52 <planetmaker> I wrote the 3rd in the assumption that I didn't find any abuse of the construction stages
11:16:16 <planetmaker> can you hit my head on where the forest does that, please?
11:18:26 <frosch123> ResetIndustryConstructionStage
11:18:48 <frosch123> followed by SetIndustryCompleted
11:19:10 <LordAro> patch 3 also has a baseset lang change, for some reason :p
11:19:37 <frosch123> there are two places in industry_cmd even
11:19:44 <frosch123> i think that stuff can even be used by newgrf
11:19:48 <frosch123> though likely noone knows :p
11:21:07 <frosch123> see your first patch
11:21:32 <frosch123> there are two palces where ResetIndustryConstructionStage is followed by SetIndustryCompleted
11:22:40 <frosch123> hmm, the second place does not call SetIndustryCompleted though, what's that :o
11:22:54 <frosch123> maybe that's a bug :p
11:23:15 <frosch123> ah, no that's how the silly animation works
11:23:34 <planetmaker> I looke at especially the 2nd, the gold mine, closely...
11:23:46 <frosch123> one is triggered by producion, some other in the loop
11:24:26 <frosch123> oh, original anim even changes the tiles on the map
11:24:39 <planetmaker> alright. The bit does not exactly have to go. I just wondered :)
11:25:43 <planetmaker> I might want to move it instead to the other free position in the map array
11:25:48 <frosch123> arctic forest seems to use the loop
11:25:55 <frosch123> why do you want to move it?
11:26:15 <planetmaker> I was planning the pony for andy, for the coastal vs. deep sea tile thingy
11:26:30 <planetmaker> and it needs some way to extend water class by one bit
11:26:40 <frosch123> i would recommend against using a new water class :p
11:26:56 <frosch123> you want to track distance to coast, don't you?
11:27:01 <planetmaker> it's a bit messy as I found out, yes. So when I half-finished that....
11:27:29 <planetmaker> ... I rather found the idea to not use a water class per-see. But rather a bit to cache 'shallow' vs. 'deep' sea
11:27:34 <planetmaker> but not bother with the water class
11:28:05 <frosch123> i had the plan to add more map arrays for caching information
11:28:24 <frosch123> stuff that you do not have to store in the savegame and do not have to send over the network
11:28:32 <frosch123> because you can recompute them on game load
11:28:33 <planetmaker> alternatively we could 'simply' use more height levels and introduce negative ones (or an offset)
11:28:35 <LordAro> more map arrays? that's a new one :L
11:28:57 <frosch123> stuff like "nearest town" and such
11:29:01 <planetmaker> yeah, that would fit that purpose quite well
11:29:25 <frosch123> LordAro: no, i have been telling that for 2 years :p
11:30:49 <planetmaker> nearest-town. shore-distance. what else?
11:31:06 <LordAro> frosch123, well i haven't heard it :p
11:31:36 <frosch123> planetmaker: there are some candidates which could be moved there, but which would also slightly alter the game behaviour
11:31:50 <frosch123> like field fences, snow line, half desert and such
11:32:09 *** Supercheese has joined #openttd.dev
11:32:09 *** ChanServ sets mode: +v Supercheese
11:32:30 <frosch123> they are currently updated in the tile loop, and in some cases they are exposed to gamestate-relevant stuff
11:32:33 <planetmaker> snow-line needs not moving. That's one global var, no? Or you want to cache height > snowline?
11:32:37 <frosch123> michi_cc: not the same
11:32:51 <frosch123> planetmaker: snow is not instant
11:33:18 <planetmaker> the big advantage would be that fields, for example, could be retained in winter
11:33:20 <michi_cc> frosch123: He can still finish it, can't he? :p
11:33:28 <frosch123> but it's one of those things which i have been wondering about to make instant
11:33:58 <frosch123> you, i have an identity crisis
11:34:11 <frosch123> i thought michi_cc was addressing me
11:34:19 * frosch123 needs to remember to not be lordaro
11:34:58 <frosch123> planetmaker: anyway, start slow :p
11:35:06 <LordAro> michi_cc, of course, but you think i can do that? :p
11:35:09 <frosch123> first coast distance, if you want
11:35:19 <LordAro> michi_cc, you should try to "work" with cirdan ;)
11:35:53 <planetmaker> ok, so temporary map array bytes :)
11:36:10 <frosch123> LordAro: competition! aren't you from a capitalist country?
11:36:19 <planetmaker> I scrap the bit7 stuff except the 1st codechange which simplifies it
11:36:40 <frosch123> planetmaker: you could extent the comments :)
11:37:07 <LordAro> michi_cc, i could likely rebase against current trunk, other than that, probably not a lot :L
11:39:17 <LordAro> frosch123, good lord :P
11:39:17 <frosch123> or even better: repost the video on the forums claiming it as yours
11:39:37 <planetmaker> would we cover it up? :P
11:40:00 <frosch123> well, we have no other use for it
11:40:06 <frosch123> on april 1st we only do serious stuff
11:42:06 <frosch123> LordAro: but if you post it, you should sync with V
11:42:34 <frosch123> so he can immediately call it a bad features, since it removes the game mechanic to build multiple tunnels/bridges due to higher signal distance
11:57:13 <planetmaker> frosch123, so you would add another tile struct like the currently saved extended tile, m7?
11:57:57 <frosch123> yes, something like TileCache
11:58:04 <frosch123> Tile + TileExtended + TileCache
11:59:10 <LordAro> of course, i could be completely wrong :p
12:00:48 <frosch123> doesn't michi separate stuff into surface and structure?
12:01:02 <frosch123> one surface, multiple structures
12:01:13 <frosch123> but well, in any case, not relevant to current discussion :p
12:02:27 <LordAro> i noticed "m7" and "tile struct", is all
12:02:44 <frosch123> well Tile is 8 bytes
12:03:04 <frosch123> an array with members of size 8 is a lot faster to access than one with size 9 or 10
12:03:42 <frosch123> and m single struct is accessed faster than
12:04:08 <frosch123> and multipel bytes in a single struct are accessed faster than single bytes in multiple arrays
12:04:13 <frosch123> due to memory caches
12:04:34 <frosch123> so, you have to trade out between putting stuff into the same struct and putting stuff into different arrays
12:18:08 *** Alberth has left #openttd.dev
12:47:05 <planetmaker> I like the water distance approach for that coastal shipping issue. It looks clean and *much* more versatile
12:47:16 <planetmaker> and we have most code for that already in place :)
12:47:27 <planetmaker> except the caching and actually using it for the ship PF
12:47:37 <frosch123> i have read certain pathfinders also want to know about that :p
13:45:41 *** Alberth has joined #openttd.dev
13:45:41 *** ChanServ sets mode: +v Alberth
21:22:17 *** Alberth has left #openttd.dev
continue to next day ⏵