Back to Home / #openttd / 2019 / 06 / Prev Day | Next Day
#openttd IRC Logs for 2019-06-11

---Logopened Tue Jun 11 00:00:19 2019
00:21-!-snail_UES_ [] has quit [Quit: snail_UES_]
01:00-!-Compu [] has joined #openttd
01:00-!-Compu is "Compu" on #help #openttd #/r/openttd
01:00-!-Compu [] has quit []
01:19-!-Speedy` [] has joined #openttd
01:19-!-Speedy` is "Speedy's my name." on #openttd #sd
02:23-!-nielsm [] has joined #openttd
02:23-!-nielsm is "Niels Martin Hansen" on #openttd
02:35-!-andythenorth [] has joined #openttd
02:35-!-andythenorth is "andythenorth" on #openttd
02:58-!-tycoondemon [] has quit []
03:30-!-andythenorth [] has quit [Quit: andythenorth]
03:55-!-Flygon_ [] has joined #openttd
03:55-!-Flygon_ is "Flygon" on #openttd
03:56-!-Supercheese [] has quit [Quit: Valete omnes]
04:01-!-Flygon [] has quit [Ping timeout: 480 seconds]
04:05-!-goodger [~goodger@] has quit [Remote host closed the connection]
04:08-!-goodger [~goodger@] has joined #openttd
04:08-!-goodger is "GOODGER" on #openttd
04:33-!-cHawk [] has joined #openttd
04:33-!-cHawk is "realname" on #debian-offtopic #debian-next #openttd #debian
05:32-!-somerandom [] has joined #openttd
05:32-!-somerandom is "unknown" on #openttd
05:33<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?
05:34<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)
05:36<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
05:37<somerandom>yeah well... could i please at least try? please?
05:38<somerandom>seriously, i have a dual socket xeon motherboard here with 96 gigabytes of ram
05:38<nielsm>nobody cares about your number of CPUs
05:39<nielsm>ottd is single-threaded and cannot be multithreaded due to the core structure of the simulation
05:39<somerandom>aaaaw, there it is. previusly i tried genworld_gui.cpp with no luck
05:41<nielsm>also look for game_creation.map_x and .map_y in table/settings.ini
05:42<nielsm>though you probably don't need to change anything there
05:47<somerandom>it breaks down here: assert_compile(lengthof(feedbacks) == 2 * MAX_MAP_SIZE_BITS - 2 * MIN_MAP_SIZE_BITS + 1);
05:47<nielsm>yeah figure out what that "feedbacks" thing is and if it's something you can increase
05:49<somerandom>i think i can manage that
05: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
05:52<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
05:52<nielsm>there may not be enough space in that field to expand the effective size of a tileindex
05:54-!-arikover [] has joined #openttd
05:54-!-arikover is "unknown" on #openttd
05:57<somerandom>second issue. land can be purchased only one tile at a time, while for example bulldozing can be done on larger areas.
05:57<nielsm>I believe that's intentional to limit certain types of griefing
05:59<somerandom>but... is there an easy way to implement the same function for purchasing land?
05:59<LordAro>yes, by writing it
06:00<somerandom>so its not only a copy-paste affair then?
06:00<LordAro>almost certainly not
06:00<LordAro>OTTD is a complex program
06:00<somerandom>i have some experience with c/c++ but not at this level
06:00<LordAro>perfect opportunity to learn :)
06:01<LordAro>any "fix" for land purchasing would involve the same limiting backoff factor that bulldozing has, except much more harshly
06:01<LordAro>and even then it might get rejected
06: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
06:10<LordAro>the issue is that it's a stupidly easy tool to abuse
06:11<LordAro>and we don't really want to introduce differing behaviour between singleplayer & multiplayer
06:11<somerandom>aaaaw ok
06:11<LordAro>if you can come up with some solution to it, then great :)
06:11<LordAro>but no one here has come up with anything in the last 15 years
06:22<somerandom>what about tor support? say i'd want to run a multiplayer server as a tor hidden service?
06:24<nielsm>can't that be done with a virtual loopback adapter the game listens on?
06:25<LordAro>i'm not hugely familiar with tor, but i can't imagine that there's anything specific that OTTD needs to support
06:28<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
06:31<nielsm>try in scenario editor instead, than you can get the terrain generated without towns and industries placed
06:31<nielsm>see if it does something wrong
06:34<LordAro>istr seeing a 8192x8192 patch in the past
06:34<LordAro>i imagine it was dropped as "utterly impractical"
06:34<LordAro>let's be honest, 4096 is stupid big already
06:35<somerandom>in my experience its the upper limit for what can be regarded as practical
06:38<LordAro> yeah, a Bilbo patch
06:38<LordAro>think this was mostly what got included in the game way back when
06:39<somerandom>the scenario editor can generate flat land for 8k*8k maps but not truly random terrain
06:40<somerandom>not a brilliant idea after all
06:41<somerandom>you've been really helpful so far... can you now please tell me the file where the code for purchasing land is?
06:42<nielsm>multiple files
06:42<nielsm>at least one _cmd.cpp and one _gui.cpp
06:44<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
06:44<somerandom>i simply use grep
06:46<LordAro>of course
07:01<somerandom>do you have any documentation on the source code available at all?
07:03<nielsm>not everything seems to be indexed and it's not always useful, but it's there
07:04<LordAro>pretty sure that's not been updated in a year either
07:04<LordAro>it never got set up properly
07:04-!-Samu [] has joined #openttd
07:04-!-Samu is "realname" on #openttd
07:09<Samu>wow what happened to the forum?
07:10<nakki>what do you mean?
07:11<FLHerne>somerandom: If you're just hacking it for your own use, you can always just feed it a heightmap?
07:18<Samu>oh, i see
07:38-!-arikover [] has quit [Remote host closed the connection]
07:56-!-andythenorth [] has joined #openttd
07:56-!-andythenorth is "andythenorth" on #openttd
08:36-!-snail_UES_ [] has joined #openttd
08:36-!-snail_UES_ is "Jacopo Coletto" on #openttd
08:55-!-snail_UES_ [] has quit [Quit: snail_UES_]
09:04-!-techmagus [] has quit []
09:05-!-techmagus [chatrix@] has joined #openttd
09:05-!-techmagus is "Yahanan Xie" on #openttd #friendica #/r/openttd
09:29<somerandom>aaaaaaaaaw you people use a glfsr for a pseudorandom number generation. shame on you. shame!
09:30<somerandom>its patended unless i'm mistaking
09:30<somerandom>overall its rather lousy to implement in software. i'm certain there are better alternatives
09:33<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
09:34<somerandom>but seriously... glfsr?
09:34<somerandom>we were taught they are obsolete these days
09:39-!-tokai|noir [] has joined #openttd
09:39-!-tokai|noir is "Christian Rosentreter" on #openttd
09:39-!-mode/#openttd [+v tokai|noir] by ChanServ
09:40<Heiki>perhaps that’s why OpenTTD is seldom used for cryptography
09:41<nielsm>yeah there's nothing that needs to be secure, it just needs to be unpredictable to the player
09:41<nielsm>(and if someone wants to TAS the game and abuse the RNG they're welcome)
09:42<LordAro>i for one, do all my banking with OTTD
09:42<nielsm>the only argument I can think of for replacing the RNG would be a significant performance improvement in the game loop
09:43<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?
09:43<LordAro>s/glfsr/std::mt19937/ ?
09:44<LordAro>it's not exactly a bottleneck
09:44<nielsm>sure, as long as it will produce the same sequence on any machine a PR is welcome
09:44<nielsm>but you probably need to demonstrate an actual performance improvement
09:44<nielsm>(that is measured in more than microseconds per frame)
09:45<LordAro>(or be significantly less code)
09:46-!-tokai [] has quit [Ping timeout: 480 seconds]
09:47<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.
09:47<somerandom>i'm thinking more of elliptic curves.
09:49<LordAro>neither rolling our own crypto or requiring openssl are particularly desirable
09:52<somerandom>your current implementation... what does it use as seed?
09:54<nielsm>the value stored in the savegame or received from the network server
09:55<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
09:55<somerandom>yes, that is the definition of a pseudorandom number generator
09:56<somerandom>is the lfsr used for generating the world at the beginning of every game?
09:56<nielsm>you keep talking about this like it's a question of security
10:00<andythenorth>he mentioned patents first, to be fair :)
10:00<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
10:00<andythenorth>most things in ottd can
10:01<somerandom>actually i'm under the impression glfsr is patented but i'm not sure. didn't find anything by googling once
10: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)
10:07<nielsm>Corns[m]: in the C++ code, or in AI, or where?
10:08<nielsm>in C++, this header defines what you need:
10:10<somerandom>i ran out of ram experimenting. clearly 32k*32k is too much for my laptop
10:10<somerandom>need to reboot. we will have to continue this later.
10:10-!-somerandom [] has quit [Quit: rcirc on GNU Emacs 24.5.1]
10:10<Corns[m]>nielsm: in C++
10:11<Corns[m]>oh yeah i'm looking at it right now HAHA
10:11<Corns[m]>thank you :)
10:11<Corns[m]>buoys don't affect the tile class, do they?
10:11<Corns[m]>also what constitutes a WATER_TILE_COAST tile?
10:11<nielsm>yes they do
10:11<nielsm>buoys are station tiles
10:12<nielsm>WATER_TILE_COAST are the "beach" tiles, the slopes down to ocean level
10:12*andythenorth makes Hog
10:12<Corns[m]>oh i see - does that include the diagonal cost tiles? i.e. the half land/half water tiles
10:13<nielsm>I think so, not sure
10:13<Corns[m]>i guess i can always test - thank you :)
10:21<Corns[m]>yup buoys fail the IsWaterTile() function
10:23-!-andythenorth [] has quit [Quit: andythenorth]
10:24<Corns[m]>wait so how would i check if a tile has a buoy on it?
10:26<Corns[m]>answer: IsBuoyTile()
10:48-!-andythenorth [] has joined #openttd
10:48-!-andythenorth is "andythenorth" on #openttd
11:07-!-sla_ro|master [] has joined #openttd
11:07-!-sla_ro|master is "slamaster" on @#sla #openttd
11:52-!-someguy [] has joined #openttd
11:52-!-someguy is "unknown" on #openttd
11:52<someguy>hi again
11:53<someguy>is the glfsr used for generating the world at the start of every game?
11:59<LordAro>i imagine you can work that out as well as anyone else
12:01-!-HerzogDeXtEr [] has joined #openttd
12:01-!-HerzogDeXtEr is "purple" on #openttd
12:02<someguy>that's it. in the near future i'll start some serious effort to replace it for you.
12:11-!-Gustavo6046 [~Gustavo60@2804:14d:4cd8:81a4:98dd:779d:a395:156b] has joined #openttd
12:11-!-Gustavo6046 is "Non dico nomen." on #openttd #oftc #moocows
12:11<LordAro>someguy: :)
12:13<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
12:32-!-tycoondemon [] has joined #openttd
12:32-!-tycoondemon is "..." on #openttd
12:36-!-supermop_work [~supermopw@] has joined #openttd
12:36-!-supermop_work is "A CIRC user" on #openttd
12:44-!-Flygon_ [] has quit [Read error: Connection reset by peer]
13:09-!-Wolf01 [] has joined #openttd
13:10-!-Wolf01 is "Wolf01" on #openttd
13:24-!-cHawk [] has quit [Quit: Leaving]
13:41<someguy>anyway, as i experimented, 32k*32k maps could technically work with enough ram. 64k*64k give a segmentation fault.
13:43<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
13:44<dwfreed>so if somebody used signed int, it would overflow
13:47<LordAro>wouldn't necessarily segfault though :p
13:51-!-gelignite [] has joined #openttd
13:51-!-gelignite is "gelignite" on #openttd
13:55-!-Progman [] has joined #openttd
13:55-!-Progman is "Peter Henschel" on #openttd
13:57<dwfreed>LordAro: it would give a tile count of -1
13:57-!-Gumle2 [] has joined #openttd
13:57-!-Gumle2 is "Martin" on #ceph #bcache #openttd
13:58<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
13:59<FLHerne>Even with 15 active players, 4k^2 is enough for every company to essentially ignore all the others
13:59<FLHerne>And of course for SP it's too large for anyone to really interact with more than a tiny fraction of it
14:00<FLHerne>(no, dragging rails in straight lines directly over hills doesn't count... :-/)
14:01<andythenorth>some people just want MOAR
14:01*andythenorth would never ask for MOAR in newgrf :P
14:01<andythenorth>ever never
14:01<FLHerne>The map just turns into a featureless repeating pattern of towns, with stuff scrawled on it arbitrarily
14:01<milek7_>even ignoring gameplay sense, it is just too slow
14:01<FLHerne>(the default mapgen doesn't help)
14:02<FLHerne>512^2, or even 1024^2, can be divided into distinctive areas with recognisable features
14:03-!-tokai [] has joined #openttd
14:03-!-tokai is "Christian Rosentreter" on #openttd
14:03-!-mode/#openttd [+v tokai] by ChanServ
14:10-!-tokai|noir [] has quit [Ping timeout: 480 seconds]
14:34<andythenorth>what DID I do to make articulated trucks in Hog
14:35<andythenorth>something about vehicles shorter than sprites
14:35<andythenorth>and shifting offsets around :P
14:36<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
14:47-!-Thedarkb [] has joined #openttd
14:47-!-Thedarkb is "realname" on #oolite #openttd #/r/openttd
15:01-!-cHawk [~cHawk@2a02:2455:362:e800:24a2:5514:4809:47c1] has joined #openttd
15:01-!-cHawk is "realname" on #debian-offtopic #debian-next #openttd #debian
15:12-!-Gumle2 [] has quit []
15:21<supermop_work>andythenorth: whatever i did was clunky
15:21<supermop_work>but i think I followed you
15:24-!-glx [] has joined #openttd
15:24-!-mode/#openttd [+v glx] by ChanServ
15:24-!-glx is "Loïc GUILLOUX" on +#openttd
15:30-!-Gumle2 [] has joined #openttd
15:30-!-Gumle2 is "Martin" on #ceph #bcache #openttd
16:07<andythenorth>hmm time to add some feldbahn eh
16:14-!-gelignite [] has quit [Quit: Good fight, good night!]
16:31<andythenorth>peter1138 did you finish all Doom mods yet?
16:32<LordAro>!seen peter1138
16:32<LordAro>@seen peter1138
16:32<@DorpsGek>LordAro: peter1138 was last seen in #openttd 3 days, 9 hours, 25 minutes, and 25 seconds ago: <peter1138> titties are better now
16:33<LordAro>didn't realise it had been quite so long
16:36-!-arikover [] has joined #openttd
16:36-!-arikover is "unknown" on #openttd
17:07-!-HerzogDeXtEr [] has quit [Read error: Connection reset by peer]
17:09-!-cHawk [~cHawk@2a02:2455:362:e800:24a2:5514:4809:47c1] has quit [Quit: Leaving]
17:10-!-andythenorth [] has left #openttd []
17:15-!-sla_ro|master [] has quit []
17:21-!-tycoondemon [] has quit []
17:23-!-rocky11384497 [~rocky1138@] has quit [Remote host closed the connection]
17:24-!-rocky11384497 [~rocky1138@] has joined #openttd
17:24-!-rocky11384497 is "Your Mom" on #openttd
17:30-!-Wolf01 [] has quit [Quit: Once again the world is quick to bury me.]
17:31-!-arikover [] has quit [Remote host closed the connection]
17:33-!-Progman [] has quit [Remote host closed the connection]
17:33-!-Arveen [] has quit [Quit: I like trains]
18:00-!-tycoondemon [] has joined #openttd
18:00-!-tycoondemon is "..." on #openttd
18:02<peter1138>All Doom mods? No...
18:02<LordAro>he's back!
18:02<peter1138>I was at the pub.
18:03<LordAro>for 3 days?!
18:03<peter1138>Y... no.
18:38-!-k-man [] has quit [Remote host closed the connection]
18:44-!-k-man [] has joined #openttd
18:44-!-k-man is "Jason Lewis" on #oftc #osm-au #openttd #virt #debian-installer
18:53-!-nielsm [] has quit [Quit: wroom]
19:32-!-Gumle2 [] has quit []
19:34-!-Thedarkb [] has quit [Ping timeout: 480 seconds]
19:55-!-Thedarkb [] has joined #openttd
19:55-!-Thedarkb is "realname" on #oolite #openttd #/r/openttd
19:57-!-chomwitt [~chomwitt@2a02:587:dc18:5c00:2c73:f26:ff57:d5fd] has joined #openttd
19:57-!-chomwitt is "chomwitt" on #debian-lxc #debian-offtopic #debian-kde #oolite #openttd #debian #debian-games
20:00-!-snail_UES_ [] has joined #openttd
20:00-!-snail_UES_ is "Jacopo Coletto" on #openttd
20:20-!-tokai|noir [] has joined #openttd
20:20-!-tokai|noir is "Christian Rosentreter" on #openttd
20:20-!-mode/#openttd [+v tokai|noir] by ChanServ
20:27-!-tokai [] has quit [Ping timeout: 480 seconds]
20:46-!-Samu [] has quit [Ping timeout: 480 seconds]
20:57-!-Thedarkb [] has quit [Ping timeout: 480 seconds]
21:22-!-Supercheese [] has joined #openttd
21:22-!-Supercheese is "Caseum" on #openttd
21:24-!-SimYouLater [] has joined #openttd
21:24-!-SimYouLater is "realname" on #openttd
21:24<SimYouLater>Hey. Is anyone here that can help me out with NML coding?
21:47-!-SimYouLater [] has quit [Quit: Leaving]
22:20-!-chomwitt [~chomwitt@2a02:587:dc18:5c00:2c73:f26:ff57:d5fd] has quit [Ping timeout: 480 seconds]
22:22-!-D-HUND [~debdog@2a00:79c0:671:500:7a24:afff:fe8a:d04d] has joined #openttd
22:22-!-D-HUND is "Wowbagger" on #bitlbee #openttd
22:25-!-debdog [~debdog@2a00:79c0:641:3a00:7a24:afff:fe8a:d04d] has quit [Ping timeout: 480 seconds]
22:55-!-glx [] has quit []
23:08<Eddi|zuHause>... will he some day learn that people are probably not here at 3AM=
23:13-!-Flygon [] has joined #openttd
23:13-!-Flygon is "Flygon" on #openttd
23:17-!-Ttech [] has quit [Quit: Este é o fim.]
23:26-!-Ttech [ttech@2600:3c00::17:8abf] has joined #openttd
23:26-!-Ttech is "Thomas Techinus" on @#botters #moocows @#transcendence @#swift #qemu #openttd #linode #help #oftc
---Logclosed Wed Jun 12 00:00:21 2019