IRC logs for #openttd on OFTC at 2016-03-28
            
00:25:33 *** roidal has quit IRC
00:27:41 <Wolf01> 'night
00:27:46 *** Wolf01 has quit IRC
00:37:46 *** Hiddenfunstuff has quit IRC
00:46:15 *** Wormnest__ has quit IRC
00:56:03 *** Tirili has quit IRC
00:58:12 *** Progman has quit IRC
01:06:26 *** gelignite has quit IRC
01:12:48 *** Biolunar has joined #openttd
01:17:17 *** drac_boy has joined #openttd
01:17:18 <drac_boy> hi
01:24:13 <Samu> hi
01:25:58 *** Myhorta has quit IRC
01:26:22 <Samu> OpenTTD\scripts - what are these scripts located in this folder called? server scripts? game scripts?
01:30:34 <Samu> I need help to create a script that can execute the 'startai' console command when an AI company goes bankrupt, to always have 15 AIs running and overcome the limitation of 14.
01:49:00 *** mescalito has joined #openttd
02:24:52 * drac_boy is wondering whats with this rather small locomotive heh https://c4.staticflickr.com/8/7566/15959364255_2921ea4aac_z.jpg
02:25:18 <drac_boy> and is that stack tall just cause of the wagons? ;)
02:30:01 *** smoke_fumus has quit IRC
02:34:40 <drac_boy> also if anyone could, when they see sim-a12 again give him this https://farm5.staticflickr.com/4004/4209942820_0b80287c7b_z.jpg and tell him its re that subject on homeconverted electrics in the old days heh
02:49:27 *** Quatroking has quit IRC
03:29:20 <Samu> Is there a build that lets me increase max_no_competitors = 14 to 15?
03:29:41 <Samu> at least, for dedicated servers
03:51:24 *** drac_boy has left #openttd
04:18:10 *** Biolunar_ has joined #openttd
04:25:07 *** Biolunar has quit IRC
04:30:01 *** Clockworker__ has joined #openttd
04:35:02 <sim-al2> That vehicle looks very safe and well-built...
04:36:35 *** Clockworker_ has quit IRC
05:05:19 *** glx has quit IRC
05:34:42 <Flygon> * drac_boy is wondering whats with this rather small locomotive heh https://c4.staticflickr.com/8/7566/15959364255_2921ea4aac_z.jpg
05:34:50 <Flygon> Looks 1840s-1850s era
05:35:24 <Samu> heu
05:35:45 <Flygon> Samu: Not sure, sorry :(
05:35:55 <Samu> http://git.openttd.org/?p=branches/1.6.git;a=blame_incremental;hb=17487321c4644d58c8fcced19a5f9cebc479870b;f=src%2Ftable%2Fsettings.ini#l106
05:37:27 <Samu> wish i could compile now... with a change to that line to this - "max = MAX_COMPANIES"
05:40:06 <Samu> that would let me set 15 AIs, I believe
05:43:41 *** Samu has left #openttd
05:55:26 *** liq3 has joined #openttd
06:16:57 *** HerzogDeXtEr1 has quit IRC
06:38:37 *** Snail has quit IRC
07:04:28 <Eddi|zuHause> i definitely do not get osx :/
07:11:08 *** Clockworker_ has joined #openttd
07:18:43 *** Clockworker__ has quit IRC
08:49:53 *** andythenorth has joined #openttd
08:49:54 *** frosch123 has joined #openttd
08:54:05 *** Supercheese has quit IRC
09:00:41 *** andythenorth has quit IRC
09:09:16 *** juzza1 has quit IRC
09:10:07 *** sla_ro|master has joined #openttd
09:16:51 *** andythenorth has joined #openttd
09:16:56 <andythenorth> o/
09:18:57 *** Alberth has joined #openttd
09:18:57 *** ChanServ sets mode: +o Alberth
09:19:23 *** Pikka has joined #openttd
09:20:05 <andythenorth> :o
09:20:09 <andythenorth> everyone is here :o
09:20:38 <Alberth> enjoy the moment? :)
09:20:55 <andythenorth> small things make the life
09:23:10 <peter1138> hmm, breakfast... easter egg or cereal?
09:23:42 <andythenorth> what kind of cereal is it?
09:25:37 <Alberth> make it brunch, and have both?
09:29:11 <andythenorth> http://git.openttd.org/?p=trunk.git;a=blob_plain;f=docs/landscape_grid.html;h=d34fe9840c9777b4f480142714c731779537b5ac;hb=HEAD
09:29:26 <andythenorth> is m1 5-7 free for all cases road needs?
09:29:37 <andythenorth> I think it is, but eh
09:33:06 <Alberth> looks like it
09:33:31 <Alberth> trees can have catenary too, nice :)
09:34:04 <andythenorth> didn’t you ask for electric trees a few days ago? o_O
09:34:45 <Alberth> yep, and you made it possible, such a nice gift :)
09:35:15 <Alberth> does mean a ground tile with catenary can get a tree
09:35:38 <andythenorth> if I make this patch
09:35:48 <andythenorth> I will include an ‘electric trees’ easter egg :P
09:35:56 <Alberth> :D
09:36:05 <andythenorth> available to build only during April :P
09:36:25 <andythenorth> ho, April 1 approaches, I should make a proper FIRS release soon
09:36:26 <Alberth> if connected from the powerplant, and build in April... :)
09:42:00 <planetmaker> \o
09:42:07 <Alberth> moin
09:46:44 <andythenorth> if I make unwise choices about bit ranges, that can be fixed later, eh? :P
09:47:24 <Alberth> yep, add functions to get and set the bits from the tiles, then it's just a matter of changing those functions
09:50:23 * andythenorth stops bikeshedding bit ranges :)
10:09:20 <Alberth> haha "Extreme" as economy name :)
10:10:10 <Alberth> /me makes it eXXtreem
10:13:22 *** sim-al2 has quit IRC
10:14:12 <Rubidium> andythenorth: road stops do not have m1 5-6 free
10:14:33 <andythenorth> they inherit from station?
10:15:05 * andythenorth assumes
10:15:13 *** Defaultti has quit IRC
10:15:19 *** Progman has joined #openttd
10:15:41 <andythenorth> judging by the current roadtype implementation, the bits used don’t have to be consistent across all the relevant tile types?
10:16:09 <Rubidium> GetFloodingBehaviour uses GetWaterClass unconditionally, so the water class bits are important for all station objects
10:19:13 <Alberth> andy, indeed, that's why you have access functions. Same bits is nice for understanding but not a hard requirement
10:21:58 *** Defaultti has joined #openttd
10:25:13 <Pikka> isit roadtypes?
10:25:14 *** Progman_ has joined #openttd
10:25:44 *** Progman_ has joined #openttd
10:27:09 *** Progman has quit IRC
10:27:18 *** Progman_ is now known as Progman
10:30:15 <Alberth> for some value of roadtypes, yes
10:31:50 <andythenorth> Pikka: it is trams with and without catenary
10:31:59 <andythenorth> and doing that _might_ cause other types
10:32:08 <Pikka> fancy
10:32:21 <andythenorth> if I can do it
10:44:48 *** Wolf01 has joined #openttd
10:44:58 <Wolf01> o/
10:45:03 <andythenorth> lo Wolf01
10:45:52 <Alberth> moin
10:47:22 *** Hiddenfunstuff has joined #openttd
10:59:27 *** Myhorta has joined #openttd
11:07:10 <andythenorth> can the presence of each roadtype be inferred from the road layout bits?
11:07:42 * andythenorth wonders why 2 additional bits are used for road, tram which add no more information than the presence of layout bits
11:08:19 <peter1138> don't do it
11:08:42 <Wolf01> https://youtu.be/2s4TqVAbfz4 this is easier to understand
11:10:27 <andythenorth> what do I miss? o_O
11:10:47 <Wolf01> 4d is easier than roadtypes
11:12:46 <andythenorth> if bits set for road, there’s road
11:12:50 <andythenorth> if bits set for tram, there’s tram
11:12:54 <andythenorth> save 2 other bits
11:12:58 <andythenorth> where’s the loss? o_O
11:13:30 <Alberth> increased complexity of figuring out what you have?
11:13:31 <Wolf01> you can have road in one direction and tram in another
11:13:50 <Wolf01> it's like you have infinite layers of road
11:13:51 <andythenorth> yeah, there are 2 sets of bits
11:13:56 <andythenorth> so that’s covered
11:14:23 <Wolf01> also, you need to intersect with railtypes
11:14:34 <Wolf01> or disable crossings at all
11:14:57 <andythenorth> I’m not proposing doing it this way, it won’t work if the types are more than ROAD, TRAM
11:15:08 <andythenorth> I’m curious why it wasn’t done this way already
11:15:18 <andythenorth> probably lost in the depths of time eh?
11:15:18 <Wolf01> road with tram with catenary with level crossing on bridgehead
11:16:23 <Wolf01> probably lost in headaches
11:16:57 <andythenorth> nah, you’re right, it’s the bridge case (and probably others), no road layout bits there
11:17:48 <Wolf01> (like I never tried and failed miserably :P)
11:20:11 <andythenorth> what did you attempt? o_O
11:20:54 <Wolf01> the same you ar doing now, but it might be easier now... or more difficult
11:21:24 <andythenorth> how many types did you attempt to add?
11:22:20 <Wolf01> just one more
11:23:09 <Wolf01> freeways (automatically built like one way roads)
11:27:29 *** Samu has joined #openttd
11:27:39 <Samu> hi
11:34:34 <andythenorth> Wolf01: for a while there was ROADTYPE_HIGHWAY or such lying around the code. Was that you? :)
11:34:38 <andythenorth> painful memories?
11:34:56 <Wolf01> no, I never submitted the patch
11:35:32 * andythenorth is in the over-confident phase of this attempt
11:35:44 <andythenorth> there are only 59 uses of GetRoadTypes, how hard can it be? o_O
11:36:25 <Samu> @logs
11:36:25 <DorpsGek> Samu: http://irclogs.qmsk.net/channels/openttd
11:36:30 <Samu> keks
11:36:59 <Wolf01> like there are only like 12 uses of day ticks but no daylength patch worked reliably
11:37:26 <andythenorth> that’s only 59 places to check the logic for, understand why it’s done that way, test it, and find the old and new edge cases :P
11:37:52 <andythenorth> one a week, it will be done April 2017
11:38:25 <Alberth> I doubt all 59 are unique :)
11:38:48 <andythenorth> hopefully not
11:38:53 <Wolf01> ottd needs unit tests, so when you change a core function you can be sure it works the same way at least for the original cases
11:38:58 *** Quatroking has joined #openttd
11:39:21 <Wolf01> trying everything by hand is what stopped me at a certain point
11:39:35 <andythenorth> it does get tedious
11:39:43 <andythenorth> compile, start new game, build stuff
11:40:13 <Wolf01> you might end up with correctly laying roads in strange positions without glitches, but as soon you attempt to run a vehicle over it it doesn't work as expected
11:40:48 <andythenorth> nah
11:41:05 <andythenorth> I’m keeping scope too limited for that, I hope :D :o
11:41:11 *** Ketsuban has quit IRC
11:41:35 <Wolf01> I did that with stations on slopes, but I was blocked because trains ran down the steep edge at the end (if you put a rail there)
11:41:44 *** Biolunar_ has quit IRC
11:42:15 <Wolf01> drive-through road stops worked really well, they only missed the right graphics
11:43:11 <andythenorth> the train bug is the same as building rail stations perpendicular to slope direction
11:43:21 <andythenorth> I’ve seen it, looks very neat
11:43:50 <Samu> I have a request/question -> http://irclogs.qmsk.net/channels/openttd/link/1459136155#1459136155
11:45:37 <Wolf01> I wanted to add grf flags to let only build stations in plain even on slopes, but somebody raised complaints about "if you remove the grf you'll trigger unwanted behaviours"... you aren't supposed to remove a grf from a running game
11:48:57 <Wolf01> http://www.tt-forums.net/download/file.php?id=104375 :D
11:52:25 <Alberth> Samu: it's easier if you just repeat the qeustion
11:52:25 <Alberth> Also, what makes you think it's safe to change that? Limits usually exist for a good reason, in my experience
11:54:25 <Alberth> and quite likely, the limit is silently assumed to exist in other places in the code, so you'd need to check every use of company numbers to make sure it's safe
11:55:35 <andythenorth> my current headfuck is disambiguating ‘road’ and ‘road'
11:56:02 <andythenorth> interchangeably it means the grey thing with white tiles that is used by vehicles that have ROADTYPE_ROAD
11:56:13 <andythenorth> and also it means road tiles, and everything to do with road, including trams
11:56:21 <andythenorth> and in other places, trams have specific handling
11:56:30 <peter1138> Wolf01, curved stations!
11:56:37 <peter1138> like i did about 10 years ago ;(
11:56:45 <Wolf01> me too :P
11:56:49 <Samu> okay, my main issue is: I want to start a server that will always run 15 AIs
11:57:13 <Wolf01> but I didn't get them to work, so I started the sloped ones
11:57:32 <Samu> I edited game_start.scr and typed 15 lines with 'StartAI'
11:57:35 <andythenorth> so does DrawTramCatenary become DrawRoadCatenary? Or DrawRoadTramCatenary :P
11:57:46 * andythenorth could roll a dice, then rely on find-replace
11:57:54 <Wolf01> I was pissed off by not being able to put buffers on the last piece of a raised station
11:58:05 <Samu> 15 AIs are launched when starting the server, but there is a problem when one of the AIs bankrupts
11:58:24 <Samu> it is never replaced, because of the hard limit being 14´
11:58:35 <Wolf01> andy, it should become "DrawCatenary"
11:58:58 <Samu> what can I do?
11:59:09 <Wolf01> let it generic, it might be used without tram in future
11:59:26 <andythenorth> DrawCatenary is ambigous, especially for bridges/tunnels
11:59:29 <andythenorth> due to rail
11:59:29 <Wolf01> also without road
11:59:43 <andythenorth> I ran into this already with HasCatenary
11:59:46 <Alberth> what catenary are you drawing?
11:59:51 <andythenorth> tram or road
12:00:10 <Wolf01> so why don't you unify the functions for rail and road? if you pass a roadtile you can skip the diagonal directions
12:00:54 <andythenorth> well that could work
12:01:12 <andythenorth> but I think the unified function is really two functions, hidden by a very large if/else
12:01:31 <Wolf01> also I remember an ambitious project to add diagonal roads
12:04:10 <Wolf01> I agree, but it's weird to check in really different places for code which almost does the same
12:05:56 <andythenorth> so looks like railtype has a DrawCatenary() method
12:06:28 <andythenorth> which lives in elrail.cpp
12:06:31 <andythenorth> that would need moved
12:06:35 <Wolf01> I like a bit of polymorphism, like when you have a DrawShape(Shape s, Point p)
12:06:37 <andythenorth> hmm patch gets big fast eh?
12:07:10 <Wolf01> yes, you need to think lots of things to prepare the terrain before starting the real patch
12:08:21 *** sla_ro|master has quit IRC
12:09:02 <andythenorth> I would rather unify after testing the gameplay effect tbh
12:09:10 * andythenorth will just name everything RoadTramFoo
12:09:16 <andythenorth> because it’s easy to refactor that
12:14:25 <Samu> can a GameScript (GS's) execute console commands?
12:14:41 <Samu> like those busybees
12:14:48 <Samu> and such
12:15:43 <Alberth> https://nogo.openttd.org/api/trunk/ <-- this is what a GS can do
12:20:47 <Samu> GSEventCompanyBankrupt
12:21:32 <Samu> A Company bankrupts, startai
12:21:41 <Samu> now translating this into code lol
12:26:43 *** Myhorta has quit IRC
12:35:43 <Samu> nevermind
12:37:06 <Samu> is there a guide for configuring the OpenTDD\scripts files?
12:44:30 <Samu> i had an idea, but i bet this will cause more trouble
12:45:46 <Samu> inside game_start.scr: "startai", "exec game_start.scr"
12:46:00 <Samu> it keeps executing "startai" indefinitely, right?
12:46:23 <Samu> gonna try
12:47:48 <andythenorth> hmm
12:50:56 <andythenorth> ROADTYPE_ROAD and ROADTYPE_TRAM are also used frequently to access the road bits
12:51:06 <andythenorth> GetRoadBits(tile, ROADTYPE_TRAM)
12:51:58 <andythenorth> simply adding more types to the list will fail hard
12:54:17 *** Pikka has quit IRC
12:56:30 *** Arveen has joined #openttd
12:58:56 <Samu> openttd crash
12:59:07 <Samu> doesn't work
12:59:47 <andythenorth> conceptually, I either need a new entity, like a road subtpye
13:00:29 <andythenorth> or I need to patch some functions so that, e.g ROADTYPE_TRAM_ELECTRIFIED resolves to ROADTYPE_TRAM, but only exactly when it needs to, and never any other times
13:02:37 *** smoke_fumus has joined #openttd
13:04:00 <Samu> should I report this crash?
13:05:52 <Alberth> don't think so
13:06:10 <Samu> it's quite easy to reproduce
13:06:33 <Alberth> I have no doubt about that
13:06:37 <Samu> inside game_start.scr, type exec ./scripts/game_start.scr
13:06:52 <Samu> then launch openttd, click new game > crash
13:07:12 <Alberth> but things can't usefully be protected against infinite recursion
13:07:37 <Alberth> it falls in the category "don't do that"
13:07:42 <Samu> :) ok
13:19:41 <Samu> can i execute a timed console command somewhere in the script files? Every x seconds > startai
13:20:53 <frosch123> have you ever looked at ai settings?
13:21:24 <Samu> no
13:21:53 <frosch123> then try to find a pattern in what is the first setting of every ai
13:27:27 <andythenorth> are tram and road different roadtypes or different routetypes?
13:32:45 <Samu> AdmiralAI = start_date=1 - is this what you're refering to?
13:36:33 * andythenorth proposes RoadSubtype and TramSubtype
13:36:48 <andythenorth> subtypes make me itch, due to cargos :P
13:38:32 <andythenorth> what is RoadTypes (L36 in road_type.h) trying to provide?
13:38:51 <andythenorth> ROADTYPES_ROAD is 1 shifted by 0?
13:43:51 <Alberth> mapping from integer numbers to bit pattern
13:44:07 <Alberth> 0 -> b0 1 -> b1 and so on
13:45:19 <Alberth> otherwise you'd get 0x0, 0x1, 0x2, 0x4, 0x8, 0x10, ...
13:45:30 <Alberth> euhm no 0x0, of course
13:52:37 <andythenorth> ok, so if I added ROADTYPE_FOO here as bit 2
13:53:04 <andythenorth> hmm, no I thought I understood but I don’t :D
13:53:35 <andythenorth> oh dear
13:54:13 <peter1138> i've got a patch for roadtypes somewhere
13:55:55 <Eddi|zuHause> so... OSX networking... i got MOST of it right, but i can't seem to work out the DNS settings
13:55:56 <andythenorth> probably your HD died? o_O
13:57:34 <Eddi|zuHause> all the webpages about OSX and DNS say to edit the networking settings for specific interfaces in the GUI, but the problem i have is that none of the adapters there are actually connected. only the virtualbox network, which doesn't show up in that list
13:58:22 <Eddi|zuHause> i tried making a /etc/resolv.conf, but that apparently only affected the nslookup program, and none of the other programs (like ping, firefox, ...)
14:01:03 *** drac_boy has joined #openttd
14:01:04 <drac_boy> hi
14:01:24 <andythenorth> Eddi|zuHause: does the modem have an interface defined?
14:02:21 <drac_boy> you two still working on this? :)
14:03:43 <Eddi|zuHause> andythenorth: the modem is on a virtual machine, the virtual machine has a network interface that i can ping
14:04:03 <Eddi|zuHause> the virtual machine has NAT and everything working
14:04:13 <Eddi|zuHause> i can ping the DNS server from the host
14:04:28 <Eddi|zuHause> and i can "nslookup <name> <dns server>" manually
14:05:11 <Eddi|zuHause> just i can't get OSX to use that dns server globally
14:06:54 <andythenorth> hmm
14:07:00 <andythenorth> I only use the GUI
14:07:25 <Eddi|zuHause> the thing is, the virtualbox network doesn't show up in the GUI, only in ifconfig
14:07:26 <andythenorth> and if you can’t add an interface there, bound to the VM, I have no ideas :(
14:08:08 <drac_boy> btw not to interrupt anyone here but what do you think of calling this thing "wearing a hat"? thats what I think when I look at it so.. https://farm9.staticflickr.com/8205/8265595342_59fe2249de.jpg
14:08:08 <Eddi|zuHause> i have not understood the process of adding interfaces in the GUI
14:08:27 <drac_boy> (I'm sure that its real purpose was to shield the final exhaust system from the frequent snow tho)
14:08:43 <andythenorth> you only get interfaces that are registered somehow
14:08:47 <andythenorth> not sure where yet
14:09:37 <andythenorth> Eddi|zuHause ? http://stackoverflow.com/questions/87442/virtual-network-interface-in-mac-os-x
14:09:37 <drac_boy> (and for anyone asking, its basically a Gm 3/3 as in being grouped under diesel tractor with three axles total and all being driven)
14:10:16 <andythenorth> http://tuntaposx.sourceforge.net/
14:14:42 <Eddi|zuHause> that seems way too complicated for a task so trivial :/
14:15:15 <andythenorth> might be
14:15:36 <andythenorth> but you need to persuade the GUI that there is an interface
14:15:41 <andythenorth> or you need to persuade BSD
14:17:01 <Eddi|zuHause> well, that has to wait...
14:19:38 *** Snail has joined #openttd
14:25:36 *** HerzogDeXtEr has joined #openttd
14:31:33 * andythenorth reaches the ‘rage quit’ phase of this roads patch
14:31:54 <andythenorth> :P
14:33:13 <andythenorth> roadtypes are impossible, I’m going back to patching catenary
14:35:03 <Samu> what is the command line to join a server as a spectator? I tried but it says server full. "C:\Program Files\OpenTTD\openttd.exe" -n :3979
14:35:21 <Samu> all company slots are used, but spectator slots are free
14:35:38 <drac_boy> andy, I always thought one road and 2-3 rails was enough? :P heh
14:36:19 <Samu> nevermind, i think i know how
14:36:27 <Samu> which company # is spectator?
14:36:29 <Samu> 255?
14:39:55 <andythenorth> what solution is there when same constant is used for two different purposes?
14:40:10 <andythenorth> and extending the possible range of constants for one purpose breaks the other?
14:40:27 <Samu> "C:\Program Files\OpenTTD\openttd.exe" -n :3979#255
14:40:28 <Alberth> and you want it split? introduce a 2nd constant
14:40:29 <Samu> it worked!
14:42:16 <Alberth> not sure how you jump from one constant to a range though
14:43:21 <andythenorth> by extending the enum where the constants are defined
14:44:06 <andythenorth> the enum maps the constant to bit positions
14:44:13 <andythenorth> constants *
14:44:42 <andythenorth> I have no idea tbh :)
14:44:51 * drac_boy somewhat wants to quote "english please doc!" from an old sci-fi movie
14:44:52 <Alberth> sounds like typical openttd style :)
14:45:01 <drac_boy> but thats ok tho, I'm not joining this subject :)
14:45:14 <andythenorth> it looks like I’m supposed to use a bitmask somehow
14:45:26 <Flygon> Are we discussig how stupid I am again? :3
14:45:36 <drac_boy> umm flygon, hi? :)
14:45:38 <andythenorth> so that there is someway to pickout ROADTYPE_FOO as mapping to ROADTYPE_TRAM
14:45:48 <andythenorth> but it seems like a headache to me
14:45:54 <drac_boy> hows you flygon, any good weather there?
14:46:09 <Flygon> It's Melbourne
14:46:10 <Flygon> Guess
14:46:25 <andythenorth> I am looking at someone else’s design and trying to figure out what they wanted me to do :P
14:46:29 <Alberth> andythenorth: bitmask sounds like the answer indeed
14:46:32 <drac_boy> flygon well here theres still lot of snow on ground and now its 4C with heavy rain (and the rain is going be all day long too!) ... boring weather uhh
14:46:54 <Flygon> Lemme get a screenshot of the current weather
14:46:57 <Alberth> andythenorth: it's not designed to be extendible
14:47:15 <andythenorth> it isn’t? I read the comments opposite to that :)
14:47:21 <andythenorth> that might be the problem
14:47:24 <Alberth> it's designed to be easily readable (hopefully), but that's it
14:47:40 <Alberth> openttd doesn't code things for the future
14:47:44 <Flygon> http://3.bp.blogspot.com/-k2ws7Kdig5A/UpdP1hxeXBI/AAAAAAAAArY/72yQYsmDDLM/s1600/Mad-Max-1-Final-Shot-1024x576.jpg It's dreary, it's overcast, and it's desaturated
14:47:48 <andythenorth> I have been staring at this for ~2 hours, thinking “this design isn’t workable"
14:47:51 <Flygon> Ignore the exploding car
14:48:14 *** tokai has joined #openttd
14:48:14 *** ChanServ sets mode: +v tokai
14:48:15 <Flygon> (yes, this is my local area :3)
14:48:25 <drac_boy> flygon heh, taking liberal with a movie photo :)
14:48:36 <Flygon> Taking liberal?
14:48:43 <Alberth> andythenorth: the problem with future extensions is there are too many, so you can never handle them all, so none of them is handled
14:48:44 *** Snail has quit IRC
14:48:44 <drac_boy> too bad that the Falcon was basically an australia-only car, never got it in north america
14:48:56 <andythenorth> ok
14:49:08 <drac_boy> either way I'm guessing its afternoon or evening for you now flygon?
14:49:10 <Alberth> you might be lucky and it fits easily, but maybe not
14:49:17 <Flygon> 11:49PM
14:49:20 <andythenorth> so I’m not throwing away existing work by extending it the way I understand
14:49:22 <andythenorth> maybe
14:49:30 <drac_boy> oh...guess I was a little off :)
14:49:31 <Flygon> drac_boy: Falcons originated in the USA
14:49:33 <drac_boy> its 8:49 here
14:49:45 <Flygon> They didn't quite become popular there
14:49:48 <Flygon> But took off, here
14:50:01 <Flygon> But, Falcon? That means my car's a descendant xP
14:50:18 <Flygon> ...an LPG running Automatic descendant
14:50:25 <Flygon> Ill suited for the Apocalypse
14:52:07 <drac_boy> also there was that ford (I can't recall the model now) which was one of these many car/pickup hybrid's that were so popular between england and australia but very little to be found in north america :-/
14:52:30 <Flygon> Uuuhm
14:52:34 <Flygon> Name escapes me
14:52:35 <drac_boy> at least north america did get the Subaru BRAT ... and a modern version with rather short bed based on the outback legacy chassis
14:52:43 <drac_boy> funny name tho.. brat ... :)
14:53:40 <drac_boy> cute photo for an ad http://assets.nydailynews.com/polopoly_fs/1.2256282.1434129243!/img/httpImage/image.jpg_gen/derivatives/article_635/subaru-brat-ad-1.jpg
14:54:09 <Flygon> That's how you get underbody corrosion >_>
14:54:34 * andythenorth had better learn about enums, yet again
14:54:58 *** tokai|noir has quit IRC
14:55:11 <drac_boy> flygon also would you believe that a pickup mini/morris was still useful too as much as it could only seat 2 person and umm well yeah not much cargo weight rating either? ;)
14:55:50 <Flygon> It's 500kg
14:55:54 <drac_boy> as for underbody corrosion heh well there are many factors but yeah a car with no periodical sprays living next to salty ocean could last a short time
14:56:03 <Flygon> Four reasonably fit men can carry it
14:57:31 *** Quatroking has quit IRC
14:58:04 <drac_boy> oh geeze the old car reminds me of the photos I've seen of single or friends-coming-together drivers being silly with their Smart's
14:58:10 *** Quatroking has joined #openttd
14:58:31 <drac_boy> two friends together for one spot http://www.ecojoes.com/wp-content/uploads/2009/06/Jekyll-0129.jpg heh
14:58:55 <drac_boy> or this single deciding he could steal a spot that almost noone else could ever fit into (excluding a motorcycle rider) http://image.automobilemag.com/f/32839549+w750+st0/2011-smart-fortwo-passion-coupe-front-view-parked.jpg
14:59:16 <drac_boy> theres a thousand different examples online but these are two just to start with tho :)
15:01:19 *** LadyHawk has quit IRC
15:05:16 *** LadyHawk has joined #openttd
15:06:02 *** sim-al2 has joined #openttd
15:07:27 <drac_boy> but anyhow all that aside, what're you doing toward midnight now flygon?
15:07:54 *** tokai has quit IRC
15:08:05 <Flygon> Dunno
15:08:59 * drac_boy is looking for some more specific photos to add to this project for now
15:09:18 <drac_boy> otherwise just a bit of irc and mm thats about it (stupid rain...)
15:09:40 <sim-al2> Drac_boy: I assume the extra high stack on that little locomotive is to get the smoke above the passengers
15:09:55 <drac_boy> hi sim-train :)
15:10:01 <sim-al2> Also, that little electric locomotive looks slightly dangerous...
15:10:04 <drac_boy> (sorry about that little name joke heh)
15:10:21 <drac_boy> yeah you're right, I was thinking "the axles look barely an inch apart, yet its more than six feet high??"
15:10:33 <drac_boy> talk about wanting to tip that thing over :)
15:10:57 <drac_boy> its probably only meant to run at 5kph .. some sort of depot/shed "pusher" maybe?
15:11:36 <sim-al2> Conrail built something like that: http://conrailphotos.thecrhs.org/Images/Conrail-locomotive-mover
15:12:01 <drac_boy> even then I'll rather trust the one in germany a lot more .. it was a very mini pusher but at least it had rather small axles set to a wider footprint than the stand-up cab itself
15:12:11 <drac_boy> can't recall the name of it but hm looking for it now tho
15:12:36 <sim-al2> Yeah, that thing definetly can't run that fast, looks like something that would struggle to push more than a few cars
15:12:48 <supermop> good morning
15:13:06 <sim-al2> hi
15:17:20 <supermop> andythenorth: iron crane?
15:17:33 <supermop> sort of thought out a possible scheme
15:17:38 *** gelignite has joined #openttd
15:17:43 <andythenorth> o_O
15:21:02 <drac_boy> here we go http://www.voisin.ch/vvt/photos/breuer3049.jpg its a Breuer Tractor as it was called ... had 10-80hp (date-depending) engine which apparently was mounted inbetween the chassis rails so its under the cab there
15:21:17 <supermop> kind of inverse to the pony idea
15:21:19 <drac_boy> cab -accessible coupler chain loop too
15:21:33 <supermop> but still limited
15:21:46 <sim-al2> Those wheels are crazy small
15:22:02 <sim-al2> Makes me wonder how good the brakes could be...
15:22:03 <drac_boy> well the wheels are only meant for depot shunting plus it kept the whole thing really stable :)
15:22:17 <andythenorth> when I’m declaring a parameter which is going to be either 0 or 1 (stored in a bit), what type should I use?
15:22:19 <andythenorth> bool or int?
15:22:32 <drac_boy> btw these were usually designed to work turntables/transfers so its likely only moving one unbraked item at a time
15:22:38 <andythenorth> it’s strictly not a true / false flag
15:23:03 <Alberth> uint8 probably
15:23:20 <supermop> freight and high capacity emus (similar to metro) share the cheap track, high speed low capacity passenger trains use the "SG" track which is expensive and limited to them
15:23:35 <drac_boy> heck I recall one photo of an old Kof being used to move a big modern new C'C' electric locomotive off a turntable (I imagine the Kof's buffers were almost sticking off the end of the turntable..goes to show length restrictions you can find at times)
15:23:35 <Alberth> bool would be ok too, but it's not a number so you need to convert
15:23:56 <andythenorth> ta
15:24:07 <Alberth> b ? 1 : 0
15:24:45 <andythenorth> that is a pattern I’ve seen elsewhere
15:24:52 <andythenorth> ultimately the values might be 0-3
15:24:59 <andythenorth> but I can only change so much at once, or I get lost :)
15:25:11 <andythenorth> I know how to handle a single bit
15:25:30 <Alberth> (b0 ? 1 : 0) | (b1 ? 2 : 0)
15:26:15 <Alberth> pair of bits is better done with uint8
15:26:19 * andythenorth saves that for later :)
15:26:28 <andythenorth> (copy-pasted to my notes)
15:27:30 <Alberth> with uint8 it's much easier, as it's already a number, no need to convert :)
15:27:52 *** tokai has joined #openttd
15:27:52 *** ChanServ sets mode: +v tokai
15:28:43 <drac_boy> btw about brakes .. these only had manual brakes on themself basically but as they generally only stuck to zipping around yards etc this apparently wasn't a major harm to the design itself https://c3.staticflickr.com/3/2793/4098350603_b5eb0f7111.jpg
15:29:12 <drac_boy> and yeah many of them had cranes..talk about being able to unload a flatcar or other light cargos on their own :)
15:29:26 <drac_boy> too bad I'm not too interested in modelling netherlands tho
15:32:11 <andythenorth> oh
15:32:26 <andythenorth> m6 is not available for road tiles
15:32:52 <V453000> what mayhem are you up to andythenorth ? :D
15:34:14 <andythenorth> where are the available bits defined for tiles?
15:34:43 <V453000> no clue what do you mean
15:35:02 <andythenorth> error: no member named 'm6' in 'Tile'
15:35:02 <andythenorth> SB(_m[t].m6, 6, 1, subtype);
15:35:09 <andythenorth> m6 isn’t present
15:35:38 <Rubidium> me
15:36:57 <andythenorth> because?
15:37:12 <Rubidium> computer maths
15:37:24 <andythenorth> error: no member named 'me' in 'Tile'
15:37:40 <Rubidium> _me[t].m6
15:38:01 <Rubidium> after all, m6 is the 8th byte...
15:38:05 <andythenorth> ok, that makes sense now
15:39:26 <sim-al2> Those Dutch shunters are rather interesting because some (not sure about that particular one) had controls on the side, made to be used by a crewman standing on the footboards
15:41:06 <drac_boy> yeah the cab was basically "empty" I think
15:41:33 <sim-al2> Actually looks like those did, it's a later version of the NS 200 class: https://upload.wikimedia.org/wikipedia/commons/1/1e/Locomotor_Sik_%281%29.jpg
15:42:30 <sim-al2> Apparently they only have manual brakes. There's not even an air system, so the whistle uses exhaust gases
15:42:41 <drac_boy> then again I recall some of the B units for emd F's basically had basic throttle/brake controls in a door on the side so they could be moved around on their own in the yard without having to fetch a cab unit to MU with them .. the engineer was mostly exposed to whatever was coming down from the sky on that day tho
15:42:46 <sim-al2> Also, the diesel fuel acts as the coolant
15:44:58 <sim-al2> Yeah, the B units have a very minimalistic control stand for that, just a brake valve and 3 or 4 notch controller (I assume limiting power for safetly reasons)
15:44:59 <drac_boy> oh the F7B apparently finally had some basic controls inside the body tho re #24 on here http://www.alternatewars.com/BBOW/Railroads/EMD_F7B_DWG.png
15:45:33 <drac_boy> and this thing about holster controls reminds me of something related ...
15:46:14 <Rubidium> aren't those already out of service?
15:46:45 <sim-al2> Which ones Rubidium?
15:47:11 <Rubidium> both of the antique Dutch trains you showed
15:47:32 <argoneus> how are train friends doing?
15:47:39 <drac_boy> http://www.smarttinc.com/email/NL-0414/dyk-0414-5.jpg want know why that has a big grille on the cab locomotive itself? thats because theres a small diesel in there both for to limp the thing on and off the ready/shed track with aside to providing some power to start the main turbine engine with
15:47:58 <drac_boy> then again to turn a turbine on just to simply move the locomotive ten feet would had made no sense .. so this was sensible
15:48:07 <Rubidium> (in a museum doesn't count as "in service")
15:48:16 <sim-al2> I'm pretty sure they are by now, they're pretty old and a bit unsafe
15:49:05 <Rubidium> but only like 20 years older than crap that is still running "for profit"
15:49:25 <sim-al2> This seems like the designated replacement: https://upload.wikimedia.org/wikipedia/commons/f/f9/VosslohG400B.jpg
15:50:54 <Rubidium> http://myalbum.com/photo/TxsMSlS1rX1P/1k0.jpg <- antique of +- 60 years old
15:50:56 * andythenorth asks stupid question: how to OR the results of two functions which both return bool?
15:51:06 <andythenorth> google does not help with “C++ OR two values” :P
15:51:28 <drac_boy> the crazy thing is I know a magazine I got (no online copy tho) showed one of these 3-units turbine coupled to the one and only one Century 855B that ever existed (yep..kinda funny to think of a 8500hp turbine and 5500hp diesel paired together on a supersized freight train)
15:51:43 <Rubidium> andythenorth: binary || or logical |
15:51:48 <drac_boy> heres the 855B if you want sim https://upload.wikimedia.org/wikipedia/en/4/4f/ALCOC855B.jpg
15:52:08 <sim-al2> Rubidium, at least the crew doesn't have to hang off the side of those during regular operation (also that has air brakes and other fun useful features :p)
15:52:18 <drac_boy> (on that footnote: UP did actually have three of the 855's tho)
15:52:37 <andythenorth> thanks
15:52:41 <andythenorth> was binary not logical
15:53:05 <Rubidium> sim-al2: except that... you can easily overlook low signals in that type
15:53:17 <sim-al2> Hmmm, could the turbines and the Alcos actually MU? I think the turbines had a 20 notch MU system, since they were made to run alone or at most in pairs
15:53:31 <drac_boy> rubidium if you want a modern small electric shunter you always could check about this? https://www.sbb.ch/content/dam/sbb/all/bilder/06_Bildreihe_175x133/sbb-konzern/ueber-die-sbb/brunel_awards/elektrische_rangierlock/Ee922%20©%20Stadler%20Rail%20-%205.jpg.spooler.galleryimage.800.jpg/1317041607242/Ee922%20©%20Stadler%20Rail%20-%205.jpg
15:53:41 <drac_boy> huh...sorry weird url
15:54:25 <drac_boy> sim-a12 .. well the up turbines were built with diesel-compatible MU apparently as so many times they were mixed together with anything .. even one GTEL leading five random geeps too
15:54:29 <andythenorth> SPAD
15:56:05 <drac_boy> ah I found one where even a FA-FB set is included too for some reason http://www.railpictures.net/images/d2/0/1/5/9015.1404521343.jpg
15:56:26 <drac_boy> it just shows you what a "just throw anything out of the shed onto the line whatever" mentality UP sometimes seem to have had
15:57:31 <drac_boy> I've even seen (personally, and no I didn't have a camera sorry) a CP train being a SW1200 or alike switcher leading two Dash locomotives on a long train at roughly 30-50kph .. bit weird if you ask me
16:00:13 <sim-al2> Hmm, maybe the weird MU setup was limited to the early Coal Turbine
16:00:26 <peter1138> damn this wind
16:00:29 <drac_boy> the single-unit one pre-8500hp? could be
16:00:47 * drac_boy gives peter1138 a sail? :)
16:00:55 <drac_boy> sorry if that doesn't really help heh
16:00:57 <sim-al2> Hmm, no fuel tender either
16:00:58 <peter1138> heh
16:01:03 <peter1138> not much cop in a head wind :)
16:01:38 <drac_boy> sim-a12 yeah the fuel was a diesel-like tank under chassis .. apparently the dedicated ex-steam tender was to cure the problem of very short range
16:01:53 <drac_boy> peter1138 ah, unless you can zigzag a lot yeah its useless :-s
16:03:02 <drac_boy> (as I recall the sail book said that to go right into a headwind you hold a zigzag course so at least the wind gives you a bit of forward power ... makes for a very slow actual forward speed tho ofc
16:03:06 <sim-al2> Looks like a first gen unit, with no walkways and numbered X52, so only 4500 hp
16:03:26 <drac_boy> yep, engineers didn't like that one a lot... walking right next to the exposed turbine unit inside :-s
16:03:41 <drac_boy> thats why they had the "hollowed out" sides with outter walkways
16:04:37 <andythenorth> peter1138: are you _still_ trying to make breakfast? :o
16:04:47 * drac_boy throws andy a cooked egg :)
16:06:47 <sim-al2> Interesting train this one is hauling: https://swrails.files.wordpress.com/2010/03/up-62-veranda.jpg
16:07:07 <andythenorth> pacific fruit express no?
16:07:08 <drac_boy> oh about homemade tractors .. this is one that PRR did themself http://www.northeast.railfan.net/images/prr3907.jpg at least it seem to had been a sensible one but dunno how long it lasted for tho. I suspect that the four tanks are a split of 2 fuel and 2 air or perhaps at least 3 fuel and 1 air
16:07:13 <andythenorth> express reefer train
16:07:17 <sim-al2> Looks like a refrigerated fruit train
16:07:47 * andythenorth tries to write code not in header files
16:07:53 <andythenorth> compiles are much faster :P
16:07:54 <drac_boy> and look at that exposed radiator, the lower pipe seem to be running away to somewhere else
16:12:52 <sim-al2> The exposed radiator seems common on early gasoline engined units
16:17:36 <sim-al2> I can't really think of where that pipe goes, unless there's a water tank (or drain) on the underside
16:20:37 <supermop> horse not on bananas?
16:21:32 <drac_boy> either way I'm going off irc for now so have fun ok sim-a12? (me want go back to more images note-writing here)
16:21:41 <sim-al2> Alright take care
16:21:52 *** drac_boy has left #openttd
16:25:15 <andythenorth> horse alpha on bananas
16:27:56 *** Wormnest has joined #openttd
16:32:34 <supermop> not getting any non-pony rosters in what i found, when searching with 1.6.0 rc1
16:33:28 <andythenorth> oh horse not hog
16:33:32 <andythenorth> sorry :)
16:33:37 * andythenorth had head in uint8 :P
16:36:13 <Samu> on a dedicated server, how could I tell which is taking more cpu usage between AIs and currently running vehicles deployed in the world?
16:38:25 <supermop> do i have to get antelope from devzone?
16:38:44 <andythenorth> yes
16:38:52 <andythenorth> it’s unreleasable, and bananas
16:39:07 <supermop> unreleasable?
16:42:25 <andythenorth> would simply provoke bug reports about broken sprites
16:42:30 <andythenorth> pointless
16:43:01 <supermop> ah
16:44:51 <andythenorth> how do I push unit8 values into uint32 function parameter?
16:44:55 <andythenorth> uint* *
16:47:12 <Samu> who's draws sprites for OpenGFX?
16:49:09 <Samu> would someone consider drawing sprites for me? or would it be too much work for implementation?
16:51:06 <V453000> draw your own? :D
16:51:41 <planetmaker> hm, yes, usually people draw what they take a fancy in themselves...
16:52:05 <andythenorth> gah
16:52:06 <planetmaker> ideally there's one person drawing, another coding and they kinda have the same idea :)
16:52:19 <andythenorth> these days, they’re usually the same person
16:52:20 <andythenorth> :P
16:52:30 <andythenorth> I assume there’s a reason why function parameters have to be bitstuffed?
16:52:35 <andythenorth> instead of just passing around values?
16:52:36 <V453000> or you would need to have something insanely good that some random person can't wait for, to the point they want to invest their own free time in making your idea happen
16:52:45 <V453000> which won't happen very likely :P
16:53:10 <andythenorth> I am not a good enough programmer to figure out how to shift a uint8 in and out of a uint32 just to pass 0 or 1 to the next function
16:53:23 <andythenorth> it seems arcane tbh
16:54:02 <Samu> been going through my patches of one year ago. this is a simple patch that allows rivers to be terraformed, however, it is missing many sprites http://www.tt-forums.net/viewtopic.php?p=1145266#p1145266
16:54:04 <Alberth> SB and GB are your friend :)
16:54:28 <Alberth> andy: ^
16:54:35 <andythenorth> only if I take (and pass) a course in bit maths
16:54:39 <Samu> who did the water sprites?
16:55:28 <Alberth> where should the uint8 be inserted?
16:56:25 <andythenorth> into p2 of CmdBuildRoad
16:56:32 <andythenorth> it looks like it should go in to bit 8
16:56:50 <andythenorth> but that depends on the function docs being accurate, so far I’m finding they’re not entirely :)
16:57:20 <andythenorth> the caller is OnPlaceMouseUp()
16:57:26 <andythenorth> in road_gui.cpp
16:57:32 <Alberth> pos = 8; SB(p2, pos, 8, uint8_value)
16:58:00 <Alberth> 8 constant means "8 bits from the uint8_value"
16:58:27 <Alberth> with pos == 8, that means bits 8..15
16:58:53 <andythenorth> and then I read same with GB?
16:59:08 <Alberth> yep, let me check
16:59:44 <Alberth> uint8_value = GB(p2, pos, 8)
16:59:47 *** Myhorta has joined #openttd
17:00:36 <Alberth> obviously, you can use "8" directly instead of "pos" :)
17:01:08 <andythenorth> ta
17:01:50 <andythenorth> hmm
17:01:51 <Alberth> yw
17:01:53 <andythenorth> something is working somehow
17:01:59 <Alberth> :O
17:02:01 <andythenorth> even though I didn’t apply your code yet :)
17:02:06 <andythenorth> I think it’s random accident
17:02:16 <Alberth> a nice one, though :)
17:02:36 <andythenorth> got some conditional drawing code reading the first bit of the uint 8, which happens to be set or not by accident
17:02:56 <andythenorth> biab, sun is out :)
17:02:59 *** andythenorth has quit IRC
17:05:52 <Samu> okay forget about the rivers
17:07:22 <Samu> how do i differentiate AI cpu usage to game world run cpu usage?
17:08:14 <Samu> i think it's YAPF usage
17:08:50 <supermop> Samu: do you have some images showing which/what type of sprites you need?
17:09:29 <supermop> idk anything about patching so a quick look doesn't tell me anything about whether it would be easy or hard for me to draw
17:10:30 *** pugi has joined #openttd
17:10:55 <Samu> i'd like to answer, but I'm not sure how to answer in technical terms
17:11:11 <Samu> it's about the slopes
17:11:33 <Samu> it would need rivers to be drawn on every slope type
17:11:57 <supermop> so the angled slopes?
17:12:01 <Samu> yes, that
17:12:30 <supermop> like flowing down the slope, or along them parallel?
17:12:39 <supermop> similar to ocean coast
17:13:26 <supermop> but thats 8 sprites not counting the V shaped slopes if parallel
17:13:28 <supermop> not too bad
17:13:41 <supermop> if you want waterfalls...
17:13:43 <Samu> as it stands now, it can only draw in 5 different angles
17:13:44 <supermop> harder
17:14:12 <Samu> flat, NW, NE, SE and SW
17:16:45 <Samu> sec, let me find that funny png file
17:20:35 <Samu> https://svn.openttd.org/trunk/docs/tileh.png
17:21:42 <Samu> it draws for the examples 0, 3, 6, 9 and 12, and all the others are missing
17:34:08 <Samu> oh, about the half land, half river tiles, that's an interesting question, I am not sure what it would need
17:35:47 <Samu> would take some ships running through those tiles to make sure
17:38:42 <Samu> brb, will attempt installing msvc
17:38:48 <Samu> it's been a year
17:49:43 *** Flygon_ has joined #openttd
17:53:55 <supermop> ok i just want to know if the goal is "half rivers" or angled waterfalls
17:57:01 *** Flygon has quit IRC
17:59:54 *** frosch123 is now known as frosch
18:02:13 *** andythenorth has joined #openttd
18:06:24 *** glx has joined #openttd
18:06:24 *** ChanServ sets mode: +v glx
18:10:48 *** Ketsuban has joined #openttd
18:14:47 <andythenorth> Alberth: where values are being ORed into a uint32 with shifts, do I just shift the uint8 right by n bits?
18:14:52 <andythenorth> right / left :P
18:15:22 <Alberth> just use GB/SB
18:15:47 <Alberth> those are inline functions doing the bit shifting etc
18:15:54 <andythenorth> it’s in a LOC that looks like
18:16:01 <andythenorth> DoCommandP(start_tile, end_tile, _place_road_flag | (_cur_roadtype << 3) | (_one_way_button_clicked << 5) | (_cur_road_subtype << 7), […]
18:16:12 <andythenorth> where p2 is the 3rd parameter
18:16:15 <Alberth> ah
18:17:10 <Alberth> append "| (uint8_val << 8)"
18:18:02 <Alberth> at least I hope the uint8 gets expanded to int before the shift
18:20:04 <Alberth> looks like we already have road types and sub-road types :p
18:20:10 <andythenorth> nah, I added that
18:20:16 <andythenorth> (subtype)
18:20:37 <andythenorth> we have roadtypes, but they’re in no way useful for what ~people think roadtypes should be
18:22:32 <Alberth> :)
18:22:56 <Alberth> alcohol directly from the vineyard, how useful :)
18:23:27 <supermop> like all nice wines?
18:24:05 <Samu> visual studio 2015 express for desktop windows
18:24:08 <Samu> still installing
18:25:08 <supermop> i'm at work anyway so i can sort of draw sprites but not that quickly
18:27:48 *** HerzogDeXtEr1 has joined #openttd
18:30:04 *** lele87 has joined #openttd
18:31:09 <lele87> hello. Can anyone help me with a problem of speed of open ttd, pls?
18:31:51 <Alberth> speed problem in what way?
18:31:56 <supermop> use the asiastar
18:32:08 <lele87> hi,
18:32:35 <lele87> my game is getting slower and slower while playing
18:32:50 <lele87> I've got +900 trains tho
18:33:00 <supermop> cpu core is not fast enough
18:33:00 <lele87> How can I make it faster?
18:33:10 <supermop> fewer trains, smaller map
18:33:32 <lele87> I might need to change pc?
18:33:45 <supermop> turn off pallet animation (i think it is called "full detail")
18:34:08 <lele87> I couldn't find it
18:34:14 <supermop> if you have a faster computer, you could try using that
18:34:22 <lele87> ho can I do that?
18:34:24 *** HerzogDeXtEr has quit IRC
18:35:09 *** sla_ro|master has joined #openttd
18:35:57 <supermop> i can't remember where the setting is
18:35:58 <andythenorth> turn off full “animation”
18:36:07 <andythenorth> on the options menu on main toolbar
18:36:33 <Alberth> https://wiki.openttd.org/FAQ_troubleshooting#My_system_is_horribly_slow_with_OpenTTD_1.5_or_later perhaps??
18:36:57 <Alberth> but yeah, 900+ trains can hit CPU limits
18:37:14 <V453000> 3k+ eazy :P
18:37:16 <Samu> Buy a Core i7-6700K :p
18:38:39 * andythenorth learns to hack openttd with printf
18:38:45 <andythenorth> should I be ashamed? :)
18:38:49 <Samu> ah crap, visual studio needs to restart computer
18:38:54 <Samu> RIP servers
18:39:59 <lele87> It's not there. I was looking for that, I can't find it. I'm using the last version of openttd in italian :(
18:41:44 <supermop> lele87: maybe the setting moved, i cannot find it anymore either
18:41:58 <lele87> mm
18:43:22 <frosch> hold mouse button on the third toolbar button from left (the gear)
18:43:39 <frosch> uncheck fourth item from bottom "full animation"
18:44:26 *** Samu_ has joined #openttd
18:45:23 <lele87> yep, done, thank you
18:45:44 *** _johannes has joined #openttd
18:46:12 <andythenorth> well I now have 3 tram track subtypes buildable :P
18:46:23 <andythenorth> why 3 are needed, eh, who knows
18:46:56 *** Samu has quit IRC
18:47:08 <_johannes> Hi
18:47:29 <Wolf01> 3?
18:47:48 <Wolf01> what have you done?
18:48:03 <supermop> "shiny rail" "less shiny rails" "slightly dull rails"
18:48:31 <andythenorth> but with subtypes, using a bit to store the current subtype might be….foolish
18:48:40 <andythenorth> is there a uint2? :P
18:48:41 <supermop> "sorry this tram can only run on dull rails"
18:51:27 <andythenorth> I think there are enough bits free to provide up to 3 roadtypes and 3 tramtypes
18:51:42 <andythenorth> more if anyone could be bothered to shuffle them around
18:54:50 <Alberth> 2 bit is 4 values, why 3 ?
18:55:02 <andythenorth> very good question
18:55:21 <Alberth> hmm, the "no road" case?
18:55:24 <andythenorth> yes
18:55:37 *** lele87 has quit IRC
18:55:44 <Alberth> fair enough :)
18:55:49 <andythenorth> *iff* I figure out how to fold that together with the road_subtype, without breaking all the things that look at roadtype
18:56:02 <andythenorth> seems efficient on bits to do it, but looks very hard tbh
18:56:40 <andythenorth> because roadtype is expected to be found by reading just 2 bits in a lot of places, and is not trivially extensible
18:56:58 <andythenorth> currently I am taking the lazy route, and consuming extra bits
18:57:48 <Samu_> https://wiki.openttd.org/Compiling_on_Windows_using_Microsoft_Visual_C%2B%2B_2012
18:57:55 <Samu_> microsoft windows sdk
18:58:09 <Samu_> that link is being redirected
18:59:27 <Samu_> redirects from http://msdn.microsoft.com/en-us/windows/desktop/aa904949 to https://dev.windows.com/en-us/downloads
19:00:08 <Samu_> i think i downloaded the wrong thing
19:03:23 *** Flygon__ has joined #openttd
19:09:13 *** Flygon_ has quit IRC
19:11:35 <andythenorth> apparently pushing uint8 values up to 3 into 2 bits works :P
19:11:36 *** Clockworker_ has quit IRC
19:11:44 * andythenorth might find out about clamping the hard way :)
19:11:54 *** Clockworker has joined #openttd
19:13:41 <supermop> excited for apocryphal diesel trams
19:15:01 <andythenorth> I am not planning newgrf support yet
19:16:02 <V453000> andy doing roadtypes?
19:16:03 <V453000> holy fuck :D
19:16:17 <V453000> I see your child playing openttd research made you desperate :D
19:16:29 <andythenorth> nah, just couldn’t face any more newgrf
19:16:33 <andythenorth> need a break from that
19:16:53 <V453000> well roadtypes iz specs
19:17:05 <andythenorth> nah, not doing roadtypes
19:17:09 <andythenorth> roadtypes is gash
19:18:06 <andythenorth> maybe I am doing RoadVisuals,
19:18:10 <andythenorth> or RoadEyeCandy
19:22:23 <andythenorth> hmm, bit weird
19:22:31 <andythenorth> bits of my patch are working that I haven’t updated yet
19:22:51 * andythenorth probably doesn’t understand tile inheritance
19:23:09 <andythenorth> I have some set / get functions defined on road_map.h
19:23:31 <andythenorth> and bridge tiles are apparently returning correct values from these
19:23:41 <andythenorth> whereas they should be failing
19:32:36 <andythenorth> ha ha
19:32:41 <andythenorth> YetAnotherRoadsProblem
19:33:56 <andythenorth> if a tile has existing tram track, and additional directions are added, the catenary might be removed
19:34:04 <andythenorth> if the last built subtype doesn’t have catenary
19:34:15 <andythenorth> that implies storing the subtype for every direction bit
19:35:05 <V453000> so, ability to build various road graphics ?
19:36:17 <Samu_> Severity Code Description Project File Line Suppression State
19:36:29 <Samu_> oops, it cannot build
19:36:37 <Samu_> visual studio can't build openttd
19:36:52 <Samu_> 3>libpng.lib(pngerror.obj) : error LNK2001: unresolved external symbol ___iob_func
19:37:06 <Samu_> meh i forgot how I did it the other time
19:38:14 <andythenorth> V453000: my plan was tram tracks with / without catenary
19:38:40 <V453000> XD
19:38:47 <V453000> nice enuf
19:39:02 <andythenorth> as a side effect that might cause other types, which I have zero interest in right now :P
19:39:09 <_johannes> I know I've asked several times, but: Is it possible to append a picture in the forums and then show the attachment graphically? (e.g. like with the img-tag)?
19:39:12 <V453000> :)
19:39:43 <V453000> I think there is the place inline thingy _johannes , but it only works up to 900 px width or something
19:39:43 <andythenorth> _johannes: format it to < 800x600 iirc
19:39:46 <andythenorth> and it will show
19:39:52 <V453000> there
19:40:04 <andythenorth> it’s probably in the help sub-forum or whatever :)
19:41:11 <Samu_> who's a compiler expert with visual studio 2015?
19:41:26 <Samu_> need help
19:41:44 <_johannes> andythenorth: thanks, that worked :)
19:42:44 <andythenorth> eh, this patch swings around in the wind
19:42:52 <andythenorth> now a catenary bit looks cleaner again than subtype bits
19:43:01 <andythenorth> what larks :D
19:43:51 * andythenorth wonders
19:43:56 <_johannes> ok, I've made a forum post about YAPF: http://www.tt-forums.net/viewtopic.php?f=33&t=74659 ... Can someone please explain it?
19:44:05 *** gelignite has quit IRC
19:44:13 <andythenorth> when a tile has existing road or tram, preserve the subtype of that instead of replacing with new subtype?
19:44:13 <Samu_> HALP -> http://pastebin.com/raw/m6YA9vVs
19:44:19 <andythenorth> this would work fine for trams I think
19:44:35 <andythenorth> it just causes some redundant catenary
19:49:27 *** Arveen has quit IRC
19:53:03 * andythenorth wonders what elrail does
19:53:53 <andythenorth> I can’t see it storing railtype per direction bit
19:54:05 <andythenorth> does it check neighbouring tile in each direction?
19:55:38 <Alberth> one railtype each tile
19:55:55 <Alberth> peter has a patch for that :)
19:56:28 <andythenorth> behaviour in game suggests that it checks neighbouring tiles, and draws catenary appropriately
19:56:32 <andythenorth> I didn’t read the code yet though :)
20:00:01 * andythenorth isn’t going to even think about compatibility table :P
20:02:34 <andythenorth> ha
20:02:45 <andythenorth> cable trams, like san fransisco
20:02:51 <andythenorth> and there’s the 3rd valid type :P
20:11:25 *** Wormnest_ has joined #openttd
20:12:11 <Alberth> you ever doubted you wouldn't get raodtypes filled??? :D
20:13:18 <Samu_> can i get some help? visual studio can't compile openttd
20:13:20 <andythenorth> I doubted there would be ideas that are valid for gameplay, or at least good eyecandy
20:15:01 <Samu_> where is this SDK?
20:17:03 <Samu_> https://wiki.openttd.org/Compiling_on_Windows_using_Microsoft_Visual_C%2B%2B_2012 - this article is a bit outdated, i couldn't follow it completely
20:17:18 <Samu_> where do i download the windows sdk thing?
20:17:32 <Alberth> _johannes: did you check the estimates too? how do estimates compare against the final result?
20:18:17 <Alberth> if your estimate over-estimates you run into this trouble
20:18:23 *** Wormnest has quit IRC
20:18:41 <Alberth> as co,puted solutions are no longer optimal
20:19:05 <Alberth> s/,/m/
20:19:29 <_johannes> Alberth: ah, good point, I only printed the *costs*
20:19:48 <Alberth> also print the sum, to make life easier :)
20:20:16 <_johannes> so for the order of nodes which the algorithm expands, this depends on the estimate and not on the cost? is that true?
20:20:41 <Alberth> on the lowest sum
20:20:44 <_johannes> which sum exactly do you mean?
20:21:44 <_johannes> with sum you mean the sum in f(x) in https://de.wikipedia.org/wiki/A*-Algorithmus#Idee_des_Algorithmus ?
20:21:56 <Alberth> an intermediate point in A* has 2 cost components. first one is real traveled path length, which is exact
20:22:17 <Alberth> the second one is an estimate from the point to the final destination
20:23:07 <Alberth> the point with the lowest sum of both components is closest to the optimal path (as far as is known), and thus best to unfold 1 step in every direction
20:23:48 <Alberth> in theory, any intermediate point with the lowest sum can be used, it doesn't matter
20:24:49 <_johannes> I see...
20:24:52 <Alberth> in practice, either the algorithm steers here (lowest estimate seems closer to the end, let's take that), or the implementation of eg hashmap makes a decision
20:25:06 <Alberth> or sorted queue, probably
20:25:19 *** Clockworker has quit IRC
20:25:19 <_johannes> ok
20:25:39 *** Clockworker has joined #openttd
20:25:46 <_johannes> so my call to YAPF aborted probably because the order of nodes was probably wrong?
20:26:03 <_johannes> and the order of nodes was wrong because the estimate might have been wrong?
20:26:34 <_johannes> (in that case, the estimate to go from 82 to 81 was too high, so it has been expanded too late?
20:26:35 <Alberth> the order is probably not wrong.
20:27:11 <Alberth> you're talking about lowest sum which is extremely difficult to reason about by hand
20:28:04 <_johannes> but you agree that 82->81 would have to be done before 87->81 ?
20:28:15 <_johannes> (which would imply that the order was wrong)
20:28:29 <Alberth> but likely, the estimate reduces by pretty much the same amount as the real distance increases (easy to achieve in 8 directions), which means the sum stays the same mostly
20:29:28 <Alberth> my guess is that either that 87 was really lower sum than 81, or equal
20:29:39 <Alberth> in the latter case, either order is correct
20:31:22 <_johannes> ok, I'll try to print the sum
20:31:38 <Alberth> can I also suggest enlarging the image before drawing on it? now it's a cloud of read and green colours, no idea what it says
20:31:52 <Alberth> *red
20:32:32 <_johannes> hmm if I zoom in, it gets more pixeled...
20:32:45 <_johannes> maybe I could try it with the zbase-set :)
20:32:51 <Alberth> who cares?
20:33:04 <Alberth> you want to point out positions, right?
20:33:22 <Alberth> just a plain empty grid would work, mostly
20:33:47 <_johannes> well, there's a depot and station, not sure if it matters
20:33:55 <Alberth> it probably does
20:34:25 <Alberth> but people answering A* questions do not care about looks :p
20:34:30 <_johannes> anyways, do you know why it jumps from 87 to 81 at once? why doesn't it first go to 85 etc?
20:35:06 <Alberth> after 87, 81 has a lowest summed value
20:35:32 <Alberth> it may be the same value even
20:36:33 <_johannes> yes, but it says that 87 is the direct parent of 81
20:36:44 <Alberth> if you have 4 points with equal lowest sum, any of those points is correct
20:37:12 <Alberth> not for picking a new point from the open list
20:37:39 <Alberth> you pick any point with lowest summed value from the open list
20:38:37 <_johannes> yes, I see that, but the parent pointer still says: this is the last node the train visits before this one
20:39:00 <Alberth> so?
20:39:17 <Alberth> you explore in all directions at the same time
20:39:30 <_johannes> the train can not jump from tile 87 to tile 81 without ever touching tile 85
20:39:36 <Alberth> parent relation is only used while traveling back
20:40:06 <_johannes> IIRC the parent relation is used to retrieve the shortest path after FindPath has run
20:40:19 <Alberth> yep, and you're not there yet
20:40:35 <_johannes> oO
20:40:44 <_johannes> ok now it gets complicated
20:40:53 <Alberth> that happens after you reached the destination
20:41:16 <_johannes> you mean the parent pointer are all completely remapped after reaching the destination?
20:41:28 <Alberth> then you trace back to the beginning with the parent relation (normally, not entirely sure this is done in YAPF too)
20:42:45 <_johannes> ok let's ask about the example: let's assume my train wants to go 82->81, and finds out that the route 82->85->86->87->81 is ideal...
20:42:55 <_johannes> that would be possible, I guess
20:42:57 <Alberth> parent says something about "go here for fastest way back", but it's "as far as we know now", iirc
20:43:19 <_johannes> hmm ok
20:43:38 <_johannes> so in my example, how would the caller of FindPath know what tile came before 81?
20:43:50 <_johannes> it's definitely not 87 :P
20:44:12 <_johannes> but the parent pointer seems to say this in 82->85->86->87->81
20:44:13 <Alberth> currently your call crashes
20:44:31 <Alberth> which means something is wrong, which means data values can be messed up
20:44:48 <_johannes> ok
20:45:57 <Alberth> I would start worrying about parents after you got a wrong path back :p
20:46:11 <_johannes> :)
20:46:39 <_johannes> thanks for your advice.... this YAPF problem makes me a bit desparate...
20:47:23 <Alberth> of course, it may still be caused earlier in that case, but one problem at a time :)
20:48:10 <_johannes> maybe I called YAPF wrong, this might be one result of the whole analysis
20:48:26 *** Wormnest__ has joined #openttd
20:50:03 <andythenorth> ha ha, I’ve borked the bridge sprites
20:50:10 <andythenorth> must be overwriting some bits somewhere
20:50:21 <andythenorth> how to debug _that_ :P
20:52:29 <Alberth> make a save game with 1 bridge, print data once with the original game code, and once with your patched code ?
20:52:47 * andythenorth thinks it’s L17 here https://paste.openttdcoop.org/pyhluoqhz
20:52:58 <glx> Samu_: recent visual studio includes windows sdk
20:53:11 <andythenorth> _bridge_cur_road_subtype must be over-writing the bridge type bits
20:53:12 <glx> no need for a manual download
20:53:38 <Alberth> line 17? doesn't exist
20:54:55 <Samu_> just installed another visual studio
20:55:00 <Alberth> check that _bridge_cur_road_subtype has an expected value?
20:55:03 <Samu_> doesn't work, it's even worse :(
20:55:21 <Alberth> what's the type of _bridge_cur_road_subtype ?
20:55:23 *** Wormnest_ has quit IRC
20:55:25 <Samu_> You cannot open this project with your Express edition of Visual Studio for Windows 10. This edition only supports development of Universal Windows Platform apps.
20:55:47 <glx> you need the desktop version
20:56:07 <Alberth> so much for universal windows :p
20:56:10 <Samu_> ok, uninstalling it
20:57:09 <Samu_> can u give me the link to the right visual studio to download?
20:57:14 <glx> but visual studio comunity should work
20:57:16 <Samu_> there's so many versions
20:57:57 <Alberth> andythenorth: uint32 w = _bridge_cur_road_subtype ; w <<= 17; then use 'w'. It's hacky, but it ensures your bits are preserved (shifting 17 times in a value with width 8 is undefined behavior)
20:58:29 <Alberth> it may get expanded to an int beforehand, but better safe than sorry
21:01:43 * andythenorth explores
21:04:03 <andythenorth> Alberth: did I understand correctly?
21:04:05 <andythenorth> https://paste.openttdcoop.org/pkqhcuzzq
21:04:11 <glx> Samu_: community 2015 fails indeed
21:04:11 <andythenorth> doesn’t work as expected :)
21:04:39 <andythenorth> I think 17 might be a bad shift
21:04:46 <Samu_> oh :(
21:05:05 *** Arveen has joined #openttd
21:05:21 <glx> IIRC an updated ottd_useful is required
21:06:38 *** liq3 has quit IRC
21:06:42 <Alberth> andythenorth: looks like what I meant
21:09:03 * andythenorth biab :)
21:12:29 *** OsteHove` has joined #openttd
21:13:48 *** frosch has quit IRC
21:16:26 *** OsteHovel has quit IRC
21:28:01 *** Samu has joined #openttd
21:28:23 <Samu> @logs
21:28:23 <DorpsGek> Samu: http://irclogs.qmsk.net/channels/openttd
21:29:32 <Alberth> you can save such links in your browser :)
21:33:16 *** Samu_ has quit IRC
21:33:19 <Samu> what can I do about unresolved external symbol?
21:33:52 <Samu> blame microsoft?
21:36:36 <Samu> oh -> http://www.tt-forums.net/viewtopic.php?t=73769
21:37:16 <glx> as I said, you need an updated ottd_useful
21:38:42 <Samu> so, the wiki article is wrong
21:39:07 <glx> no, it's for VS2012 :)
21:39:23 <Samu> https://www.openttd.org/en/download-openttd-useful/6.0 - is this the most up to date version?
21:43:04 <glx> yes
21:46:04 <Samu> ok, reinstalling visual studio express 2015 for desktop
21:46:27 <Samu> afk
21:51:50 <andythenorth> so my shift of 17 is based on the docs here http://git.openttd.org/?p=trunk.git;a=blob;f=src/tunnelbridge_cmd.cpp;h=5f2534b58c3bd45485aa915a7047eb7ef916d3b4;hb=HEAD#l228
21:51:53 <andythenorth> Alberth: ^
21:52:32 <andythenorth> I assumed I could push an 8 bit value into p2, as only 17 bits are used
21:53:07 <Alberth> that looks ok to me judging from the docs
21:53:41 <andythenorth> the values are as expected when I read them with uint8 cur_road_subtype = GB(p2, 17, 8);
21:54:02 <andythenorth> but I’m over-writing something in bridge type
21:54:35 <andythenorth> BridgeType is bits 0-7
21:58:19 *** gelignite has joined #openttd
21:58:46 <Alberth> line 330?
21:59:22 <Alberth> bits look fine to me
21:59:27 <andythenorth> what happens if I try to write a uint8 into 2 bits with SB?
21:59:33 <andythenorth> does it overflow into neighbouring bits?
21:59:55 <Alberth> doesn't look like it to me
22:00:57 <andythenorth> so what is suspicious about 330? :)
22:01:16 <Alberth> it checks transport type
22:01:24 <Alberth> of the start tile
22:01:33 <Alberth> which you may be hacking
22:02:05 <andythenorth> nah
22:02:07 <Alberth> ie maybe somwehere further a routine returns a wrong result
22:02:13 <andythenorth> deliberately left transport type alone :)
22:02:28 <andythenorth> too much depends on it
22:04:10 <andythenorth> hmm, if I shift 24, the same problem manifests exactly
22:04:17 <andythenorth> so it’s probably not the shift
22:06:12 <Alberth> it seems unlikely
22:07:07 <Alberth> you could check the used functions, and see if they depend on something you changed
22:07:21 <andythenorth> bridge_type is reporting same for every type I build, but the sprites are different in some cases
22:08:41 <Alberth> you could also step through this function, and see how adding your patch changes values or behaviour
22:08:52 <andythenorth> I’m doing that with printfs now
22:08:55 <Alberth> flags & DC_EXEC <-- that means "really do it"
22:09:04 <andythenorth> :)
22:09:10 <Alberth> everything before is just checking
22:09:39 <Alberth> so bridgetype value there matter, as they end up in the map data
22:11:35 * andythenorth checks bytes in the map directly
22:11:48 <Alberth> good idea :)
22:12:45 <Alberth> good night
22:15:34 <andythenorth> something overflows
22:15:36 <andythenorth> goodnight :)
22:16:21 <andythenorth> oic
22:16:24 *** HerzogDeXtEr1 has quit IRC
22:16:54 <andythenorth> silly andythenorth
22:18:46 <supermop> rendering lots of trolleys
22:18:57 *** Alberth has left #openttd
22:21:27 * andythenorth read the landscape grid too literally
22:21:43 <andythenorth> and assumed SB and GB counted down from highest bit :P
22:21:54 <andythenorth> perils of left-right
22:27:59 <_johannes> is it possible to build a track-cycle without danger of deadlocks?
22:28:26 <_johannes> I just have such a cycle here, and I'm getting traffic jams all the time
22:28:58 *** Arveen has quit IRC
22:36:32 <Samu> aha, i did it
22:36:54 <Samu> however, there is an issue with the dpi scaling
22:37:11 <Samu> the testing build isn't dpi aware or something like that, what can i do?
22:37:18 <Samu> glx:
22:47:34 *** sla_ro|master has quit IRC
22:48:05 *** pugi has quit IRC
22:48:27 *** _johannes has quit IRC
22:48:41 <peter1138> will apple ever move on to os 11?
22:51:48 <Samu> wow i think i figured it out
22:54:09 <Samu> right click openttd project > properties. Then Configuration Properties > Manifest Tool > Input and Output, then DPI Awareness: Per Monitor High DPI Aware
22:54:22 <Samu> this solved the scaling
22:54:56 <andythenorth> peter1138: unlikely
22:56:09 <andythenorth> hmm, that’s tunnels with catenary done apparently
22:56:14 <andythenorth> and without
22:56:29 <andythenorth> how hard can NotRoadTypes be?
23:03:20 <andythenorth> peter1138: you didn’t finish it before because…? Boring? CBA?
23:18:12 <Wolf01> Rebooting... the virtual machine with XP
23:19:12 <andythenorth> random
23:19:48 * andythenorth must to bed
23:19:52 <andythenorth> boring
23:20:27 <Wolf01> meh... the software requires windows 98/2000
23:21:10 *** Wormnest__ has quit IRC
23:23:39 *** gelignite has quit IRC
23:24:43 *** andythenorth has quit IRC
23:25:44 <Wolf01> uhoh... no usb port found, this could be tricky
23:34:00 *** KouDy has quit IRC
23:34:14 *** KouDy has joined #openttd
23:36:29 <Samu> supermop: https://onedrive.live.com/redir?resid=23B29F3DE45F6F1F!1250&authkey=!AKX-wUCAG6mE66o&ithint=file%2cscn
23:37:25 <Samu> download the file rivertiles.scn - it is a scenario with the rivers already placed
23:37:35 <Samu> and they miss the sprites
23:42:47 <Eddi|zuHause> hm... no frosch: https://www.youtube.com/watch?v=DY_tQli1q9Q
23:47:46 <Samu> about the ships... they are not traversing the half-tile, but I don't see any reason why they shouldn't
23:48:32 <Samu> as long as the half-tile is not declive, they should traverse it the half-flat part of it
23:49:07 <Samu> thats something I could venture myself into
23:49:15 <Samu> make it pathable
23:51:47 <Samu> should mimic the coastal pathing
23:51:56 <Samu> gonna investigate
23:55:23 *** Hiddenfunstuff has quit IRC