The International Simutrans Forum

 

Author Topic: English's checkbox will always hesitate to accept  (Read 1214 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran jp

  • *
  • Posts: 484
  • Languages: ja
English's checkbox will always hesitate to accept
« on: April 27, 2019, 02:31:19 PM »
(´・ω・`)Hi, Ranran throws a new mystery of extended.

Ranran never speaks English but plays Britain-Ex in English for a view of the world (the name of a city etc.) and coding.
But sometimes I change the language because I miss my native language and the taste of soy sauce.  :-[
I've always been concerned that the game gets stop few seconds when going back to English. (´・ω・`)わかるかね、ワトソン君
If you choose English on languages setting, the game will stop working for a few seconds while CPU usage will bounce. It might be trying to warm my room (and Earth). :::)
This is always seen when clicking English on the languages setting dialog.
This symptom does not occur if you select another language. Only English does!  ::(

This is also a symptom seen only in extended. And this already existed a year ago. Even English speakers should see this fact because they choose English at the first launch of Simutrans-Extended.


And when I was about to post this, Ranran accidentally discovered a new fact.
Pak128.CS-Ex's English is kind.
And also Sweden-EX was also good.

So I'm guessing that the key to solving this mystery is in the contents of en.tab. (´・ω・`)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: English's checkbox will always hesitate to accept
« Reply #1 on: April 27, 2019, 02:41:15 PM »
Interesting obesvation. I suspect that this may simply be due to the size of en.tab compared with the equivalent for other languages. This does not seem to be an error from the information given so far.

Offline Ranran jp

  • *
  • Posts: 484
  • Languages: ja
Re: English's checkbox will always hesitate to accept
« Reply #2 on: May 14, 2019, 09:41:25 AM »
Yes, I identified the pests  lurking in en.tab.  :police:
Code: [Select]
%0_CITY_SYLL
Gar
%1_CITY_SYLL
Fox
%2_CITY_SYLL
Long
%3_CITY_SYLL
Coat
%4_CITY_SYLL
High
%5_CITY_SYLL
Tar
%6_CITY_SYLL
Col
%7_CITY_SYLL
Green
%8_CITY_SYLL
Brent
%9_CITY_SYLL
Salt
%A_CITY_SYLL
Old
%B_CITY_SYLL
Quint
%C_CITY_SYLL
Par
%D_CITY_SYLL
Farr
%E_CITY_SYLL
Dart
%F_CITY_SYLL
Reid
%10_CITY_SYLL
Wind
%11_CITY_SYLL
Night
%12_CITY_SYLL
Hard
%13_CITY_SYLL
Burn
%14_CITY_SYLL
Redd
%15_CITY_SYLL
Hol
%16_CITY_SYLL
Brush
%17_CITY_SYLL
Ard
%18_CITY_SYLL
Add
%19_CITY_SYLL
Yer
%1A_CITY_SYLL
Mar
%1B_CITY_SYLL
Sand
%1C_CITY_SYLL
Mal
%1D_CITY_SYLL
Man
%1E_CITY_SYLL
Birn
%1F_CITY_SYLL
Camber
%20_CITY_SYLL
Winter
%21_CITY_SYLL
Hunger
%22_CITY_SYLL
Har
%23_CITY_SYLL
Hurl
%24_CITY_SYLL
Hat
%25_CITY_SYLL
Horn
%27_CITY_SYLL
Char
%28_CITY_SYLL
Bur
%29_CITY_SYLL
Burl
%2A_CITY_SYLL
New
%2B_CITY_SYLL
New
%2C_CITY_SYLL
Bed
%2D_CITY_SYLL
Brown
%2E_CITY_SYLL
Green
%2F_CITY_SYLL
Far
%30_CITY_SYLL
For
%31_CITY_SYLL
Milk
%32_CITY_SYLL
Honey
%33_CITY_SYLL
Holly
%34_CITY_SYLL
Hex
%35_CITY_SYLL
Six
%36_CITY_SYLL
Oak
%37_CITY_SYLL
Beech
%38_CITY_SYLL
Ash
%39_CITY_SYLL
Willow
%3A_CITY_SYLL
Turn
%3B_CITY_SYLL
Turl
%3B_CITY_SYLL
Ast
%3C_CITY_SYLL
Had
%3D_CITY_SYLL
Rox
%3E_CITY_SYLL
Ril
%3F_CITY_SYLL
Sparrow
%40_CITY_SYLL
Duck
%41_CITY_SYLL
Par
%42_CITY_SYLL
Pid
%43_CITY_SYLL
Pol
%44_CITY_SYLL
Per
%45_CITY_SYLL
Work
%46_CITY_SYLL
Wing
%47_CITY_SYLL
Rain
%48_CITY_SYLL
Sun
%49_CITY_SYLL
Cher
%4A_CITY_SYLL
Thur
%4B_CITY_SYLL
Fur
%4C_CITY_SYLL
Wool
%4D_CITY_SYLL
Sack
%4E_CITY_SYLL
Ax
%4F_CITY_SYLL
Dor
%50_CITY_SYLL
Dud
%51_CITY_SYLL
Dul
%52_CITY_SYLL
Dur
%53_CITY_SYLL
War
%54_CITY_SYLL
Bea
%55_CITY_SYLL
Craw
%56_CITY_SYLL
Crow
%57_CITY_SYLL
Pew
%58_CITY_SYLL
Lum
%59_CITY_SYLL
Gor
%5A_CITY_SYLL
Goose
%5B_CITY_SYLL
Christ
%5C_CITY_SYLL
Steeple
%5D_CITY_SYLL
Star
%5E_CITY_SYLL
Scar
%5F_CITY_SYLL
Pen
%60_CITY_SYLL
Eve
%61_CITY_SYLL
Inn
%62_CITY_SYLL
Lark
%63_CITY_SYLL
Feather
%64_CITY_SYLL
Fin
%65_CITY_SYLL
Spel
%66_CITY_SYLL
Spin
%67_CITY_SYLL
Arl
%68_CITY_SYLL
Mill
%69_CITY_SYLL
Corn
%6A_CITY_SYLL
Wet
%6B_CITY_SYLL
Point
%6C_CITY_SYLL
Rad
%6D_CITY_SYLL
Jar
%6E_CITY_SYLL
El
%6F_CITY_SYLL
Kirk
%70_CITY_SYLL
Nor
%71_CITY_SYLL
Nest
%72_CITY_SYLL
Rust
%73_CITY_SYLL
Varl
%74_CITY_SYLL
Yend
%75_CITY_SYLL
Yerl
%76_CITY_SYLL
Pent
%77_CITY_SYLL
Kis
%78_CITY_SYLL
Kil
%79_CITY_SYLL
Chil
%7A_CITY_SYLL
Dar
%7B_CITY_SYLL
Doll
%7C_CITY_SYLL
Kings
%7D_CITY_SYLL
Queens
%7E_CITY_SYLL
Pros
%7F_CITY_SYLL
Ingle
%80_CITY_SYLL
Beal
%81_CITY_SYLL
Tel
%82_CITY_SYLL
Hunt
%83_CITY_SYLL
Did
%84_CITY_SYLL
Car
%85_CITY_SYLL
Pond
%86_CITY_SYLL
Wolf
%87_CITY_SYLL
Ten
%88_CITY_SYLL
Murd
%89_CITY_SYLL
Ul
%8A_CITY_SYLL
Int
%8B_CITY_SYLL
Curl
%8C_CITY_SYLL
Tog
%8D_CITY_SYLL
Perl
%8E_CITY_SYLL
Hert
%8F_CITY_SYLL
Up
%90_CITY_SYLL
Pint
%91_CITY_SYLL
Punt
%92_CITY_SYLL
Hend
%93_CITY_SYLL
Worl
%93_CITY_SYLL
Peach
%94_CITY_SYLL
Apple
%95_CITY_SYLL
Plum
%96_CITY_SYLL
Nut
%97_CITY_SYLL
Fur
%98_CITY_SYLL
Berry
%99_CITY_SYLL
Cat
%9A_CITY_SYLL
Currant
%9B_CITY_SYLL
Bramble
%9C_CITY_SYLL
Daisy
%9D_CITY_SYLL
Mid
%9E_CITY_SYLL
Pud
%9F_CITY_SYLL
War
%A0_CITY_SYLL
Dark
%A1_CITY_SYLL
Hat
%A2_CITY_SYLL
Bush
%A3_CITY_SYLL
Peter
%A4_CITY_SYLL
Lin
%A5_CITY_SYLL
Win
%A6_CITY_SYLL
Swan
%A7_CITY_SYLL
Swains
%A8_CITY_SYLL
Swin
%A9_CITY_SYLL
Swaf
%AA_CITY_SYLL
Ayl
%AB_CITY_SYLL
Ayls
%AC_CITY_SYLL
Arl
%AD_CITY_SYLL
Arls
%AE_CITY_SYLL
Cro
%AF_CITY_SYLL
Ron
%B0_CITY_SYLL
Isl
%B1_CITY_SYLL
Warren
%B2_CITY_SYLL
Els
%B3_CITY_SYLL
Em
%B4_CITY_SYLL
En
%B5_CITY_SYLL
Elm
%B6_CITY_SYLL
Ed
%B7_CITY_SYLL
Temple
%B8_CITY_SYLL
Nun
%B9_CITY_SYLL
Monk
%BA_CITY_SYLL
Dean
%BB_CITY_SYLL
Chisel
%BC_CITY_SYLL
Wal
%BD_CITY_SYLL
Stan
%BE_CITY_SYLL
Clac
%BF_CITY_SYLL
Tump
%C0_CITY_SYLL
Chart
%C1_CITY_SYLL
Trunk
%C2_CITY_SYLL
Bel
%C3_CITY_SYLL
Ben
%C4_CITY_SYLL
Bar
%C5_CITY_SYLL
Bolt
%C6_CITY_SYLL
Belt
%C7_CITY_SYLL
Fen
%C8_CITY_SYLL
Wan
%C8_CITY_SYLL
Wen
%C9_CITY_SYLL
Wren
%CA_CITY_SYLL
Straw
%CB_CITY_SYLL
Pur
%CC_CITY_SYLL
Pel
%CD_CITY_SYLL
Pet
%CE_CITY_SYLL
Deb
%CF_CITY_SYLL
Dob
%D0_CITY_SYLL
Dol
%D1_CITY_SYLL
Dal
%D2_CITY_SYLL
Del
%D3_CITY_SYLL
Dash
%D4_CITY_SYLL
Raven
%D4_CITY_SYLL
Bin
%D5_CITY_SYLL
Ban
%D6_CITY_SYLL
Barn
%D7_CITY_SYLL
Bil
%D8_CITY_SYLL
Bid
%D9_CITY_SYLL
Bee
%DA_CITY_SYLL
Bor
%DB_CITY_SYLL
Cel
%DC_CITY_SYLL
Cil
%DD_CITY_SYLL
Cul
%DE_CITY_SYLL
Cud
%DF_CITY_SYLL
Farn
%E0_CITY_SYLL
Fern
%E1_CITY_SYLL
Cal
%E2_CITY_SYLL
Cab
%E3_CITY_SYLL
Can
%E4_CITY_SYLL
Bag
%E5_CITY_SYLL
Beg
%E6_CITY_SYLL
Big
%E7_CITY_SYLL
Ceg
%E8_CITY_SYLL
Cig
%E9_CITY_SYLL
Sel
%EA_CITY_SYLL
Cog
%EB_CITY_SYLL
Cry
%EC_CITY_SYLL
Gem
%ED_CITY_SYLL
Cav
%EE_CITY_SYLL
Cov
%EF_CITY_SYLL
Wil
%F0_CITY_SYLL
Carn
%F1_CITY_SYLL
Nel
%F2_CITY_SYLL
Wel
%F3_CITY_SYLL
Land
%F4_CITY_SYLL
Marl
%F5_CITY_SYLL
Black
%F6_CITY_SYLL
Bun
%F7_CITY_SYLL
Stock
%F8_CITY_SYLL
Stash
%F9_CITY_SYLL
Stick
%FA_CITY_SYLL
Brock
%FB_CITY_SYLL
Brack
%FC_CITY_SYLL
Brick
%FD_CITY_SYLL
Breck
%FE_CITY_SYLL
Brink
%FF_CITY_SYLL
Ware
%100_CITY_SYLL
Wer
%101_CITY_SYLL
Wed
%102_CITY_SYLL
Wall
%103_CITY_SYLL
Til
%104_CITY_SYLL
Tile
%105_CITY_SYLL
Lea
%106_CITY_SYLL
Staff
%107_CITY_SYLL
Bund
%108_CITY_SYLL
Harl
%109_CITY_SYLL
Hark
%10A_CITY_SYLL
Heal
%10B_CITY_SYLL
Sto
%10C_CITY_SYLL
Crom
%10D_CITY_SYLL
Cam
%10E_CITY_SYLL
Lav
%10F_CITY_SYLL
Hod
%110_CITY_SYLL
Bull
%111_CITY_SYLL
Bug
%112_CITY_SYLL
Mun
%114_CITY_SYLL
Fore
%114_CITY_SYLL
Hor
%115_CITY_SYLL
Pan
%116_CITY_SYLL
Ter
%117_CITY_SYLL
Ted
%118_CITY_SYLL
Pye
%119_CITY_SYLL
Pils
%11A_CITY_SYLL
Amb
%11B_CITY_SYLL
Nar
%11C_CITY_SYLL
Bat
%11D_CITY_SYLL
Hood
%11E_CITY_SYLL
Am
%11F_CITY_SYLL
An
%120_CITY_SYLL
Wynd
%121_CITY_SYLL
Grim
%122_CITY_SYLL
Grey
%123_CITY_SYLL
Wern
%124_CITY_SYLL
Blox
%125_CITY_SYLL
Flax
%126_CITY_SYLL
Flox
%127_CITY_SYLL
Quant
%128_CITY_SYLL
Bark
%129_CITY_SYLL
Brom
%12A_CITY_SYLL
Munch
%12B_CITY_SYLL
Roth
%12C_CITY_SYLL
Whit
%12D_CITY_SYLL
Kes
%12E_CITY_SYLL
Malt
%12F_CITY_SYLL
Min
%130_CITY_SYLL
Men
%131_CITY_SYLL
Bumble
%132_CITY_SYLL
Bimble
%133_CITY_SYLL
Ward
%134_CITY_SYLL
Pit
%135_CITY_SYLL
Mil
%136_CITY_SYLL
Mast
%137_CITY_SYLL
Stok
%138_CITY_SYLL
Rock
%139_CITY_SYLL
Bride
%13A_CITY_SYLL
Kel
%13B_CITY_SYLL
Key
%13C_CITY_SYLL
Ker
%13D_CITY_SYLL
Down
%13E_CITY_SYLL
Wit
%13F_CITY_SYLL
Rose
%140_CITY_SYLL
Ald
%141_CITY_SYLL
Ver
%142_CITY_SYLL
Arn
%143_CITY_SYLL
Mex
%144_CITY_SYLL
Con
%145_CITY_SYLL
With
%146_CITY_SYLL
Bex
%147_CITY_SYLL
Ac
%148_CITY_SYLL
Beck
%149_CITY_SYLL
Berk
%14A_CITY_SYLL
Bost
%14B_CITY_SYLL
Bre
%14C_CITY_SYLL
Chep
%14D_CITY_SYLL
Lang
%14E_CITY_SYLL
Sud
%14F_CITY_SYLL
Sut
%150_CITY_SYLL
Wim
%151_CITY_SYLL
Bick
%152_CITY_SYLL
Chat
%153_CITY_SYLL
Dim
%154_CITY_SYLL
Dym
%155_CITY_SYLL
Bram
%156_CITY_SYLL
Chor
%157_CITY_SYLL
Wag
%158_CITY_SYLL
Dickle
%159_CITY_SYLL
Peb
%15A_CITY_SYLL
Gos
%15B_CITY_SYLL
Het
%15C_CITY_SYLL
Lem
%15D_CITY_SYLL
Wheat
%15E_CITY_SYLL
Pepper
%15F_CITY_SYLL
Trow
%160_CITY_SYLL
Lead
%161_CITY_SYLL
Craf
%162_CITY_SYLL
Wend
%163_CITY_SYLL
Sheaf
%164_CITY_SYLL
Cass
%165_CITY_SYLL
Yox
%166_CITY_SYLL
Gid
%167_CITY_SYLL
Goat
%168_CITY_SYLL
Chal
%169_CITY_SYLL
Chen
%16A_CITY_SYLL
Chim
%16B_CITY_SYLL
Summer
%16C_CITY_SYLL
Butter
%16D_CITY_SYLL
Sandal
%16E_CITY_SYLL
Comp
%16F_CITY_SYLL
Cromp
%170_CITY_SYLL
Cramp
%171_CITY_SYLL
Cram
%172_CITY_SYLL
Cran
%173_CITY_SYLL
Maple
%174_CITY_SYLL
Map
%175_CITY_SYLL
Swain
%176_CITY_SYLL
Bov
%177_CITY_SYLL
Calv
%178_CITY_SYLL
Cag
%179_CITY_SYLL
Weal
%17A_CITY_SYLL
Pegs
%17B_CITY_SYLL
Tem
%17C_CITY_SYLL
Hog
%17D_CITY_SYLL
Flak
%17E_CITY_SYLL
Fleck
%17F_CITY_SYLL
Carl
%180_CITY_SYLL
Gom
%181_CITY_SYLL
Lym
%182_CITY_SYLL
Lim
%183_CITY_SYLL
Bog
%184_CITY_SYLL
Lew
%185_CITY_SYLL
Lewis
%186_CITY_SYLL
Chid
%187_CITY_SYLL
Thorn
%188_CITY_SYLL
Syd
%189_CITY_SYLL
Skill
%18A_CITY_SYLL
Skell
%18B_CITY_SYLL
Dot
%18C_CITY_SYLL
Wash
%18D_CITY_SYLL
Brid
%18E_CITY_SYLL
Bothen
%18F_CITY_SYLL
Gras
%190_CITY_SYLL
Swy
%191_CITY_SYLL
Lit
%192_CITY_SYLL
Lyt
%193_CITY_SYLL
Bud
%194_CITY_SYLL
Wey
%195_CITY_SYLL
Chick
%196_CITY_SYLL
Gran
%197_CITY_SYLL
Wyk
%198_CITY_SYLL
Bux
%199_CITY_SYLL
Lul
%19A_CITY_SYLL
Kim
%19B_CITY_SYLL
Liv
%19C_CITY_SYLL
Durl
%19D_CITY_SYLL
Bland
%19E_CITY_SYLL
Bos
%19F_CITY_SYLL
Tuck
%200_CITY_SYLL
Mud
%201_CITY_SYLL
Net
%202_CITY_SYLL
Fare
%203_CITY_SYLL
Sin
%204_CITY_SYLL
Cos
%205_CITY_SYLL
Tan
%206_CITY_SYLL
Hay
%207_CITY_SYLL
Hey
%208_CITY_SYLL
Brackles
%209_CITY_SYLL
Mund
%20A_CITY_SYLL
Tang
%20B_CITY_SYLL
Bils
%20C_CITY_SYLL
Tort
%20D_CITY_SYLL
Lanc
%20E_CITY_SYLL
Hov
%20F_CITY_SYLL
Kemp
%210_CITY_SYLL
Bry
%211_CITY_SYLL
Gly
%212_CITY_SYLL
Cuck
%213_CITY_SYLL
Cook
%214_CITY_SYLL
Fry
%215_CITY_SYLL
Bak
%216_CITY_SYLL
Pev
%217_CITY_SYLL
Hast
%218_CITY_SYLL
Wyn
%219_CITY_SYLL
Lyd
%21A_CITY_SYLL
Lad
%21B_CITY_SYLL
Rom
%21C_CITY_SYLL
Rem
%21D_CITY_SYLL
Samp
%21E_CITY_SYLL
Buck
%21F_CITY_SYLL
Dov
%220_CITY_SYLL
Sev
%221_CITY_SYLL
Gal
%222_CITY_SYLL
Gayl
%223_CITY_SYLL
Hal
%224_CITY_SYLL
Id
%225_CITY_SYLL
Tat
%226_CITY_SYLL
Warl
%227_CITY_SYLL
Eg
%228_CITY_SYLL
Wok
%229_CITY_SYLL
Knap
%22A_CITY_SYLL
Knack
%22B_CITY_SYLL
Ever
%22C_CITY_SYLL
Finch
%22D_CITY_SYLL
Crook
%22E_CITY_SYLL
Heck
%22F_CITY_SYLL
Burk
%230_CITY_SYLL
Sher
%231_CITY_SYLL
Tad
%232_CITY_SYLL
Sil
%233_CITY_SYLL
Syl
%234_CITY_SYLL
Been
%235_CITY_SYLL
Buckl
%236_CITY_SYLL
Over
%237_CITY_SYLL
Under
%238_CITY_SYLL
Knit
%239_CITY_SYLL
Lam
%23A_CITY_SYLL
Rams
%23B_CITY_SYLL
Lud
%23C_CITY_SYLL
Croft
%23D_CITY_SYLL
Cobb
%23E_CITY_SYLL
Shrew
%23F_CITY_SYLL
Chip
%240_CITY_SYLL
Tims
%241_CITY_SYLL
Dunk
%242_CITY_SYLL
Oke
%243_CITY_SYLL
Hawks
%244_CITY_SYLL
Hart
%245_CITY_SYLL
Chaff
%246_CITY_SYLL
Misen
%247_CITY_SYLL
Beo
%248_CITY_SYLL
Frost
%249_CITY_SYLL
Loom
%24A_CITY_SYLL
Ler
%24B_CITY_SYLL
Mous

These are all harmful pests.  ::(

I have no idea why English refuses these but English doesn't seem to want to acknowledge their existence at all.  ???
I eliminated them little by little. The more I eliminate it, the faster English will react.
Finally, I left only one pest. However, English did not become completely healthy. After all, I got rid of all the pests then English became healthy.  :thumbsup:

Pros will find the best solution.  :coffee:

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2726
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: English's checkbox will always hesitate to accept
« Reply #3 on: May 14, 2019, 02:50:58 PM »
Aren't these parts of city names used to generate random names? AFAIK pak.cs (or cs.tab for other paksets) uses a list of real city names

Offline ACarlotti

  • *
  • Posts: 483
Re: English's checkbox will always hesitate to accept
« Reply #4 on: May 15, 2019, 01:01:54 AM »
There are (if I've counted correctly) 587 first syllables and 135 last syllables in en.tab. The init_custom_names function will therefore combine these to form 135*587=79245 two-syllable names which it saves in a vector. For each of these names it will create, on average, about 0.16 names with an additional prefix and 0.16 names with an additional suffix. So we get a list of almost 100,000 names.

Furthermore, we do a lot more tests than this in generating the names. To generate two-syllable names, for every first syllable that exists, we check for the existence of each of 1024 last syllables by attempting to translate a string of the form "&182_CITY_SYLL". So we are making 587*1024 calls to the translator.
For each two-syllable name there is a 5% chance that we try adding a prefix, and a 5% chance that we try adding a suffix. So this is already 158490 calls to sim_async_rand. If we try adding a prefix (respectively suffix), then we will probably not hit the cap of 5 selected suffixes, so most of the time we will be checking up to the limit of 256 possible prefixes/suffixes. This entails making (each time) 256 calls to the translator and 256 calls to sim_async_rand. So in total, this is approximately 2,000,000 more calls to each of the translator and sim_async_rand.

There are, I think, around 7000 strings in pak128.Britain and the core en.tab combined, so every 'hashtable' lookup in the translator will require searching through on average 35 items in a bucket (this is one place where the inefficiency of the hashtable implementation is having a noticable impact, although it wouldn't be doing so if the city names were generated more intelligently).

So there's plenty of room for improvements in this function (such that the running time could become negligible). However, it's not currently clear to me why we even need to precompute possible names in the first place. Either we don't care about the city names being the same on the client and server, in which case we can use generic random numbers (i.e. not the synchronised simrand generation); or we do care, in which case we should be able to use simrand as many times as necessary to get a unique name. If we can generate names on the fly, then in Extended (in English) we can save around 1-2MB by not storing the current city_name_list. (At the moment client and server can disagree on new city names, which seems strange.)

Anyway, I think there is no reason for Standard and Extended to be using different city naming systems, so I think it might be worth continuing this discussion in the Standard forums, with a view to incorporating Extended's naming flexibility into Standard once the efficiency problems are fixed.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: English's checkbox will always hesitate to accept
« Reply #5 on: May 16, 2019, 10:18:56 PM »
Thank you for your thoughts in relation to this. I suspect that Standard has not encountered this issue because it very stringently limits the number of random names generated such that this would never be an issue. I think that having a rich selection of random but plausible names is an important part of the gameplay. I am certainly happy for the system to be made more efficient provided that no functionality be lost.

As to synchronising names between the client and server: this is, in practice, not an issue, since one almost never sees the generation of new cities in an ongoing server game. The sim_async_rand() method is used because using the simrand() method caused losses of synchronisation where the server and client had different translation texts.

Pre-generation, I suspect (which is from Standard) may have been thought preferable to testing each generated name against a list of existing town names to prevent duplicates; but given the large number of possible names now allowed in Extended, this calculus may have to be reconsidered.

Given the difference in the number of randomly generated town names permissible in Extended as compared to Standard, I should be interested in views on whether the topic should remain here or whether there is any interest in increasing the maximum number of generated town names in Standard such that this might be relevant to that.

Offline ACarlotti

  • *
  • Posts: 483
Re: English's checkbox will always hesitate to accept
« Reply #6 on: May 16, 2019, 10:38:53 PM »
Pre-generation, I suspect (which is from Standard) may have been thought preferable to testing each generated name against a list of existing town names to prevent duplicates;
This testing still happens anyway; the only potential benefit of pre-generation is that it allows an easy way to cycle through all possibilities, but there are other ways of doing this.

I see no reason not to allow a similar diversity of town names in Standard, so my suggestion is essentially that we improve this feature and backport it to Standard (with roughly the existing functionality from Extended).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: English's checkbox will always hesitate to accept
« Reply #7 on: May 16, 2019, 10:43:00 PM »
This testing still happens anyway; the only potential benefit of pre-generation is that it allows an easy way to cycle through all possibilities, but there are other ways of doing this.

I see no reason not to allow a similar diversity of town names in Standard, so my suggestion is essentially that we improve this feature and backport it to Standard (with roughly the existing functionality from Extended).

Thank you for your thoughts. I have moved this to extension requests, as this is not strictly a bug report and there is no general development forum for Standard.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: English's checkbox will always hesitate to accept
« Reply #8 on: May 18, 2019, 01:53:18 PM »
The first problem of using English to get British names, is in principle not needed, since Simutrans can have a different ingame language than the interface language. Otherwise clients would always use the same language as the GUI.

Maybe that was the reason for the pregenerated names?

Offline Ranran jp

  • *
  • Posts: 484
  • Languages: ja
Re: English's checkbox will always hesitate to accept
« Reply #9 on: May 18, 2019, 02:13:18 PM »
Is it not good to save the automatically generated city name to citylist_en.txt in advance?  ???

Offline ACarlotti

  • *
  • Posts: 483
Re: English's checkbox will always hesitate to accept
« Reply #10 on: May 18, 2019, 07:22:52 PM »
Maybe that was the reason for the pregenerated names?
I don't think that makes any difference - at the moment if you create a new city in a server game, every client will choose a new name according to its own language settings. So I think the name should instead be generated on the server (according, perhaps, to the servers language settings). This is orthogonal to the issue of how those names are generated - the current behaviour could be replicated without having to pregenerate the names (at least in Standard; the behaviour in Extended would probably need to change slightly but not significantly).

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: English's checkbox will always hesitate to accept
« Reply #11 on: May 19, 2019, 12:02:45 PM »
at the moment if you create a new city in a server game, every client will choose a new name according to its own language settings
Isn't that how mulitplayer works in Simutrans? Everything happens everywhere. Which is why players have to ensure their settings and stuff match up beforehand.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1278
  • PAK-DEV P192C
  • Languages: DE, EN
Re: English's checkbox will always hesitate to accept
« Reply #12 on: May 19, 2019, 01:15:31 PM »
Isn't that how mulitplayer works in Simutrans? Everything happens everywhere. Which is why players have to ensure their settings and stuff match up beforehand.
The largest chunk of possible settings is saved with the map, at least those that matter for what "happens" in the game. They are synced when the player loads the map, so it is not required to set everything manually. While this might not be intended design, but a side effect of how things already were before multiplayer was introduced, players don't expect that they need to manually synchronize settings, only pakset and game version.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: English's checkbox will always hesitate to accept
« Reply #13 on: May 19, 2019, 05:04:08 PM »
The largest chunk of possible settings is saved with the map, at least those that matter for what "happens" in the game. They are synced when the player loads the map, so it is not required to set everything manually. While this might not be intended design, but a side effect of how things already were before multiplayer was introduced, players don't expect that they need to manually synchronize settings, only pakset and game version.
And what about translations? In particular the things that go into naming things.

Offline ACarlotti

  • *
  • Posts: 483
Re: English's checkbox will always hesitate to accept
« Reply #14 on: May 19, 2019, 05:59:13 PM »
And what about translations? In particular the things that go into naming things.

I think in general names of descs should be determined by local language settings, but names of individual objects (which can usually be set by players) should be communicated over the network. I realise that this may cause some oddities where a default object name is set based upon the name of a name of a desc, but I think that is a quirk that players would expect. (Unlike the current potential issue of 'I rejoined the server and my newly built city changed name so my line names no longer make sense'.)

Offline Leartin at

  • Devotee
  • *
  • Posts: 1278
  • PAK-DEV P192C
  • Languages: DE, EN
Re: English's checkbox will always hesitate to accept
« Reply #15 on: May 19, 2019, 06:20:22 PM »
And what about translations? In particular the things that go into naming things.
Sorry, my point was solely that players don't normally ensure matching settings, and that they shouldn't have to.

The only named thing that spawns by the game itself as far as I can think are factories, but those are a bit weird because they are translateable; they can change the displayed named if you switch languages, unlike vehicles, lines, stations, cities,... that is, until you edit them manually. So in online games, everyone sees them in their own language.
Since everything else is language-independent once it spawned, everyone would see it named the same way (eventually, at the latest once they rejoin). Since those come into existence due to player action (building a station, buying a convoi, scheduling a line, founding a city...) it would make sense if the name would be provided by the client that player is using.

Offline ACarlotti

  • *
  • Posts: 483
Re: English's checkbox will always hesitate to accept
« Reply #16 on: May 19, 2019, 08:01:20 PM »
it would make sense if the name would be provided by the client that player is using
I disagree, at least in the case of founding new cities. If I had my language set to German but was playing a British-themed map with English-sounding place names, then I would want new cities to be generated with English-sounding place names.

Factories are indeed weird. It looks like the displayed name is determined according to the language when you first open their gui window, and cached thereafter. It seems that the situation is rather more complicated than I realised.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: English's checkbox will always hesitate to accept
« Reply #17 on: May 19, 2019, 08:11:46 PM »
it would make sense if the name would be provided by the client that player is using.
But are they, or does the command sent across the network only say "build station" and every instance of the game figure out the name by themselves?

Secondly, if all players get auto-generated name in their own language, I would believe chatting about them with other players is going to be very confusing. I'm pretty sure the chat doesn't translate. If the builder decides for all, that could just look very silly, with every stop in a city with a different language.

Offline ACarlotti

  • *
  • Posts: 483
Re: English's checkbox will always hesitate to accept
« Reply #18 on: May 19, 2019, 09:55:08 PM »
Factories are indeed weird.
In fact, it looks like I have no way of finding the name of the desc for a factory; only the name of the object itself (which can be changed).

I think the name of an object's desc (where it exists) should always be accessible, and should be displayed to clients in their local language. Names of individual objects can often be edited; in this case I think the name should be transferred over the network and stored in the save. There's an argument for the default name being set according to the clients language settings, but it would probably be more consistent if any default names are set by the server; the client can then easily change them if they want to have the name in their own language.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: English's checkbox will always hesitate to accept
« Reply #19 on: May 20, 2019, 05:47:44 AM »
Station names are in the server language. The server does not sent the name over the network, but is generated bz haltestelle_t::create:name, using the "get_name_language_id()", i.e. the server language. It would be not very difficult to have this for cities as well.

The precalculated lsit was used, because city generation takes a lot of time, and thus this time can be saved at the beginning of the game.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1278
  • PAK-DEV P192C
  • Languages: DE, EN
Re: English's checkbox will always hesitate to accept
« Reply #20 on: May 20, 2019, 07:48:35 AM »
I disagree, at least in the case of founding new cities. If I had my language set to German but was playing a British-themed map with English-sounding place names, then I would want new cities to be generated with English-sounding place names.

But that's rather another example of a different issue, having but one setting for both Game language and citylist language. You would have the same issue playing that british-themed map locally. Same is true for station names. A proper long-term solution would be seperating game language and list language, with the added bonus that this could enable you to pick non-language lists (eg. "Austrian" instead of just German or "Australian" instead of English) Since such a setting would then likely be saved with the map (such that the british themed map always accesses british city names), it would solve itself for multiplayer too.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5555
  • Languages: EN, NO
Re: English's checkbox will always hesitate to accept
« Reply #21 on: May 20, 2019, 08:09:51 AM »
In fact, it looks like I have no way of finding the name of the desc for a factory; only the name of the object itself (which can be changed).

I think the name of an object's desc (where it exists) should always be accessible
Is it really worth using screen space for it? Not everyone have enormous monitors with super resolution, so the space used could quickly become significant. I think players quickly learn to recognize what different objects are by the looks of them.

The place where I think it could be useful having the fixed object type in addition to the editable name, is in the list of connected factories. Unfortunately, that will double the size of what can already be an exhaustively huge list. That is not something I really would want, since the only problems I would have with renamed things are those I renamed myself.