[Mod] Advanced Trains [advtrains] [2.4.3]

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

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

by Maverick2797 » Post

56independent_actual wrote:
Sun Mar 20, 2022 09:45
Do i have to use F.x for every component or is F neglected in LuaATC tracks?
The F table is useful for defining functions in the init code which you can then use in other components. I'll often put commonly used snippets in as quick reference functions instead of typing out the same few lines of code each time.

Eg: some of my functions require a string to be returned, regardless of if get_rc() actually returns a string or nil
Spoiler

Code: Select all

F.get_rc_safe = function()
	return get_rc() or ""
end
Eg: checking if a train has a certain RC entry, much like ARS does
Spoiler

Code: Select all

F.has_rc = function(query,rc_list)
	if rc_list == "" or query == nil or query=="" then return false end
	if not rc_list then rc_list = F.get_rc_safe() end
	for word in rc_list:gmatch("[^%s]+") do
		if word == query then return true end
	end
	return false
end
Eg: selectively removing RC entries from a train
Spoiler

Code: Select all

F.remove_rc = function(rc_list,arrow_mode)
	-- rc_list MUST be a table of rc codes to remove
	-- eg: {"rc1","rc2"}
	-- Arrow Modes:
	-- true: with arrow direction
	-- false: against arrow direction
	-- nil: ignores arrow direction
	
	if not event.train then return end
	if (arrow_mode == nil) or (atc_arrow == arrow_mode) then
		local rc = F.get_rc_safe()
		rc_list = rc_list or {}
		-- ensure rc-remove table can be read
		local rc_remove = {}
		for _,v in pairs(rc_list) do
			rc_remove[v] = true
		end
		
		-- remove codes from train's rc
		local reinsert = {}
		for token in rc:gmatch("[^%s]+") do
			if not rc_remove[token] then
				table.insert(reinsert,token)
			end
		end
		-- insert new string to train's rc
		set_rc(table.concat(reinsert," "))
	end
	return reinsert
end
Eg: modularising a default station function
Spoiler

Code: Select all

--F.arrive and F.depart would be defined before this of course
F.station = function(stn_code,dir,line,delay)
	if event.train then
		F.arrive(stn_code,dir,line)
		interrupt(delay,"depart")
	elseif event.int and event.msg=="depart" then
		F.depart(stn_code,dir,line)
	end
end
-- you'd then just need to put variations of this at each lua-track for each platform:
F.station("Main Station","South","Express",10)
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

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

by yw05 » Post

56independent_actual wrote:
Sun Mar 20, 2022 10:04
yw05 wrote:
Sun Mar 20, 2022 09:56
You can use the F table as well. I tend to use local variables as a habit and (in certain cases) to prevent direct access to certain variables.
Does that have negative security implications here?
I don't think there are "negative security implications" in terms of LuaATC. However, in terms of programming in general, there can be security implications when exposing certain variables, such as some internal variables of my ATCJIT implementation (which I am not maintaining in particular recently).
Can i subtract two POS() objects using the standard subtraction operator (-) with no difficulties?
At the time of writing the POS function is defined as

Code: Select all

POS = function(x,y,z) return {x=x, y=y, z=z} end
So no, you can't use the subtraction operator.
I want to calculate distance between two arbituary points in space which i hope the user will match to the location of the LuaATC and station tracks. Otherwise, i will have to use longform (pos1.x - pos2.x) + (pos1.y - pos2.y) + (pos1.z - pos2.z) (I think this is how it works).
Vector subtraction does not give you the distance between the two vectors.

I'm quite sure what you want is the magnitude of (pos1-pos2) which is math.sqrt((pos1.x-pos2.x)^2+(pos1.y-pos2.y)^2+(pos1.z-pos2.z)^2).
Can i bypass using the environment init code if i directly write to F.tbl from the LuaATC track?
I am not sure what you mean by "bypassing the environment init code".

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

56independent_actual wrote:
Sun Mar 20, 2022 08:22
How do i get information from trains not on a LuaATC rail? Maybe i was to run train_length(id) to get the length of a train of id id. I am working on a subway information system, and i can't seem to be able to get any useful information without placing a ton of slave LuaATC tracks sending diglines to the master.
For a passenger information system that simply tells passengers about the next arrival, it should suffice to spot a train coming with one LuaATC track, call train_length() at that time and use a call to interrupt_pos to send a signal to a nearby LuaATC operations panel, which includes the train's relevant info such as its line number and length. That operations panel can then send digilines signals to digiline LCDs, textlines or similar devices on the platform. This is much easier than running physical digilines and it's how the SIS at Origin on LinuxForks works*. I got a proof of concept working in my test world pretty easily, although for some reason trains on a specific old bit of track won't collide right now so I'll just have to trust that it works fine for different lengths..

Another useful approach, as ywang pointed out, is to keep a table in your LuaATC environment of where each train is by using LuaATC tracks as well as or in place of station/stop rails. As a train arrives at each station, you can mark where it is. This allows you to then create a dispatcher type view with lights showing where trains are located on the network or what sections are occupied.

If there's a more complicated use case maybe train_length(train_id) could be a new extension to LuaATC, but you'd have to justify it first and probably send the patch yourself.

*That SIS also estimate the time of arrival based off of a constant for the expected train velocity and shows the Line Number, and counts down, but follows the same basic principles.
56independent_actual wrote:
Sun Mar 20, 2022 10:04
yw05 wrote:
Sun Mar 20, 2022 09:56
You can use the F table as well. I tend to use local variables as a habit and (in certain cases) to prevent direct access to certain variables.
Does that have negative security implications here?
Not really, because trying to hide anything in LuaATC from any other LuaATC user isn't really sensible. It's just about the principle of information hiding.
56independent_actual wrote:
Sun Mar 20, 2022 10:04
Can i subtract two POS() objects using the standard subtraction operator (-) with no difficulties? I want to calculate distance between two arbituary points in space which i hope the user will match to the location of the LuaATC and station tracks. Otherwise, i will have to use longform (pos1.x - pos2.x) + (pos1.y - pos2.y) + (pos1.z - pos2.z) (I think this is how it works).
No, position vectors in LuaATC don't aren't up to date with the vectors used in Minetest since at least 5.5.0, otherwise they would support all the normal vector operations. Regardless, the formula you gave is for Manhattan distance and not Euclidean. For Euclidean distance, take the square root of that result with math.sqrt(). Also, you should try to use named positions made through the Passive Component Naming Tool as much as possible, for your own sanity and readability. Using arithmetic to calculate a position or distance? I can't see a use for it unless you have a constant spacing between your LuaATC approach track and your operation panel, which is way too fragile of a system in my opinion. For instance, in the above example I suggested you should use named positions for interrupts.
56independent_actual wrote:
Sun Mar 20, 2022 10:04
Can i bypass using the environment init code if i directly write to F.tbl from the LuaATC track?
The init code is run only when the server restarts or manually with a button press in the env_setup formspec. At any other time, you are able to write to the F or S tables without restriction, but of course depending on anything set outside the init code is quite fragile and should only be done by first checking for a value before using it. Maverick gave good examples of what to put in the F table in your init code.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

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

by 56independent_actual » Post

Thanks for your help. I have managed to design V2.1 of my train system (V2 being a broken prototype). It is designed to be easy to install, with only 3 pieces of code. It works on a track-by-track basis. Feel free to use this program in your own setups.

Code
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

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

by Maverick2797 » Post

56independent_actual wrote:
Sun Mar 20, 2022 14:59
Code
One thing to remember is that the F table is reinitialized from the env_setup code during the server startup, which will erase the data currently held in any F variables written to in the meantime. This is why it's better to define Functions in the F table and store data in the S table, which is Saved across restarts
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

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] [2.4.1]

by orwell » Post

56independent_actual wrote:
Sun Mar 20, 2022 10:04
yw05 wrote:
Sun Mar 20, 2022 09:56
You can use the F table as well. I tend to use local variables as a habit and (in certain cases) to prevent direct access to certain variables.
Does that have negative security implications here?
We are talking about LuaATC. If someone malicious has access to LuaATC he can wreck the server anyways. It is a good practise when developing software, but doesn't give a real advantage in LuaATC.
56independent_actual wrote:
Sun Mar 20, 2022 10:04

Can i subtract two POS() objects using the standard subtraction operator (-) with no difficulties? I want to calculate distance between two arbituary points in space which i hope the user will match to the location of the LuaATC and station tracks. Otherwise, i will have to use longform (pos1.x - pos2.x) + (pos1.y - pos2.y) + (pos1.z - pos2.z) (I think this is how it works).
No, you have to use long form. POS() is not a real object but rather returning a plain table with x,y, and z.
Which makes me think, actually we should add the 'vector' library from MT to the safe_globals.
56independent_actual wrote:
Sun Mar 20, 2022 10:04
Can i bypass using the environment init code if i directly write to F.tbl from the LuaATC track?
The F table is global. You do not need to initialize everything in init code. But please remember: F table is deleted when the server restarts.
For your usecase I think what you want is the S table. This one stores all values persistently (but it cannot contain functions).
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

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

by yw05 » Post

orwell wrote:
Thu Mar 24, 2022 14:35
56independent_actual wrote:
Sun Mar 20, 2022 10:04

Can i subtract two POS() objects using the standard subtraction operator (-) with no difficulties? I want to calculate distance between two arbituary points in space which i hope the user will match to the location of the LuaATC and station tracks. Otherwise, i will have to use longform (pos1.x - pos2.x) + (pos1.y - pos2.y) + (pos1.z - pos2.z) (I think this is how it works).
No, you have to use long form. POS() is not a real object but rather returning a plain table with x,y, and z.
Which makes me think, actually we should add the 'vector' library from MT to the safe_globals.
We do need to make some adjustments though, considering that you could potentially pass a string (PC name) to vector computation functions.

On a less related note, I will likely write some code to manipulate 2D vectors (for other purposes).
56independent_actual wrote:
Sun Mar 20, 2022 10:04
Can i bypass using the environment init code if i directly write to F.tbl from the LuaATC track?
The F table is global. You do not need to initialize everything in init code. But please remember: F table is deleted when the server restarts.
For your usecase I think what you want is the S table. This one stores all values persistently (but it cannot contain functions).
In addition to what orwell wrote, it should be noted that the S table is empty when you first set up your code, so you might need to add a few nil checks. (I ran into this a "few" times before ...)

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

2nd Advtrains Developer Conference

by orwell » Post

We will hold the next Advtrains Developer Conference on the weekend 2nd/3rd April 2022.

The meeting will be held online via an audio conference.

If you want to attend:
Anyone who is interested can join the conference. This may be of particular interest for people who want to contribute to the development of advtrains and want to get to know the main developers.

The conference will be held on
2022-04-02
20:00 (8:00 PM) UTC
via Jitsi Meet (https://meet.ztn.sh/AdvtrainsConference) & IRC (libera.chat #advtrains)

Conference rules:
The conference is primarily about the short-term and long-term track of Advtrains development.

We can also discuss ideas for new features and extensions of advtrains. While we appreciate creativity, please bear in mind that all current advtrains developers are volunteers and have limited free-time. Thus, there is no guarantee that someone will be available to implement a feature in a timely manner. We ask you to respect the opinions of the development team.

We seek a calm and objective discussion. Offensive behavior of any kind is not tolerated.

In case of inappropriate behavior, I reserve the right to ban any participant from attending this conference and, in severe cases, also from future conferences.

Preliminary Agenda:
  • Timetable system (who, what, when)
  • Migration of bug tracker (move everything to sourcehut?)
  • User documentation, usability
  • whatever else comes up
I look forward to meeting you.
- orwell
Last edited by orwell on Sat Apr 02, 2022 16:48, edited 3 times in total.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: 2nd Advtrains Developer Conference

by yw05 » Post

orwell wrote:
Thu Mar 24, 2022 21:36
We will hold the next Advtrains Developer Conference on the weekend 2nd/3rd April 2022.

The meeting will be held online via an audio conference. The meeting place will be shared prior to the event.
I think I have a list somewhere of the people I want to invite. Now I have 7 days to look for it ...
The survey time is in UTC, please convert your local time to UTC accordingly (e.g. for Germany, this would be minus 2 hours - pay attention to DST).
I forgot DST was a thing. Thanks for reminding me.

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

Re: 2nd Advtrains Developer Conference

by orwell » Post

orwell wrote:
Thu Mar 24, 2022 21:36
We will hold the next Advtrains Developer Conference on the weekend 2nd/3rd April 2022.
According to the consensus reached on the doodle page, the conference will be held at
2022-04-02
20:00 (8:00 PM) UTC
22:00 CEST
05:30 ACST

Due to difficulties with the BigBlueButton server originally designated for the conference, we will use Jitsi Meet:

https://meet.ztn.sh/AdvtrainsConference

In case of issues and for additional text conversation, I have opened the #advtrains channel on the libera.chat IRC network. If you do not have an IRC client, you can use the webchat to join:
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: 2nd Advtrains Developer Conference

by 56independent_actual » Post

orwell wrote:
Tue Mar 29, 2022 12:40
orwell wrote:
Thu Mar 24, 2022 21:36
We will hold the next Advtrains Developer Conference on the weekend 2nd/3rd April 2022.
According to the consensus reached on the doodle page, the conference will be held at
2022-04-02
20:00 (8:00 PM) UTC
22:00 CEST
05:30 ACST

Due to difficulties with the BigBlueButton server originally designated for the conference, we will use Jitsi Meet:

https://meet.ztn.sh/AdvtrainsConference

In case of issues and for additional text conversation, I have opened the #advtrains channel on the libera.chat IRC network. If you do not have an IRC client, you can use the webchat to join:
What fun!

(Sorry i was late i had hyped it up this morning but other matters took over, like r/place being backin action, and took my sense of time away)
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

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

by yw05 » Post

Here are the conference notes for those who did/could not take part: https://advtrains.de/wiki/doku.php?id=e ... 2022-04-02. I apologize if I missed certain points.

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

I have also added my own notes from the conference along with ywang's (yw05's). Thanks everyone who attended, even if you weren't there for the whole whopping (almost) 2 hours, especially since most of us were pretty tired from either a late night or early start.

Could anyone let me know if you are interested in discussing livery features? One of the resolutions from the conference was to have smaller, well I'll call them 'special interest groups' having their own meetings since the scope of the mod is quite broad, and I agreed to help and possibly prepare a presentation for the livery group. I know Marnack and doxydoxy have done a lot of work on this area for their train and tram mods respectively.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

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

by W3RQ01 » Post

Blockhead wrote:
Sun Apr 03, 2022 03:59
I have also added my own notes from the conference along with ywang's (yw05's). Thanks everyone who attended, even if you weren't there for the whole whopping (almost) 2 hours, especially since most of us were pretty tired from either a late night or early start.

Could anyone let me know if you are interested in discussing livery features? One of the resolutions from the conference was to have smaller, well I'll call them 'special interest groups' having their own meetings since the scope of the mod is quite broad, and I agreed to help and possibly prepare a presentation for the livery group. I know Marnack and doxydoxy have done a lot of work on this area for their train and tram mods respectively.
Hi,
I also liked the conference and i would like to take part on the "livery team" :D
OneUnitedPower

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

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

by W3RQ01 » Post

yw05 wrote:
Sat Apr 02, 2022 22:07
Here are the conference notes for those who did/could not take part: https://advtrains.de/wiki/doku.php?id=e ... 2022-04-02. I apologize if I missed certain points.
I think i have something for that, i'm gonna add them soon
OneUnitedPower

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

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

by yw05 » Post

Blockhead wrote:
Sun Apr 03, 2022 03:59
Could anyone let me know if you are interested in discussing livery features? One of the resolutions from the conference was to have smaller, well I'll call them 'special interest groups' having their own meetings since the scope of the mod is quite broad, and I agreed to help and possibly prepare a presentation for the livery group.
I am not particularly interested in livery features (in terms of painting), but I do have some interest in certain features (displays, in-train driver dashboard, etc) that may be related.

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

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

by W3RQ01 » Post

yw05 wrote:
Sun Apr 03, 2022 07:23
I am not particularly interested in livery features (in terms of painting), but I do have some interest in certain features (displays, in-train driver dashboard, etc) that may be related.
I think that is related tbh
OneUnitedPower

W3RQ01
Member
Posts: 157
Joined: Sat Nov 28, 2020 06:33
GitHub: W3RQ01
In-game: Dario23 or W3RQ01
Contact:

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

by W3RQ01 » Post

orwell: i'm currently working on polishing the textures of basic_trains and maybe making new ones. I also started making the new website and i need to know who actually made the models of basic_trains mod if you can
OneUnitedPower

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

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

by Maverick2797 » Post

I've reworked and built upon yw05's train control command and turned it into a portable handheld controller. The controller is bound to a specific locomotives instead of the whole train, retaining control of the locomotive if the train_id changes during shunting.
ContentDB
Direct download
git Image
Last edited by Maverick2797 on Sat May 07, 2022 15:56, edited 1 time in total.
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

Maverick2797 wrote:
Thu Apr 28, 2022 12:43
I've reworked and built upon yw05's train control command and turned it into a portable handheld controller.
Looks suspiciously like a DCC handset...
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

doxygen_spammer
Member
Posts: 70
Joined: Wed Dec 16, 2020 16:52
GitHub: doxygen-spammer

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

by doxygen_spammer » Post

W3RQ01 wrote:
Sun Apr 03, 2022 11:13
yw05 wrote:
Sun Apr 03, 2022 07:23
I am not particularly interested in livery features (in terms of painting), but I do have some interest in certain features (displays, in-train driver dashboard, etc) that may be related.
I think that is related tbh
I implemented displays and livery in doxy_mini_tram.
Both are somewhat independent mods which do not know about each other (thanks to Minetest texture slots).
But I agree that both topics are closely related, because both translate from a train property to a texture slot, using similar algorithms and API.

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

A lot of ideas to steal from immersive railroading (follow link to youtube video):

Image

They certainly have us beat for graphics, including rotating wheels and bogies, but they also have nothing like Line Automation and LuaATC (I don't even think they have signals or interlocking at all).

Also wonder how different their track gauge is i.e. thinking about model reuse.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

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

by 56independent_actual » Post

Blockhead wrote:
Sun May 01, 2022 18:00
They certainly have us beat for graphics, including rotating wheels and bogies, but they also have nothing like Line Automation and LuaATC (I don't even think they have signals or interlocking at all).
I am seeing a trend of FOSS software being good with functionality and being stable, and propietary software having good visual design. Think Minecraft having shaders which just make worlds look better, but Minetest having a solid modding API that encourages/forces FOSS mods.

Another example is Advtrains. Limited to formspec and other things, the visual aspect isn't the best it can be, but it offers amazing automation techniques.

This probably stems down to propietary software having enough money to hire designers, and FOSS software being made out of pure passion.

I've also found external ideas, from the mobile app Pocket Trains. It does not have much realism (namely railway lines only have one locomtive and there is no concept of a railway junction), but it's where i got the fuel idea (which i'm sure has penentrated your emails), and the control idea (which was put in the wiki.

(Also, sorry about Brtisignals, i'll get it done when i move back through the hobby cycle (long explain) to programming)
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

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

by yw05 » Post

Blockhead wrote:
Sun May 01, 2022 18:00
Also wonder how different their track gauge is i.e. thinking about model reuse.
There are a few things I thought about when looking at IR's track placer:
  • Different track gauges. Considering that advtrains tracks use OBJ models, it should (from my experience) be somewhat easy to scale these models. However, support for mixed-gauge tracks like IRL (which IR does not have but could be interesting) would also involve a considerable amount of coding unless we want to take IR's approach of resizing trains.
  • Curves. This is obviously (to an extent) limited by Minetest, and I don't think everyone here is glad about the significant increase in the number of nodes only to add more curves/crossings. I recall there were visible gaps on the curves, which we should avoid. Generating curves models is also not as easy as simply rescaling either, considering the amount of time I spent on generating the models for the Japanese signals in the new-ks branch.
  • Track types (e.g. whether the tracks have ballast). I could imagine this being done by separating the rails and ballast and then creating a combined model computationally. However, I am not sure how well the tracks without ballast would look in MT.
56independent_actual wrote:
Sun May 01, 2022 19:34
I am seeing a trend of FOSS software being good with functionality and being stable, and propietary software having good visual design. Think Minecraft having shaders which just make worlds look better, but Minetest having a solid modding API that encourages/forces FOSS mods.

Another example is Advtrains. Limited to formspec and other things, the visual aspect isn't the best it can be, but it offers amazing automation techniques.

This probably stems down to propietary software having enough money to hire designers, and FOSS software being made out of pure passion.
Having graphics designers is only part of the story. It should also be pointed out that IR is open source.

Minetest's API does not encourage or force FOSS mods; I am not sure where you came up with this.

Certain graphics-related limitations in MT can not be solved simply by improving visual design. MT's quality of text rendering and its formspec API are typical examples. These are also counterexamples for things that are "good in functionality", along with the lack of a few other features.

In any case, here are some things I noticed regardless of the train type (at least so far):
  • IR seems to have less formspec-ish UIs - or, at least, I seem to spend less time clicking through various forms. Perhaps it would be better for advtrains to put train and wagon settings into the same formspec, but in different tabs. (This could also address the issue with (un)coupling long trains on the wagon formspec)
  • IR's HUD is IMO not particularly nice compared to advtrains' one, but it seems to give sufficient information. Advtrains' HUD also has some space for improvement as well (which I may get to eventually).
  • IR's train controls are somewhat interesting, and I have thought about changing the keybindings a bit (this was around the time I made a joke branch with Sifa)
I've also found external ideas, from the mobile app Pocket Trains. It does not have much realism (namely railway lines only have one locomtive and there is no concept of a railway junction), but it's where i got the fuel idea (which i'm sure has penentrated your emails), and the control idea (which was put in the wiki.
IR has it as well. This would be an interesting addition to advtrains (like I wrote in the email), but there are a few things that likely needs to be discussed before this actually gets implemented; we also don't have that much time to work on advtrains at the moment, as far as I know, so I am not sure whether someone would pick it up soon.
(Also, sorry about Brtisignals, i'll get it done when i move back through the hobby cycle (long explain) to programming)
You might be interested in some things I added to the new-ks branch.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

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

by 56independent_actual » Post

yw05 wrote:
Mon May 02, 2022 12:23
Having graphics designers is only part of the story. It should also be pointed out that IR is open source.

Minetest's API does not encourage or force FOSS mods; I am not sure where you came up with this.
It does. How can you make proprietary code when Minetest mods only run on Lua Scripts and nothing compiled? All the textures have to be public. All the code. All the models. All the sound. Anybody can access them once the mod is installed. All the code is free for people to look at.

Also, the entire of Minetest is FOSS and the community seems to have a hatred for a lot of proprietary software.

Exceptions exist for servers; my server uses a TfL mod which added sounds which i have not bothered making public.
You might be interested in some things I added to the new-ks branch.
Very interesting. Invisible signals for fully automated railways :p. Can you list what you added as Japanese train signals seem to be the only thing i can (and can't :p) see?
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests