Config
Log for #openttd on 11th June 2019:
Times are UTC Toggle Colours
00:00:38  *** Samu has quit IRC
00:09:13  *** Thedarkb has quit IRC
00:26:56  *** HerzogDeXtEr has quit IRC
01:27:00  *** Flygon has joined #openttd
02:22:20  *** debdog has joined #openttd
02:25:43  *** D-HUND has quit IRC
02:44:29  *** glx has quit IRC
03:03:31  *** Gustavo6046 has quit IRC
04:21:41  *** snail_UES_ has quit IRC
05:00:30  *** Compu has joined #openttd
05:19:20  *** Speedy` has joined #openttd
06:23:27  *** nielsm has joined #openttd
06:35:55  *** andythenorth has joined #openttd
06:58:50  *** tycoondemon has quit IRC
07:25:37  <andythenorth> moin
07:30:49  *** andythenorth has quit IRC
07:55:22  *** Flygon_ has joined #openttd
07:56:21  *** Supercheese has quit IRC
08:01:09  *** Flygon has quit IRC
08:05:22  *** goodger has quit IRC
08:08:10  *** goodger has joined #openttd
08:33:24  *** cHawk has joined #openttd
09:32:27  *** somerandom has joined #openttd
09:33:17  <somerandom> hi all... i'm trying to generate larger then 4096*4096 maps but i cant find the correct setting in the source code. help please?
09:34:57  <nielsm> first consider the explosive complexity by doubling the number of tiles even more times and how it will impact the performance (which is already bad on large maps)
09:36:22  <nielsm> I think there may also be some places in the code that assume that a tile index fits within 20 bits or 24 bits which may break in unexpected ways if you increase it
09:37:22  <somerandom> yeah well... could i please at least try? please?
09:38:15  <nielsm> map_type.h
09:38:32  <somerandom> seriously, i have a dual socket xeon motherboard here with 96 gigabytes of ram
09:38:42  <nielsm> nobody cares about your number of CPUs
09:39:07  <nielsm> ottd is single-threaded and cannot be multithreaded due to the core structure of the simulation
09:39:30  <somerandom> aaaaw, there it is. previusly i tried genworld_gui.cpp with no luck
09:41:50  <nielsm> also look for game_creation.map_x and .map_y in table/settings.ini
09:42:11  <nielsm> though you probably don't need to change anything there
09:47:16  <somerandom> it breaks down here: assert_compile(lengthof(feedbacks) == 2 * MAX_MAP_SIZE_BITS - 2 * MIN_MAP_SIZE_BITS + 1);
09:47:57  <nielsm> yeah figure out what that "feedbacks" thing is and if it's something you can increase
09:49:05  <somerandom> i think i can manage that
09:51:51  <nielsm> thing is, all actions in OTTD are based around commands (which are also what is transmitted on the network protocol), and a command has just two 32 bit fields which are often bitstuffed
09:52:18  <nielsm> it also has a third 32 bit field for the target tile of the command, but some commands require two tile indexes, and if the second tile index is in a bitstuffed field
09:52:36  <nielsm> there may not be enough space in that field to expand the effective size of a tileindex
09:54:35  *** arikover has joined #openttd
09:57:16  <somerandom> second issue. land can be purchased only one tile at a time, while for example bulldozing can be done on larger areas.
09:57:42  <nielsm> I believe that's intentional to limit certain types of griefing
09:59:35  <somerandom> but... is there an easy way to implement the same function for purchasing land?
09:59:47  <LordAro> yes, by writing it
10:00:02  <somerandom> so its not only a copy-paste affair then?
10:00:09  <LordAro> almost certainly not
10:00:17  <LordAro> OTTD is a complex program
10:00:34  <somerandom> i have some experience with c/c++ but not at this level
10:00:47  <LordAro> perfect opportunity to learn :)
10:01:19  <LordAro> any "fix" for land purchasing would involve the same limiting backoff factor that bulldozing has, except much more harshly
10:01:32  <LordAro> and even then it might get rejected
10:09:09  <somerandom> but seriously purchasing land tile by tile has been a pain for me since i started playing the original transport tycoon in the 90's
10:10:33  <LordAro> the issue is that it's a stupidly easy tool to abuse
10:11:07  <LordAro> and we don't really want to introduce differing behaviour between singleplayer & multiplayer
10:11:17  <somerandom> aaaaw ok
10:11:43  <LordAro> if you can come up with some solution to it, then great :)
10:11:57  <LordAro> but no one here has come up with anything in the last 15 years
10:22:12  <somerandom> what about tor support? say i'd want to run a multiplayer server as a tor hidden service?
10:24:39  <nielsm> can't that be done with a virtual loopback adapter the game listens on?
10:25:42  <LordAro> i'm not hugely familiar with tor, but i can't imagine that there's anything specific that OTTD needs to support
10:28:47  <somerandom> alright, 8192*8192 maps work with the original land generator. terra genesis says "map generation aborted... ... no suitable town locations". it appears it generates a whole lot of water
10:31:40  <nielsm> try in scenario editor instead, than you can get the terrain generated without towns and industries placed
10:31:47  <nielsm> see if it does something wrong
10:34:08  <LordAro> istr seeing a 8192x8192 patch in the past
10:34:20  <LordAro> i imagine it was dropped as "utterly impractical"
10:34:29  <somerandom> really?
10:34:37  <LordAro> let's be honest, 4096 is stupid big already
10:35:10  <somerandom> in my experience its the upper limit for what can be regarded as practical
10:38:07  <LordAro> https://www.tt-forums.net/viewtopic.php?t=33137 yeah, a Bilbo patch
10:38:22  <LordAro> think this was mostly what got included in the game way back when
10:39:01  <somerandom> the scenario editor can generate flat land for 8k*8k maps but not truly random terrain
10:40:23  <somerandom> not a brilliant idea after all
10:41:56  <somerandom> you've been really helpful so far... can you now please tell me the file where the code for purchasing land is?
10:42:39  <nielsm> multiple files
10:42:54  <nielsm> at least one _cmd.cpp and one _gui.cpp
10:44:38  <somerandom> terraform_gui.cpp?
10:44:45  <LordAro> i start by finding a string referencing the thing i want to find, then repeatedly search through the code until i find something relevant
10:44:58  <somerandom> i simply use grep
10:46:46  <LordAro> of course
11:01:36  <somerandom> do you have any documentation on the source code available at all?
11:02:57  <nielsm> http://docs.openttd.org/index.html
11:03:00  <nielsm> doxygen
11:03:20  <nielsm> not everything seems to be indexed and it's not always useful, but it's there
11:04:08  <LordAro> pretty sure that's not been updated in a year either
11:04:16  <LordAro> it never got set up properly
11:04:46  *** Samu has joined #openttd
11:09:51  <Samu> wow what happened to the forum?
11:10:49  <nakki> what do you mean?
11:11:33  <Samu> tt-forums.net
11:11:43  <FLHerne> somerandom: If you're just hacking it for your own use, you can always just feed it a heightmap?
11:12:25  <FLHerne> Samu: https://www.tt-forums.net/viewtopic.php?f=14&t=85314
11:18:37  <Samu> oh, i see
11:38:49  *** arikover has quit IRC
11:56:59  *** andythenorth has joined #openttd
12:36:47  *** snail_UES_ has joined #openttd
12:55:10  *** snail_UES_ has quit IRC
13:04:53  *** techmagus has quit IRC
13:05:51  *** techmagus has joined #openttd
13:29:37  <somerandom> aaaaaaaaaw you people use a glfsr for a pseudorandom number generation. shame on you. shame!
13:30:01  <somerandom> its patended unless i'm mistaking
13:30:40  <somerandom> overall its rather lousy to implement in software. i'm certain there are better alternatives
13:33:25  <somerandom> i might be the closest thing you have to a cryptographer. i might be able to come up with something else if you don't mind
13:34:09  <somerandom> but seriously... glfsr?
13:34:34  <somerandom> we were taught they are obsolete these days
13:39:23  *** tokai|noir has joined #openttd
13:39:23  *** ChanServ sets mode: +v tokai|noir
13:40:46  <Heiki> perhaps that’s why OpenTTD is seldom used for cryptography
13:41:33  <nielsm> yeah there's nothing that needs to be secure, it just needs to be unpredictable to the player
13:41:56  <nielsm> (and if someone wants to TAS the game and abuse the RNG they're welcome)
13:42:05  <LordAro> i for one, do all my banking with OTTD
13:42:13  <LordAro> -,
13:42:59  <nielsm> the only argument I can think of for replacing the RNG would be a significant performance improvement in the game loop
13:43:07  <somerandom> and it also needs to be efficient. galois/fibonacci lfsr's are not efficient by todays standard. can i make a serious effort to improve your pseudorandom number generator?
13:43:59  <LordAro> s/glfsr/std::mt19937/ ?
13:44:07  <LordAro> it's not exactly a bottleneck
13:44:28  <nielsm> sure, as long as it will produce the same sequence on any machine a PR is welcome
13:44:41  <nielsm> but you probably need to demonstrate an actual performance improvement
13:44:58  <nielsm> (that is measured in more than microseconds per frame)
13:45:20  <LordAro> (or be significantly less code)
13:46:22  *** tokai has quit IRC
13:47:15  <somerandom> actually glfsr is less then ideal because it has a lot of numbers just sitting around doing very much nothing. i don't know about performance but it's more a question of memory.
13:47:58  <somerandom> i'm thinking more of elliptic curves.
13:49:51  <LordAro> neither rolling our own crypto or requiring openssl are particularly desirable
13:52:08  <somerandom> your current implementation... what does it use as seed?
13:54:19  <nielsm> the value stored in the savegame or received from the network server
13:55:06  <nielsm> the purpose of the RNG in the game is to provide a reproducible a sequence of numbers that will be the same on any client simulating the game world from the same initial state, given the same sequence of input
13:55:43  <somerandom> yes, that is the definition of a pseudorandom number generator
13:56:03  <somerandom> is the lfsr used for generating the world at the beginning of every game?
13:56:03  <nielsm> you keep talking about this like it's a question of security
14:00:22  <andythenorth> he mentioned patents first, to be fair :)
14:00:24  <somerandom> well... i'm a mathematician and cryptographer writing my masters thesis. i associate lfsr's with security, but openttd is obviously not a security software. what i'm saying is your current rng could probably be done better
14:00:58  <andythenorth> most things in ottd can
14:01:00  <andythenorth> :)
14:01:19  <somerandom> actually i'm under the impression glfsr is patented but i'm not sure. didn't find anything by googling once
14:06:06  <Corns[m]> q: what function(s) do i use to check if a tile is a plain water tile? e.g. it's a river or ocean tile with no occupying tiles (such as locks, docks)
14:07:20  <nielsm> Corns[m]: in the C++ code, or in AI, or where?
14:08:27  <nielsm> in C++, this header defines what you need: https://github.com/OpenTTD/OpenTTD/blob/master/src/water_map.h
14:10:17  <somerandom> i ran out of ram experimenting. clearly 32k*32k is too much for my laptop
14:10:26  <somerandom> need to reboot. we will have to continue this later.
14:10:28  *** somerandom has quit IRC
14:10:58  <Corns[m]> nielsm: in C++
14:11:14  <Corns[m]> oh yeah i'm looking at it right now HAHA
14:11:14  <Corns[m]> thank you :)
14:11:28  <Corns[m]> buoys don't affect the tile class, do they?
14:11:39  <Corns[m]> also what constitutes a WATER_TILE_COAST tile?
14:11:39  <nielsm> yes they do
14:11:50  <nielsm> buoys are station tiles
14:12:13  <nielsm> WATER_TILE_COAST are the "beach" tiles, the slopes down to ocean level
14:12:23  * andythenorth makes Hog
14:12:48  <Corns[m]> oh i see - does that include the diagonal cost tiles? i.e. the half land/half water tiles
14:13:16  <nielsm> I think so, not sure
14:13:33  <Corns[m]> i guess i can always test - thank you :)
14:21:32  <Corns[m]> yup buoys fail the IsWaterTile() function
14:23:47  *** andythenorth has quit IRC
14:24:31  <Corns[m]> wait so how would i check if a tile has a buoy on it?
14:26:04  <Corns[m]> answer: IsBuoyTile()
14:48:46  *** andythenorth has joined #openttd
15:07:30  *** sla_ro|master has joined #openttd
15:52:22  *** someguy has joined #openttd
15:52:27  <someguy> hi again
15:53:14  <someguy> is the glfsr used for generating the world at the start of every game?
15:59:26  <LordAro> i imagine you can work that out as well as anyone else
16:01:57  *** HerzogDeXtEr has joined #openttd
16:02:30  <someguy> that's it. in the near future i'll start some serious effort to replace it for you.
16:11:01  *** Gustavo6046 has joined #openttd
16:11:51  <LordAro> someguy: :)
16:13:36  <someguy> seriously. it's not only for you. i too benefit from doing so. something like this easily helps me in my masters thesis and even toward a ph.d
16:32:45  *** tycoondemon has joined #openttd
16:36:11  *** supermop_work has joined #openttd
16:44:10  *** Flygon_ has quit IRC
17:09:59  *** Wolf01 has joined #openttd
17:24:02  *** cHawk has quit IRC
17:41:30  <someguy> anyway, as i experimented, 32k*32k maps could technically work with enough ram. 64k*64k give a segmentation fault.
17:43:57  <dwfreed> if k is 1024, 64k * 64k would give you a number larger than could be represented in a 32 bit unsigned integer, unless the first tile is 0
17:44:15  <dwfreed> so if somebody used signed int, it would overflow
17:47:52  <LordAro> wouldn't necessarily segfault though :p
17:51:05  *** gelignite has joined #openttd
17:55:57  *** Progman has joined #openttd
17:57:00  <dwfreed> LordAro: it would give a tile count of -1
17:57:38  *** Gumle2 has joined #openttd
17:58:21  <FLHerne> someguy: Frankly, I don't see the point in trying to permit larger maps; even the current ones are too large for gameplay purposes
17:59:23  <FLHerne> Even with 15 active players, 4k^2 is enough for every company to essentially ignore all the others
17:59:54  <FLHerne> And of course for SP it's too large for anyone to really interact with more than a tiny fraction of it
18:00:15  <FLHerne> (no, dragging rails in straight lines directly over hills doesn't count... :-/)
18:01:23  <andythenorth> some people just want MOAR
18:01:32  * andythenorth would never ask for MOAR in newgrf :P
18:01:36  <andythenorth> ever never
18:01:40  <FLHerne> The map just turns into a featureless repeating pattern of towns, with stuff scrawled on it arbitrarily
18:01:51  <milek7_> even ignoring gameplay sense, it is just too slow
18:01:56  <FLHerne> (the default mapgen doesn't help)
18:02:49  <FLHerne> 512^2, or even 1024^2, can be divided into distinctive areas with recognisable features
18:03:25  *** tokai has joined #openttd
18:03:25  *** ChanServ sets mode: +v tokai
18:10:06  *** tokai|noir has quit IRC
18:34:43  <andythenorth> hmm
18:34:53  <andythenorth> what DID I do to make articulated trucks in Hog
18:35:02  <andythenorth> something about vehicles shorter than sprites
18:35:06  <andythenorth> and shifting offsets around :P
18:36:21  <someguy> there is a chance i remember incorrectly. either flfsr/glfsr or the geffe generator is patented. i'll have to check that out tomorrow
18:47:09  *** Thedarkb has joined #openttd
19:01:18  *** cHawk has joined #openttd
19:12:03  *** Gumle2 has quit IRC
19:21:01  <supermop_work> andythenorth: whatever i did was clunky
19:21:09  <supermop_work> but i think I followed you
19:24:12  *** glx has joined #openttd
19:24:12  *** ChanServ sets mode: +v glx
19:30:36  *** Gumle2 has joined #openttd
20:07:29  <andythenorth> hmm time to add some feldbahn eh
20:14:14  *** gelignite has quit IRC
20:31:05  <andythenorth> peter1138 did you finish all Doom mods yet?
20:32:43  <LordAro> !seen peter1138
20:32:49  <LordAro> @seen peter1138
20:32:49  <DorpsGek> LordAro: peter1138 was last seen in #openttd 3 days, 9 hours, 25 minutes, and 25 seconds ago: <peter1138> titties are better now
20:32:55  <LordAro> hmm.
20:33:07  <LordAro> didn't realise it had been quite so long
20:36:01  *** arikover has joined #openttd
21:07:27  *** HerzogDeXtEr has quit IRC
21:09:27  *** cHawk has quit IRC
21:10:26  *** andythenorth has left #openttd
21:15:10  *** sla_ro|master has quit IRC
21:21:09  *** tycoondemon has quit IRC
21:23:41  *** rocky11384497 has quit IRC
21:24:02  *** rocky11384497 has joined #openttd
21:30:40  *** Wolf01 has quit IRC
21:31:00  *** arikover has quit IRC
21:33:11  *** Progman has quit IRC
21:33:33  *** Arveen has quit IRC
22:00:13  *** tycoondemon has joined #openttd
22:02:37  <peter1138> All Doom mods? No...
22:02:49  <LordAro> he's back!
22:02:57  <peter1138> I was at the pub.
22:03:04  <LordAro> for 3 days?!
22:03:09  <peter1138> Y... no.
22:38:17  *** k-man has quit IRC
22:44:20  *** k-man has joined #openttd
22:53:03  *** nielsm has quit IRC
23:32:42  *** Gumle2 has quit IRC
23:34:48  *** Thedarkb has quit IRC
23:55:21  *** Thedarkb has joined #openttd
23:57:55  *** chomwitt has joined #openttd

Powered by YARRSTE version: svn-trunk