IRC logs for #openttd on OFTC at 2016-10-11
            
00:15:08 <FLHerne> Samu: There's a patch for region-based ship pathfinding, which made an impressive difference
00:15:40 <Samu> oh, where
00:15:54 <FLHerne> Forum somewhere
00:16:06 <Samu> gonna try searcin
00:16:16 <FLHerne> I think the simplest way to speed things up would be to just store the next [n] steps per ship
00:17:06 <FLHerne> Currently (unless I missed something buried in all YAPF's templates), each ship has to calculate the entire route to its next order at every tile edge
00:17:48 <FLHerne> It then _throws away_ all but the immediately-next route, because of the junction-on-every-tile thing
00:18:24 <FLHerne> But because ships don't have signals and don't collide, the route never actually changes unless the player alters the landscape or moves a dock/buoy
00:18:42 <FLHerne> So there's an incredible amount of wasted computation
00:18:55 <FLHerne> Even without changing the actual pathfinding algorithm
00:21:12 <FLHerne> (n.b. I looked at this a few years ago, when I was fairly new to C++, so quite possibly wrong somewhere)
00:25:31 *** gelignite has quit IRC
00:25:48 <Samu> i got a ship heavy map, actually several ship heavy maps
00:25:55 <Samu> courtesy of NoNoCAB
00:26:03 <Samu> https://www.tt-forums.net/viewtopic.php?f=33&t=58905&hilit=region+based+ship+pathfinding&start=20 this is the topic right?
00:28:11 <FLHerne> Yes
00:28:23 <Samu> is 5000 ships enough?
00:28:25 <Samu> kek
00:29:09 <Samu> gah, that patch is so old it doesn't have a vs_140
00:29:21 <Samu> trunk, revision too old
00:31:09 <Samu> D:\OpenTTD\trunk\projects\settingsgen_vs100.vcxproj : warning : The build tools for Visual Studio 2010 (v100) cannot be found. To build using the Visual Studio 2015 (v140) build tools, either click the Project menu or right-click the solution, and then select "Upgrade Solution...". Install Visual Studio 2010 (v100) to build using the Visual Studio 2010 (v100) build tools.
00:31:13 <Samu> no wai
00:35:46 <Samu> does not build
00:35:50 <Samu> well, i give up
00:37:57 <Samu> conflicts everywhere t.t
01:05:48 *** FLHerne has quit IRC
01:21:29 *** Biolunar has quit IRC
01:31:07 *** JezK_ has joined #openttd
01:37:33 *** smoke_fumus has joined #openttd
02:02:56 <Wolf01> 'night
02:03:00 *** Wolf01 has quit IRC
02:56:27 *** JezK_ has quit IRC
03:02:15 *** glx has quit IRC
03:04:16 *** JezK_ has joined #openttd
03:17:01 *** Snail has joined #openttd
03:26:31 *** tokai has joined #openttd
03:26:31 *** ChanServ sets mode: +v tokai
03:33:14 *** tokai|noir has quit IRC
03:54:05 *** HerzogDeXtEr has quit IRC
04:28:53 *** Samu has quit IRC
04:43:32 *** Supercheese has joined #openttd
04:48:12 *** sim-al2 has quit IRC
05:51:44 *** Snail has quit IRC
06:18:19 *** Antheus_ is now known as Antheus
06:51:03 *** Ethereal_Whisper has quit IRC
07:27:59 *** Ethereal_Whisper has joined #openttd
07:31:34 *** keoz has joined #openttd
08:13:38 *** JezK_ has quit IRC
08:14:08 *** JezK_ has joined #openttd
08:18:34 *** keoz has quit IRC
08:26:18 *** sla_ro|master has joined #openttd
08:42:06 *** smoke_fumus has quit IRC
08:43:54 *** goblin has quit IRC
08:44:00 *** goblin has joined #openttd
08:50:58 *** keoz has joined #openttd
09:00:35 *** Biolunar has joined #openttd
09:05:57 *** keoz has quit IRC
09:10:54 *** Supercheese has quit IRC
09:24:05 *** zeknurn` has joined #openttd
09:26:56 *** zeknurn has quit IRC
09:26:56 *** zeknurn` is now known as zeknurn
09:38:20 *** JezK_ has quit IRC
11:03:14 *** JacobD88 has joined #openttd
11:10:25 *** Wolf01 has joined #openttd
11:10:43 <Wolf01> o/
11:41:29 <Wolf01> http://betanews.com/2016/10/10/samsung-global-shutdown-sales-exchanges-galaxy-note7/ ha
12:10:35 *** sla_ro|master has quit IRC
12:15:31 *** andythenorth has joined #openttd
12:15:39 <Wolf01> o/
12:17:49 <andythenorth> o/
12:21:27 <Wolf01> "roads can have up to four owners (railroad, road, tram, 3rd-roadtype "highway")" <- what is that?
12:21:56 <Wolf01> From a comment in LandInfoWindow
12:23:07 <andythenorth> legacy
12:23:33 <andythenorth> there was a partial implementation of ‘highway’ which got removed at some point
12:23:45 <andythenorth> presumably used a 3rd bit
12:24:08 <andythenorth> railroad owning road - that’s likely level crossings, or a mistake
12:24:32 <andythenorth> ‘owners’ looks wrong here anyway, should be ‘types’
12:24:46 <andythenorth> unless I misunderstand context
12:24:55 <Wolf01> No, it's in the owner part of the code
12:25:05 <andythenorth> ok, so it’s looking to find the owner of each type, I assume
12:25:10 <Wolf01> Yep
12:25:26 <Wolf01> I'm looking for showing the right type for road now
12:25:27 <andythenorth> in our design, there are only 2 roadtype owners, and a possible rail owner
12:25:52 <Wolf01> Yup
12:26:12 <Wolf01> Mmmh, I think I didn't set the _m[y].type right
12:26:18 <Wolf01> *_m[t]
12:27:31 <Wolf01> But where does it set type? Not in road_cmd, not in road_map
12:27:56 <Wolf01> Oh, SetTileType
12:28:18 <Wolf01> I don't know why it didn't found it
12:28:26 <andythenorth> somewhere near here is the fun path into how bridgeheads work ;)
12:28:37 <andythenorth> but you’ll find that in good time :)
12:28:47 <Wolf01> MP_ROAD, ///< A tile with road (or tram tracks)
12:28:49 <Wolf01> Meh
12:28:53 <andythenorth> Wolf01: we are closer to bits of the code now that I patched before
12:29:02 <Wolf01> Yes
12:29:03 <andythenorth> I am working currently, but would be able to look at more of this stuff later
12:29:35 <Wolf01> No problem, I have plenty of time today
12:30:22 <Wolf01> Should we split MP_ROAD too?
12:30:38 <Wolf01> Or maybe I could just check for bits in m4
12:31:31 <andythenorth> I wouldn’t split MP_ROAD
12:31:46 <andythenorth> there are about 500 places that might affect, in vehicle routing + movement
12:31:48 <andythenorth> also GS and AI
12:31:52 <andythenorth> not necessary
12:31:58 <andythenorth> just unpack when needed
12:32:21 <andythenorth> or to quote frosch on this question when I asked him
12:32:23 <andythenorth> “[4:30pm] frosch123: be careful of balrogs”
12:32:37 <Wolf01> :)
12:33:11 <Wolf01> I already found one or two orcs patrols
12:54:27 <Wolf01> Ok, and there it is the same critical point I found yesterday evening: what GetRoadTypes() should return?
12:55:16 <andythenorth> if it was python, it would return a structure like a dict or list
12:55:18 <andythenorth> or an object :P
12:55:19 <Wolf01> In vanilla it returned a RoadTypes flags, but now we want more stuff
12:55:28 <andythenorth> and then the calling function would unpack as needed
12:55:43 <andythenorth> we could return something bitstuffed?
12:55:53 <andythenorth> and unpack as needed?
12:55:58 * andythenorth out of depth
12:56:00 <Wolf01> We are already unpacking the roadtype id to base type and sub type
12:56:09 <andythenorth> ah ok
12:56:17 <Wolf01> I would return an array of roadtype ids
12:56:39 <andythenorth> seems fair
12:57:03 <Wolf01> Or a uint16 with the 2 ids
12:57:57 <Wolf01> It looks really complicate for a so basic need
12:59:33 <Wolf01> Maybe I even made the RoadTypeIdentifier struct wrong, it should have packed both roadtype and tramtype in a single variable, but it's not usable for grf stuff that way
13:00:04 <Wolf01> I'm starting to understand why there are RoadType and RoadTypes enums
13:00:24 <Wolf01> Maybe I need to make another struct for the map related functions
13:00:39 <Wolf01> And return that one
13:01:48 <andythenorth> yeah, it took me a while to figure out why there is RoadType and RoadTypes :P
13:01:53 <Wolf01> So I'll initialise it with "0000 0000" && roadbits and it returns "you have a base road with subtype 0"
13:02:24 <andythenorth> and if roadbits are 0, then it’s ‘no road’?
13:02:28 <Wolf01> Yes
13:04:07 <Wolf01> It's something like "m4 (roadtypes) operator m5 (roadbits) operator m3 (trambits)"
13:19:36 <V453000> still attempting to make blender my bitch via python commands, shouts and stuff
13:19:38 <V453000> hell WTF
13:20:02 <andythenorth> “V453000 is now devloloper”
13:20:29 <V453000> is offended
13:20:32 <V453000> artists are developers too
13:21:15 <andythenorth> ‘artist’
13:21:29 * andythenorth is a piss artist
13:21:30 <andythenorth> :P
13:21:47 * andythenorth wonders if that slang is translateable
13:23:09 <andythenorth> that’s what wikis are for https://en.wiktionary.org/wiki/piss_artist
13:26:19 <Wolf01> I'm a piss developer too
13:30:51 <Wolf01> https://paste.openttdcoop.org/padmgkfwe ?
13:31:21 <Wolf01> Ha! I made a mistake
13:32:14 <Wolf01> https://paste.openttdcoop.org/pj4zarksi
13:33:06 <Wolf01> And another one, but I wont fix that in paste
14:07:45 *** andythenorth has quit IRC
14:32:34 <Wolf01> Mmmh, teddy bear is not enough, I need a tutor here
14:33:18 <Wolf01> I need to make a set of functions to work with the RoadTypeIdentifiers
14:34:09 <Wolf01> For example RoadTypeIdentifier to RoadTypeIdentifiers, but I can't decide if it only converts the current RoadTypeIdentifier or could even merge more
14:34:33 <Wolf01> As the RoadType to RoadTypes can work with flags
14:34:56 <Wolf01> So you can do RoadTypeToRoadTypes(rt | ROADTYPE_TRAM)
14:35:08 <Wolf01> But I can't "or" 2 structs
14:35:49 <Wolf01> Any ideas?
15:04:47 *** supermop has joined #openttd
15:13:03 *** Snail has joined #openttd
15:38:15 *** andythenorth has joined #openttd
15:42:40 <supermop> yo
15:43:03 <andythenorth> lo
15:43:11 <Wolf01> o/
15:45:52 <supermop> back to work from several days of festivalling
16:22:43 *** keoz has joined #openttd
16:23:29 <Wolf01> andythenorth, I made some functions and a struct to work with tiles, I think we should use the struct everywhere in place of the various functions and add many more methods to the struct
16:23:53 * andythenorth learns about structs
16:24:49 <andythenorth> oh a struct is a bit like declaring a dumb object
16:24:58 <Wolf01> Yes
16:25:27 <andythenorth> so we’d give it props and read the props when needed
16:26:13 <Wolf01> No, this one is for tiles, it tells which roadtypes are on a tile in place of the old enum
16:26:28 <andythenorth> right ok
16:26:47 <Wolf01> For props you just GetRoadTypeInfo() :P
16:27:53 <Wolf01> I think I made a mistake somewhere because roads seem to work, but not trams, bits in m4 aren't set for trams
16:29:14 *** Gja has joined #openttd
16:37:26 *** JacobD88 has quit IRC
16:42:56 *** JacobD88 has joined #openttd
16:48:35 *** JacobD88 has quit IRC
17:11:24 <andythenorth> bbl
17:11:24 *** andythenorth has left #openttd
17:14:06 *** sla_ro|master has joined #openttd
17:38:54 *** Samu has joined #openttd
18:43:09 *** TheMask96 has quit IRC
18:44:41 *** TheMask96 has joined #openttd
18:53:16 *** Alberth has joined #openttd
18:53:16 *** ChanServ sets mode: +o Alberth
19:03:30 *** andythenorth has joined #openttd
19:03:46 <Alberth> o/
19:04:03 <andythenorth> lo
19:04:09 <Wolf01> o/
19:04:32 *** glx has joined #openttd
19:04:32 *** ChanServ sets mode: +v glx
19:05:39 *** gelignite has joined #openttd
19:05:56 <Samu> @calc 1 << 240
19:05:56 <DorpsGek> Samu: Error: Something in there wasn't a valid number.
19:06:01 <Samu> :(
19:08:40 <Samu> Milek7_: how did you managed company offering itself to others for a price?
19:09:22 <Samu> will take a look brb
19:13:46 <Alberth> Samu: 1766847064778384329583297500742918515827483896875618958121606201292619776
19:14:19 *** mikegrb has quit IRC
19:15:03 <Samu> there is no int256, i guess
19:15:14 <Samu> uint
19:15:25 <Wolf01> uint256 lol
19:16:45 <andythenorth> Wolf01: anything new? o_O
19:17:01 <Wolf01> Committed what I've done, nothing else :P
19:17:25 <Wolf01> Watched some Game of Thrones S6 episodes
19:18:00 <andythenorth> is it known that tram construction asserts? o_O
19:18:28 <Wolf01> Could be, the bots are wrong, I must have made a mistake somewhere, but too sleepy to find it
19:18:33 <Wolf01> *bits
19:19:00 * Wolf01 writing with claws is not easy
19:21:06 <Samu> c->bankrupt_asked.set(c->index, true); // Don't ask the owner
19:21:12 <Samu> ah i see what you did, a function
19:21:39 <Samu> or structure, or whatever the heck that is
19:23:25 *** sim-al2 has joined #openttd
19:28:35 *** frosch123 has joined #openttd
19:28:37 <andythenorth> c->cat
19:28:42 <andythenorth> also quak()
19:29:29 <frosch123> this->greet()
19:29:55 <Wolf01> me->dinner()
19:30:08 <Wolf01> Also echo "quak"
19:30:18 <andythenorth> printf(“quak”)
19:30:31 <andythenorth> syntax error: missing ;
19:38:16 <Samu> roadrunner reached 2051, finally!
19:43:50 <Samu> meh, minimal differences, I guess nothing really changed
19:46:51 *** Progman has joined #openttd
19:50:15 *** sla_ro|master2 has joined #openttd
19:54:01 *** sla_ro|master has quit IRC
19:56:00 *** mikegrb has joined #openttd
19:59:33 *** Arveen has joined #openttd
20:09:53 <Milek7_> Samu: i used custom Bitset class
20:10:16 <Milek7_> defined in bitmath_func.hpp
20:11:08 <Milek7_> didn't used std::bitset because it doesn't expose internal structure for savegames
20:23:57 <Wolf01> andythenorth, back to work, I should fix that trams assert
20:23:57 *** goblin has quit IRC
20:28:21 <Wolf01> andythenorth, where does it asserts?
20:28:44 <andythenorth> Wolf01: just finishing some work, but will look shortly
20:34:22 *** OsteHovel has joined #openttd
20:38:07 *** OsteHove` has quit IRC
20:45:38 <Wolf01> Ok, found it, I put an assert there because I didn't know how to handle the situation
20:45:53 *** frosch123 has quit IRC
20:49:45 <andythenorth> Wolf01: what’s the situation? o_O
20:49:54 <Wolf01> 2 trams on the same tile
20:49:59 <Wolf01> And 2 roads too
20:50:06 <andythenorth> invalid?
20:50:08 <Wolf01> Not possible at the moment
20:50:35 <andythenorth> 1 tramtype, 1 streettype per tile
20:50:42 <andythenorth> not more
20:51:32 <andythenorth> or do I misunderstand the issue? o_O
20:51:44 *** keoz has quit IRC
20:52:08 <Wolf01> No, that's right
20:53:06 *** Samu has quit IRC
20:57:31 <andythenorth> Wolf01: I figured we’d look at the over-building behaviour from railtypes and steal it
20:58:10 <Wolf01> Yes, removing the assert already does it
20:58:28 <Wolf01> It could be used for the convert tool
20:59:45 <Wolf01> If you are sure that you want to be able to overbuild a roadtype with one of the same base type, we can avoid any further test and remove the assert
21:01:43 <Wolf01> But on creating a RoadTypeIdentifiers structure I'll leave the assert there, you can't create a couple TRAM+TRAM or ROAD+ROAD
21:02:07 <Wolf01> On merge it's ok to overwrite the type
21:07:46 <andythenorth> definitely ok to overbuild with same basetype afaict
21:08:01 <andythenorth> and yeah ROAD+ROAD is all kinds of wrong :)
21:09:03 <Wolf01> We will need to decide what to do with asphalt road + dirt road crossings
21:09:19 <andythenorth> tricks
21:09:25 <andythenorth> seen how rail catenary works?
21:09:32 <andythenorth> elrail will fill gaps
21:09:40 <Wolf01> Yes
21:09:55 <andythenorth> we’ll do some complex function reading the track bits
21:10:15 <andythenorth> actually no, simpler
21:10:26 <Wolf01> You will need to read road bits outside of the current tile
21:10:35 <andythenorth> yeah, that’s not worth it
21:10:45 <andythenorth> if the tile contains dirt road, draw dirt road
21:10:55 <andythenorth> if it contains asphalt, draw asphalt
21:10:59 <Wolf01> Also, it's asphalt with dirt over or dirt with traces of asphalt at the sides?
21:11:16 <andythenorth> it’s all asphalt or all dirt on that tile
21:11:18 <andythenorth> for all track bits
21:11:20 <andythenorth> no magic
21:11:25 <Wolf01> Yup
21:11:36 <andythenorth> simple
21:12:05 <Wolf01> The first one built is the base... but this mean the previous assertions are invalid
21:12:19 <Wolf01> = you can't overbuild a tile
21:12:54 <Wolf01> Because if you drag a dirt road over an asphalt road, you will get a dirt intersection
21:13:06 <Wolf01> You are free to do it, like rails
21:13:40 <Wolf01> We can't have both behaviours
21:14:15 <Wolf01> I'll do it like rails = overbuild possible, it's your decision on how the crossing will appear
21:14:33 <Wolf01> Your = player
21:22:00 <andythenorth> yeah if you drag over an existing road, it’s overbuilt
21:22:14 <andythenorth> if the types are incompatible for vehicles, build a bridge :P
21:22:34 <Wolf01> :)
21:23:38 <Wolf01> Like narrow gauge over high speed track with catenary
21:24:29 <andythenorth> might be carnage if towns or AIs cross your road :P
21:24:45 <andythenorth> let’s worry about that later
21:32:00 <Wolf01> I'm cleaning up the code and writing docs, I'll commit soon
21:32:27 *** Samu has joined #openttd
21:32:30 <Samu> updated topic https://www.tt-forums.net/viewtopic.php?f=65&t=74943&p=1171159#p1171159
21:33:22 <glx> or you could have a kind of priority so dirt < asphalt but probably hard to manage
21:33:59 *** seatsea has joined #openttd
21:34:38 <Wolf01> Could be managed with sorting
21:35:27 *** seatsea has quit IRC
21:35:56 *** seatsea has joined #openttd
21:36:12 *** sla_ro|master2 has quit IRC
21:41:14 <andythenorth> sorting is hard to explain to player
21:41:28 <andythenorth> and newgrfs might have conflicting sort orders
21:41:43 <Wolf01> Yes, I thought that too
21:41:44 <andythenorth> stick to simple
21:42:26 <andythenorth> railtypes is pretty bullet proof [except for newgrf authors ideas] :)
21:42:31 <Wolf01> Committing.... Done
21:42:50 <Wolf01> You can use the land area info tool now
21:43:26 <Wolf01> It tells you which road sub type is in the tile, but not yet if there are road+tram
21:43:31 *** HerzogDeXtEr has joined #openttd
21:45:02 <andythenorth> cool
21:50:00 <Samu> rails with water do have a few conflicts
21:50:17 <Samu> i created some patches about it
21:52:39 <Samu> I didn't fix the pbs conflict thing, was told it doesn't matter what vehicle is on the other part
21:53:43 <Samu> but the vehicle could be a ship :(
21:53:48 <Samu> and not a train
21:59:41 *** Samu has quit IRC
22:17:17 *** Arveen has quit IRC
22:19:10 *** Alberth has left #openttd
22:33:16 * andythenorth bed
22:35:57 *** andythenorth has left #openttd
23:18:09 <Wolf01> Note for andy: trains do not let overbuild :P
23:24:03 *** gelignite has quit IRC
23:36:48 *** seatsea has quit IRC
23:41:29 *** Progman has quit IRC
23:42:01 *** CompuDesktop has quit IRC
23:42:50 *** keoz has joined #openttd
23:51:08 *** Compu has joined #openttd