IRC logs for #openttd on OFTC at 2016-04-18
            
00:02:20 *** tycoondemon has quit IRC
00:04:24 *** aard has quit IRC
00:06:47 *** tycoondemon has joined #openttd
00:19:10 *** _johannes has joined #openttd
00:21:44 <Wolf01> 'night
00:21:46 *** Wolf01 has quit IRC
00:21:57 *** sla_ro|master has quit IRC
00:28:21 *** _johannes has quit IRC
00:31:33 *** Wormnest has quit IRC
00:43:29 *** Snail has joined #openttd
01:01:19 *** tycoondemon has quit IRC
01:08:24 *** Progman has quit IRC
01:08:55 *** HerzogDeXtEr has quit IRC
01:09:48 *** tycoondemon has joined #openttd
01:18:29 *** tokai|noir has joined #openttd
01:18:29 *** ChanServ sets mode: +v tokai|noir
01:22:29 *** tycoondemon has quit IRC
01:23:21 *** tycoondemon has joined #openttd
01:25:09 *** tokai has quit IRC
01:31:24 *** tycoondemon has quit IRC
01:36:55 *** tycoondemon has joined #openttd
01:42:10 *** supermop has joined #openttd
01:46:32 *** Quatroking has quit IRC
01:50:05 *** tycoondemon has quit IRC
01:58:42 *** tycoondemon has joined #openttd
02:00:00 *** FLHerne has quit IRC
02:09:45 <Samu> https://onedrive.live.com/redir?resid=23B29F3DE45F6F1F!1273&authkey=!ALxYnF4ONWf8Qvg&ithint=file%2cxlsx
02:09:56 <Samu> excel online
02:09:58 <Samu> much better
02:16:00 <Samu> bah, its bugged
02:27:29 <Samu> https://onedrive.live.com/redir?resid=23B29F3DE45F6F1F!1275&authkey=!AES3XpDoVoXDIRE&ithint=file%2cxlsx
02:27:34 <Samu> there, fixed
02:27:45 <Samu> cyas, good night
02:27:47 *** Samu has quit IRC
02:29:41 *** ABCRic has joined #openttd
02:35:49 *** tycoondemon has quit IRC
02:40:34 *** tycoondemon has joined #openttd
02:57:19 *** tycoondemon has quit IRC
03:00:54 *** Myhorta has quit IRC
03:05:37 *** JezK has joined #openttd
03:07:39 *** tycoondemon has joined #openttd
03:08:56 *** Cybertinus has quit IRC
03:15:44 *** tycoondemon has quit IRC
03:20:39 *** tycoondemon has joined #openttd
03:26:17 *** liq3 has joined #openttd
03:28:45 *** tycoondemon has quit IRC
03:37:26 *** tycoondemon has joined #openttd
03:45:29 *** tycoondemon has quit IRC
03:49:30 *** tycoondemon has joined #openttd
04:31:10 *** DDR has quit IRC
05:03:34 *** supermop has quit IRC
06:04:10 *** Xal has joined #openttd
06:05:02 *** Snail has quit IRC
06:08:06 *** Clockworker__ is now known as BiG_CW_MF
06:10:54 *** JezK has quit IRC
06:16:09 *** sim-al2 has quit IRC
06:20:31 *** JezK has joined #openttd
06:35:07 *** glx has quit IRC
06:51:39 *** JezK has quit IRC
07:01:20 *** JezK has joined #openttd
07:01:50 *** Clockworker_ has joined #openttd
07:01:50 *** BiG_CW_MF has quit IRC
07:33:10 *** sla_ro|master has joined #openttd
07:49:40 *** Xal has quit IRC
07:56:29 *** GriffinOneTwo_ has joined #openttd
07:57:17 <GriffinOneTwo_> so, I haven't done anything with Open TTD in many months, if not years, I ran across some neat photos of some passenger Terminus station in France somewhere, created an tt-forums account, created a off topic post (I thought I read the posting rules {I just reread, I don't see what I did wrong}), and got promptly banned? Does that happen much, or is it likely I really screwed up?
08:14:03 *** GriffinOneTwo_ has quit IRC
08:24:45 <V453000> LOL
08:57:13 *** Ketsuban has joined #openttd
09:03:25 *** JezK has quit IRC
10:09:50 *** sla_ro|master has quit IRC
11:10:46 *** Wolf01 has joined #openttd
11:11:01 <Wolf01> o/
11:18:41 *** Samu has joined #openttd
11:19:04 <Samu> oh god, how dumb excel online is at calculating values on a table
11:19:25 <Samu> it is always automating stuff and ruining the calculations
11:47:20 <Samu> what is the average upload speed of openttd servers?
11:56:05 <Samu> okay, the idea I have about encoding vs uploading is to make openttd automate the choice of an encoding preset if you give ottd the upload rate of your internet connection, but this alone isn't enough. It also needs to know the capabilities of your cpu.
11:57:51 <Samu> goal would be to start encoding at the optimal preset to send that file to a client, but in this case it assumes the client download speed matches the upload speed of the server
11:58:40 <Wolf01> iiwdnti?
11:59:21 <Samu> uh?
11:59:44 <Wolf01> figure it
12:02:06 <Samu> the greatest unknown variable here is knowing the capabilities of your cpu
12:04:05 * Wolf01 reboots
12:04:07 *** Wolf01 has quit IRC
12:04:50 *** Quatroking has joined #openttd
12:11:17 <Samu> i'll give an example, sort this by upload rate: https://onedrive.live.com/redir?resid=23B29F3DE45F6F1F!1271&authkey=!AAIUn3D6oXYFDM4&ithint=file%2cxlsx
12:12:12 <Samu> supposing you have a FX-8150, the calculated encoding speed for each presets are calculated on that sheet
12:12:38 <Samu> converting it to upload rates, you get an average speed of that encoder
12:13:12 <Samu> for my case, my internet connection has an upload rate of 3000 kbps
12:13:32 <Samu> I want then to exclude all the encoders which are slower than 3000
12:14:02 <Samu> they are the lzma presets from 5 to 9, these are excluded
12:14:39 <Samu> the best choice so far is then zlib preset 9 with 3591 kbps
12:15:22 <Samu> but now, i have to pay attention the resulting compressed size, and i start selecting those which result in fast encoding speeds from 3000 upwards
12:15:41 <Samu> have openttd find the smallest compressed size
12:16:09 <Samu> and i will end up with lzma preset 3
12:16:27 <Samu> this would be the choice
12:16:58 <Samu> given fx-8150 and an upload of 3000 kbps, tell openttd to encode with lzma preset 3 to send the file to a client joining the sever
12:19:04 *** Wolf01 has joined #openttd
12:38:40 <Samu> is it a bad idea?
12:39:28 <Wolf01> yes
12:39:33 <Samu> :(
12:39:50 <Wolf01> what you are trying to do depends on too many variables
12:42:08 <Wolf01> or better, if you will update the sheet and ottd functions from now to eternity, it might be an idea
12:45:38 <Wolf01> also, what happens if I tell ottd I have 20M connection and I'm downloading stuff all the day? what happens if I use ottd from a thumb drive in more computers with really different specs?
12:49:29 *** Hiddenfunstuff has joined #openttd
12:52:15 <Samu> i see :(
12:53:35 <Samu> biggest variable however, as I see it, is the cpu
12:55:07 <Samu> the internet upload rate would be a value you'd have to setup on a server config
12:55:47 <Samu> the value is used to exclude slower presets
12:55:58 <Samu> but i see what u mean with downloading all day
12:59:58 <Wolf01> you could implement a way to do some checks every time the game is started, but we already have the grf check which takes a lot of time, don't expect me to wait for connection check and hardware check too
13:14:31 *** TheMask96 has quit IRC
13:14:42 <Samu> the checking doesn't have to be on launching openttd
13:14:56 <Samu> but perhaps before server creation
13:15:03 <Samu> or on server creation
13:19:03 *** TheMask96 has joined #openttd
13:21:22 <Samu> hmm, maybe even during the duration of a server
13:22:49 <Samu> log the encoding time data each time a client joins
13:24:24 <Samu> then make use of that data to estimate capabilities of the cpu? hmm
13:24:31 <Samu> yeah... difficult
13:26:08 <Samu> actually, autosaves could serve this purpose
13:28:29 <Samu> use a different preset everytime an autosave is starting, log the time it took to compress for each preset
13:29:04 <Samu> ~but i see, this is not easy
13:29:12 <Samu> sometimes servers dont' have autosaves enabled
13:29:47 <Samu> ok, i give up
13:36:48 <Wolf01> why the single player game shouldn't benefit from the savegame compression too?
13:55:20 <Wolf01> V453000, does the steam version of factorio has drm?
14:03:10 <Wolf01> I mean, does it requires steam to be running to launch it? Because this is a shared pc and there is a lot of trouble with steam accounts, so I might download the installer from the site instead
14:07:20 *** joepie91 has joined #openttd
14:09:50 <joepie91> quick note for any OpenTTD devs lingering around; reading the content server client code atm, and one of the comments appears to be inaccurate... in network_content.cpp, in ClientNetworkContentSocketHandler::RequestContentList(uint count, const ContentID *content_ids), it claims that it will add a byte for the content type and then a uint16 for the count of IDs in the packet, but as far as I can tell there's only the count uint16, and
14:09:52 <joepie91> nothing relating to content type is being added
14:10:26 <joepie91> r27546 it seems
14:12:26 <Samu> Wolf01: hmm, what speed is expected for single player savegames?
14:12:33 <Samu> the fastest possible?
14:12:39 <Samu> that would be lzo
14:17:08 <Samu> or zlib 2 if lzo is not to be used
14:17:26 <Samu> lzo is having some issues :(
14:22:40 *** DDR has joined #openttd
14:29:01 <joepie91> hm.
14:29:40 <joepie91> who do I talk to about things in the code that *look* like bugs but may or may not be?
14:30:38 <Wolf01> just write here and wait for an answer
14:31:47 <joepie91> right. so right now I'm looking at ClientNetworkContentSocketHandler::RequestContentList(ContentVector *cv, bool send_md5sum)
14:31:54 *** Supercheese has quit IRC
14:32:20 <joepie91> it asserts the length of the list of content vectors by reserving 20 bytes for each and checking if the size checks out
14:32:32 *** Supercheese has joined #openttd
14:32:38 <joepie91> comment says sizeof(uint32) + sizeof(md5sum (byte[16]))
14:32:48 <joepie91> however, that's not what it writes for each item
14:33:12 <joepie91> instead, it writes uint8 (content type), uint32 (item ID), optionally byte[16] (md5sum)
14:33:29 <joepie91> so it looks to me like that assertion is off by one byte per item
14:33:44 <joepie91> mind, I'm not a C++ developer, so I may be missing something
14:33:46 <joepie91> :P
14:34:53 <joepie91> this is still in network_content.cpp btw
14:35:37 *** Snail has joined #openttd
14:36:39 <joepie91> from the looks of it, it ignores the uint8 in both md5sum and no-md5sum cases
14:58:54 *** tycoondemon has quit IRC
15:02:11 *** Snail has quit IRC
15:02:42 <V453000> Wolf01: the zip is probably a better option for you but I believe it should be drm free
15:06:47 *** luaduck has joined #openttd
15:07:10 <Wolf01> just finished to download it, it requires steam, so I think I'll do with the installer
15:11:17 <Wolf01> my best friend died this morning, I'm hoping they accept the RMA for its internal organs, but I'll have to stay at least 3 weeks without it :(
15:13:10 *** tycoondemon has joined #openttd
15:22:28 *** supermop has joined #openttd
15:26:20 *** tycoondemon has quit IRC
15:27:29 <supermop> yo
15:27:46 <Wolf01> o/
15:29:26 <supermop> hows it going 5 or 6 hours in the future?
15:30:13 <Wolf01> bad :(
15:33:22 <Wolf01> I have to rely on my old best friend now for some time, but the place is a bit uncomfortable, cold, dusty (more than my room) and I don't even have room to stretch my legs
15:35:21 <Wolf01> also the keyboard is weird and the mouse must be shaken a bit to awake it
15:38:34 <supermop> bluetooth?
15:39:02 <V453000> WIRE MASTER RACE
15:39:02 <Alkel_U3> I know that feeling. 2 years ago my laptop fried, shifting me back from an i7 with 8 GB RAM to an olden AMD with 2 GB. It was then I realized what frustration is.
15:43:34 <Wolf01> keyboard is weird <- not an error, it is weird
15:43:53 <Wolf01> it is one of the trust gaming series
15:45:03 <Wolf01> the backlight doesn't work anymore (after just a year), the keys are small and of shitty plastic
15:47:33 <supermop> 3d print some metal ones?
15:48:45 <Wolf01> nah, I would like to use my logitech one, but I don't want to share it with others :P
15:49:47 <Wolf01> man, the installation of visual studio takes ages
15:50:18 <Wolf01> I bet I'll get a fully automated industry on factorio before it will finish
15:52:45 <Wolf01> oh finally switching to electric power :D
15:53:17 <Wolf01> 35 minutes, I could do better next time
16:02:04 <Wolf01> lol the display: "power off in 5 minutes to save energy, press a button to avoid power off"... guess what button I pressed?
16:05:25 *** tycoondemon has joined #openttd
16:08:50 <blathijs> 9
16:08:53 <blathijs> w00ps
16:13:32 <Samu> visual studio express is warning me the trial expires in 9 days :(
16:13:42 <Samu> i thought this was free forever
16:13:45 <Samu> wth
16:14:33 *** Alberth has joined #openttd
16:14:33 *** ChanServ sets mode: +o Alberth
16:14:44 <Alberth> moin
16:15:17 *** sim-al2 has joined #openttd
16:16:22 <blathijs> Samu: Perhaps you have full features now and some of them will be disabled? (Just guessing)
16:18:30 <Samu> Sign in to unlock the product
16:18:35 <Samu> sign in to what?
16:19:05 <Samu> they want my email!
16:20:29 *** tycoondemon has quit IRC
16:20:48 <Samu> by the look of it, I need a microsoft account to keep using visual studio 2015 express for desktop
16:20:56 <Samu> meh, ok
16:23:32 <Samu> success! this product is licensed to "myemail@here.com"
16:54:32 *** sla_ro|master has joined #openttd
17:02:52 *** tycoondemon has joined #openttd
17:08:17 *** JacobD88 has joined #openttd
17:11:29 *** tycoondemon has quit IRC
17:35:04 *** tycoondemon has joined #openttd
17:39:01 <Wolf01> ok, compiled successfully
17:39:07 <Wolf01> now... emulators :|
17:41:49 <Wolf01> running factorio again
17:42:14 <Alberth> building an emulator in factorio? :)
17:45:31 *** TheMask96 has quit IRC
17:47:19 *** tycoondemon has quit IRC
17:50:55 *** TheMask96 has joined #openttd
17:54:20 *** sim-al2 has quit IRC
17:59:21 *** tycoondemon has joined #openttd
18:00:18 <Samu> i'd like to know all the different ways openttd creates a savegame
18:00:46 <Samu> savegame on crash, autosave, manual save, this kind of stuff
18:04:27 <Samu> i have many ideas flowing in my head
18:05:26 <Samu> i see code for a save on exit, I didn't know of this
18:08:30 <Samu> fastforwarding games could benefit from very fast encoding autosaves
18:10:19 <Samu> some kind of bool table system in a function that detects how the savegame is being requested and return the better encoder for that request
18:12:08 <Samu> network games would have autosavesand manual saves set to use the fastest possible encoder
18:12:33 <Samu> network games would have sending map to client would have another kind of encoder
18:12:39 <Samu> erm repetition
18:18:02 *** tycoondemon has quit IRC
18:28:10 *** Arveen has joined #openttd
18:34:22 *** tycoondemon has joined #openttd
18:39:34 <Samu> ewww... there's a lot of ways, i see
18:42:34 *** tycoondemon has quit IRC
18:46:20 <Wolf01> finally downloaded the virtual machines but mmmh, no hardware virtualization, I guess I should peek in the bios
18:46:23 <Wolf01> bye
18:46:26 *** Wolf01 has quit IRC
18:47:40 <Samu> what is this code about... desync savegames?
18:48:00 <Samu> it is creating savegames for desyncs?
18:48:09 <Samu> how does that work?
18:48:36 <Taede> saves a game every frame (or something) which can then be replayed
18:48:42 <Taede> to establish what is the cause of a desync
18:50:36 *** HerzogDeXtEr has joined #openttd
18:51:26 *** frosch123 has joined #openttd
18:57:42 <Samu> that would be extremely slow :(
18:58:05 <Samu> every frame? can't even see that happening
19:02:50 *** glx has joined #openttd
19:02:50 *** ChanServ sets mode: +v glx
19:03:29 *** smoke_fumus has joined #openttd
19:04:33 *** tycoondemon has joined #openttd
19:05:40 *** sim-al2 has joined #openttd
19:13:20 *** tycoondemon has quit IRC
19:19:27 *** Progman has joined #openttd
19:31:24 *** tycoondemon has joined #openttd
19:42:45 *** tycoondemon has quit IRC
19:43:37 *** JacobD88 has quit IRC
19:44:12 *** Cybertinus has joined #openttd
19:52:56 *** gelignite has joined #openttd
19:55:00 *** tycoondemon has joined #openttd
20:15:48 *** Wolf01 has joined #openttd
20:16:02 *** Wolf01 has joined #openttd
20:22:04 <Samu> who's a code expert
20:22:19 *** Wolf01 has joined #openttd
20:22:32 <Wolf01> o/
20:23:23 <Samu> ok
20:24:05 <Samu> how do I make this code smarter, without magic numbering stuff https://paste.openttdcoop.org/pjpvwmhiu
20:24:42 <Samu> sgf_id especially
20:26:31 <Alberth> you ever considered reading a book about c++ ?
20:26:54 <Samu> yes but gave up
20:27:20 <Alberth> so now we must do your coding?
20:27:24 <Wolf01> Declare the numbers as constant and give them a meaningful name
20:29:26 <Samu> but I don't have to, they are already in a table, if only i knew how to get them directly from the table into the &_saveload_formats[x]
20:30:45 <Wolf01> :|
20:30:59 <Samu> that x is a number from 0 to 3
20:31:11 <Samu> 0 is lzo, 1 is none, 2 is zlib, 3 is lzma
20:31:41 <Alberth> so 2 is a meaningful name eh?
20:32:32 <Wolf01> The table is made by you or it's already in the code somewhere?
20:32:39 <Samu> it's already in the code
20:32:47 <Samu> not made by me
20:33:09 <Alberth> "lastof()" doesn't look like you wrte it :)
20:33:26 <Alberth> *wrote
20:33:36 <Samu> lastof just picks lzma for default
20:33:48 <Samu> uses lzma for every savegame
20:38:00 <Wolf01> And what if one of the first methods isn't available? The numbers are always the same?
20:38:01 <Alberth> actually, it does a bit more; if I add a better compression method at the end, it will pick that one, ie not lzma always, but the last one
20:38:32 <Alberth> good point Wolf01
20:39:30 <Samu> it's like a table inside a table
20:39:39 <Samu> lzma has its parameters
20:39:48 <Samu> independent than the others
20:41:36 <Samu> this is the table https://git.openttd.org/?p=trunk.git;a=blob;f=src/saveload/saveload.cpp;h=b1a21844f355fc18dfb1b80f7b01e8df33a2b202;hb=HEAD#l2345
20:42:57 <Samu> line 2385 has that part i'm editing const SaveLoadFormat *def = lastof(_saveload_formats);
20:43:32 <Wolf01> The problem is that one of the methods isn't available your code won't work, or you have to define the default one
20:44:20 <Alberth> eg what if lzma is not availalble?
20:44:52 <Samu> it borks !
20:45:05 <Wolf01> or even zlib
20:45:32 <Samu> it has to have one at least
20:45:49 <Samu> lastof must be in there I see
20:45:52 <Wolf01> yes but if I have just one, what are 2 and 3?
20:46:07 <Wolf01> lastof() works
20:46:25 <Wolf01> but how do you chose a different method in this case?
20:47:24 <Samu> so, my code must be written after that line, not before
20:47:59 <Wolf01> I mean, you want to compress with zlib, but I only have lzmaè
20:51:41 <Samu> if no zlib, resort to using default
20:51:56 <Samu> if no lzma or zlib or anything, resort to using default
20:52:18 <Wolf01> assuming the compression none doesn't change and it's always 2, I think you could do "int sgf_id = lastof(_saveload_formats)"
20:52:49 <Samu> none is 1
20:52:57 <Samu> it starts counting from 0
20:53:10 <Wolf01> ok, I misread it
20:53:41 <Wolf01> then how do you get the default?
20:54:02 <Samu> i think the question is, how do I change the default
20:54:04 *** Myhorta has joined #openttd
20:54:21 <Samu> ok let me try something
20:54:23 <Samu> brb
20:54:27 <Wolf01> you are already changing the default
20:55:37 <Wolf01> but to *what* is unknown
20:59:43 <Samu> iterate over all available formats and look for zlib? something like that? and if it exists, switch default to that, but i can't seem to write this, it errors
21:00:28 <Samu> gonna try writing stuff brb
21:03:12 <Samu> * @param s Name of the savegame format. If NULL it picks the first available one
21:08:12 <Samu> hmm i think i understand
21:08:55 <Samu> if (_network_server && _sl.autosaveinprogress) *s = OTTZ;
21:09:15 <Samu> gonna try this one step at a time
21:11:54 <Samu> if (_network_server && _sl.autosaveinprogress) *s = 'OTTZ';
21:17:21 <Wolf01> yes a string would do it
21:17:29 <Wolf01> learn the basics please
21:17:35 <Samu> if (_network_server && _sl.autosaveinprogress) *s = TO_BE32X('OTTZ');
21:19:43 <Samu> :( basics
21:20:12 *** Progman_ has joined #openttd
21:25:18 *** Progman has quit IRC
21:25:30 *** Progman_ is now known as Progman
21:34:37 *** FLHerne has joined #openttd
21:50:37 <Samu> i broke visual studio
21:50:52 <Samu> it's always telling me format O is not available, reverting to lzma
21:51:03 <Samu> i already reverted all changes, what's wrong
21:56:00 *** Arveen has quit IRC
21:56:10 <Samu> i'm terrible at this :(
22:00:51 <Samu> i broke this
22:00:55 <Samu> rip
22:02:05 *** Myhorta[1] has joined #openttd
22:03:06 *** Hiddenfunstuff has quit IRC
22:07:06 *** Myhorta has quit IRC
22:12:44 *** DDR has quit IRC
22:15:28 *** sla_ro|master has quit IRC
22:20:39 *** sim-al2 has quit IRC
22:25:23 <Samu> what is wrong damn it :)(
22:25:35 <Samu> what is a configuration file?
22:25:48 *** Alberth has left #openttd
22:26:45 <Samu> the real 1.6.0 is now crashing too... why's that?
22:27:03 <Samu> ah... configuration file, they mean openttd.cfg
22:31:20 <Samu> savegame_format = O
22:31:46 <Samu> so this simple O in openttd.cfg was making me lose my mind
22:32:07 <Samu> problem solved
22:32:10 <Samu> lol
22:37:30 *** FLHerne has quit IRC
22:37:40 *** FLHerne has joined #openttd
22:38:47 *** FLHerne has quit IRC
22:39:10 *** FLHerne has joined #openttd
22:47:30 *** FLHerne_ has joined #openttd
22:47:30 *** FLHerne has quit IRC
22:48:25 *** FLHerne_ has quit IRC
22:48:39 *** FLHerne_ has joined #openttd
22:54:57 *** FLHerne has joined #openttd
22:55:51 *** FLHerne_ has quit IRC
23:02:42 *** Supercheese is now known as Guest904
23:02:49 *** Supercheese has joined #openttd
23:15:52 *** Wormnest has joined #openttd
23:25:58 *** Goddesen has quit IRC
23:34:04 *** Goddesen has joined #openttd
23:39:44 *** Progman has quit IRC
23:40:51 *** frosch123 has quit IRC
23:40:58 <Samu> i had no idea savegame format could be configured in openttd.cfg :(
23:41:10 <Samu> this voids almost 100% of my ideas
23:41:12 <Samu> lol
23:42:10 <Samu> i'm always learning something new about openttd
23:46:41 <Samu> omg.... https://wiki.openttd.org/Savegame_format
23:46:45 <Samu> I am so sad now :8
23:51:38 *** sim-al2 has joined #openttd
23:53:45 *** supermop has quit IRC
23:56:54 <Samu> well this means you actually support lzo
23:56:59 <Samu> officially