[Mod] Advanced Trains [advtrains] [2.4.3]

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Advanced Trains [advtrains] [1.13]

by orwell » Post

Exactly.
Player presses a control -> client sends it to server(L) -> server indicates that the train should start moving -> server sends movement to client(L)
The steps with (L) are where network latency comes into effect. In singleplayer games, this should hardly be noticable, but it is on servers.
Regarding the computation efficiency of Lua advtrains, I have not much experience, gpcf can probably tell you better how it impacts performance. What I know is that on the Linuxworks server we have about 100 trains running simultaneously, and the performance loss is (still) acceptable compared to the perfomance loss caused by large factories of certain people, which employ thousands of item entities.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Advanced Trains [advtrains] [1.13]

by orwell » Post

gpcf was thinking about offloading the whole train logic into a separate process, independent of minetest, and only communicating required details into the minetest engine through some communication channel. However this is a large amount of work, and we haven't started things like this yet.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
daufinsyd
Member
Posts: 10
Joined: Sun Feb 12, 2017 16:43
GitHub: daufinsyd
In-game: daufinsyd

Re: [Mod] Advanced Trains [advtrains] [1.13]

by daufinsyd » Post

Okay thanks :)
The thing is that I hardly noticed a latency difference between LinuxWorks server and my laptop.

User avatar
BuckarooBanzay
Member
Posts: 435
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] Advanced Trains [advtrains] [1.13]

by BuckarooBanzay » Post

There seems to be a resource duplication bug in the steam locomotive.
You get 4 steel blocks back, thats more than you actually need to craft it :(

btw: really nice mod!
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
BuckarooBanzay
Member
Posts: 435
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] Advanced Trains [advtrains] [1.13]

by BuckarooBanzay » Post

orwell wrote:gpcf was thinking about offloading the whole train logic into a separate process, independent of minetest, and only communicating required details into the minetest engine through some communication channel. However this is a large amount of work, and we haven't started things like this yet.
About that: how about a communication channel over http/curl with an advtrains-backend?
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
dogMine
Member
Posts: 16
Joined: Tue Feb 20, 2018 16:36
Location: france
Contact:

Re: [Mod] Advanced Trains [advtrains] [1.13]

by dogMine » Post

Super mod, I installed it on my server, (mt.dogmine.fr, pass: youki) and I love it. I have not started the automation that looks very complicated, but would not it be possible to have the red and green signs that indicates the position of the switch, it would be great.
Otherwise good luck for this very promising project.
Sorry for the translation.
serveur DogMine - http://www.dogmine.fr

User avatar
dogMine
Member
Posts: 16
Joined: Tue Feb 20, 2018 16:36
Location: france
Contact:

Re: [Mod] Advanced Trains [advtrains] [1.13]

by dogMine » Post

The rails are protected, but a clever little broke the blocks below to remove them. I'll have to put obsidian under the rails until you fix this bug, if it's one.
serveur DogMine - http://www.dogmine.fr

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Advanced Trains [advtrains] [1.13]

by Byakuren » Post

dogMine wrote:The rails are protected, but a clever little broke the blocks below to remove them. I'll have to put obsidian under the rails until you fix this bug, if it's one.
Couldn't you protect the nodes under the rails? (Assuming protected = protected using protection mods)
Every time a mod API is left undocumented, a koala dies.

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [Mod] Advanced Trains [advtrains] [1.13]

by gpcf » Post

The thing with protection is a known problem, there is a long thread on the bug tracker discussing how to do proper protection. Link is https://bugs.linux-forks.de/advtrains/22.html (Warning: in German).

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Advanced Trains [advtrains] [1.13]

by orwell » Post

dogMine wrote:Super mod, I installed it on my server, (mt.dogmine.fr, pass: youki) and I love it. I have not started the automation that looks very complicated, but would not it be possible to have the red and green signs that indicates the position of the switch, it would be great.
Otherwise good luck for this very promising project.
Sorry for the translation.
The switches (I use the more uncommon word "turnout" because I want to evade misunderstandings with mesecon switches) can be controlled with mesecons. You can create a small Mesecon circuit with a microcontroller, two lightstones and a button to create such a display.
EDIT: Smacker has created very cool turnout levers. I don't exactly know where to find them, gpcf can probably tell you. They are in use on the Linuxworks server.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
dogMine
Member
Posts: 16
Joined: Tue Feb 20, 2018 16:36
Location: france
Contact:

Re: [Mod] Advanced Trains [advtrains] [1.13]

by dogMine » Post

thank you, that's exactly what I wanted to control my station
Image
aiguillage.jpg
aiguillage.jpg (159.88 KiB) Viewed 1086 times
-
serveur DogMine - http://www.dogmine.fr

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [Mod] Advanced Trains [advtrains] [1.13]

by gpcf » Post

Switches are available from https://github.com/h-v-smacker/railroad_paraphernalia . They're based on switches from the Soviet Union

User avatar
dogMine
Member
Posts: 16
Joined: Tue Feb 20, 2018 16:36
Location: france
Contact:

Re: [Mod] Advanced Trains [advtrains] [1.13]

by dogMine » Post

thankyou but I have an error
2018-09-06 14:16:35: ERROR[Main]: ModError: Failed to load and run script from /var/games/minetest-server/.minetest/mods/railroad/init.lua:
2018-09-06 14:16:35: ERROR[Main]: /usr/share/games/minetest/builtin/game/register.lua:65: Name railroad_paraphernalia:switch_with_arrow does not follow naming conventions: "railroad:" or ":" prefix required
serveur DogMine - http://www.dogmine.fr

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [Mod] Advanced Trains [advtrains] [1.13]

by gpcf » Post

mv railroad railroad_paraphernalia

your directory is not named correctly.

User avatar
dogMine
Member
Posts: 16
Joined: Tue Feb 20, 2018 16:36
Location: france
Contact:

Re: [Mod] Advanced Trains [advtrains] [1.13]

by dogMine » Post

thank you it works, I will try this mod
I added you to the whitelist if you connect I will give you all privs.
serveur DogMine - http://www.dogmine.fr

User avatar
dogMine
Member
Posts: 16
Joined: Tue Feb 20, 2018 16:36
Location: france
Contact:

Re: [Mod] Advanced Trains [advtrains] [1.13]

by dogMine » Post

it would be nice to put the light in the wagons, a train that circulates lit up in the night, it's beautiful.
serveur DogMine - http://www.dogmine.fr

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Advanced Trains [advtrains] [1.13]

by orwell » Post

Sadly, this is currently not possible (except with ugly hacks) due to engine limitations. Minetest doesn't support attaching light sources to entities...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Advanced Trains [advtrains] [1.13]

by Byakuren » Post

A simple hack would be to place invisible light-emitting nodes that decay when there's no train on top of them. Though that could be expensive due to modifying the world and triggering lighting calculations.
Every time a mod API is left undocumented, a koala dies.

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [Mod] Advanced Trains [advtrains] [1.13]

by gpcf » Post

maybe we should start compiling engine changes we want to happen for them to be included in 0.5

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Advanced Trains [advtrains] [1.13]

by orwell » Post

I've finished writing the interlocking system guide. It can be found at http://advtrains.bleipb.de/interlocking
You can try it out using the TSS branch, download link:
https://git.bananach.space/advtrains.gi ... ns-tss.zip
Once it is proven that everything works, this will become the new stable version. Please download and test it, and give me feedback!
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

Mikola
Member
Posts: 16
Joined: Fri Nov 24, 2017 18:01
GitHub: Mikola314
In-game: mikola

Re: [Mod] Advanced Trains [advtrains] [1.13]

by Mikola » Post

Hello. Which version Minetest you use for testing and best performance mod Advanced Trains: minetest 0.4.17 or minetest 5.0?

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Advanced Trains [advtrains] [1.13]

by orwell » Post

I use 0.4.17.1, and everything is designed to work in at least 0.4.17, but may work in earlier versions.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

Mikola
Member
Posts: 16
Joined: Fri Nov 24, 2017 18:01
GitHub: Mikola314
In-game: mikola

Re: [Mod] Advanced Trains [advtrains] [1.13]

by Mikola » Post

I found the problem in advtrains-tss.
The mod advtrains_itrainmap does not work. In a stable version, this mod works.
In the tss version there are no functions advtrains.detector.on_node and advtrains.detector.get .

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Advanced Trains [advtrains] [1.13]

by orwell » Post

Ah, right, thank you. Fixing itrainmap is one of the next things to be done, however I need to clarify this.
Itrainmap is broken. It will be fixed soon (TM)
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
h-v-smacker
Member
Posts: 115
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] Advanced Trains [advtrains] [1.13]

by h-v-smacker » Post

Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests