[Modpack] Railnet [minetest-railnet] [WIP]

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

[Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

Image

WARNING: This modpack is still very much a work-in-progress and is not recommended for existing worlds or public servers at this stage. Expect to find bugs but do please report them, either in this topic or via the github issue tracker.

Proof of concept rail network mod which attempts to fix some of the shortcomings of existing mine cart implementations.

Browse code: https://github.com/stujones11/minetest-railnet
Download (zip): https://github.com/stujones11/minetest- ... master.zip

Features include:

All features of original carts mod by PilzAdam

Travel through unloaded map chunks without attached players

Chest-like inventory (sneak + RMB)

Impossible to derail *

Uses acceleration and velocity based movement

Mesecon activated switch rails

Superconducting rails (one push and it goes forever)

*Due to client-side prediction, carts may sometimes appear to leave the rails when travelling at high velocity. They should, however, snap back to the correct position on the next server step.

In order to achieve this the mod makes fairly heavy use of map metadata which is known to be quite slow. It is therefor not advisable to give everyone on a public server permission to place the rails or carts. By default, a 'carts' and/or 'rails' privilege is required when using multiplayer mode.

However, if used carefully this modpack can provide reliable rail links reaching out around entire worlds

Please note, the railcart mod generates a file called railcart.txt in the world directory. Removing this will erase all existing carts from the map. Expired entities are automatically removed when they next try to load.

There is still a lot to do before I am happy to make this a release so I would appreciate any help with the following:

TODO

Better textures, I really suck at those so they are mostly borrowed from PilzAdam's carts mod for now

Better documentation (I suck at this also)

Add configuration options

Testing and profiling, particularly on public servers

Simple physics and collisions

Add train engines and carriages and other railway items

More technical stuff with mesecons

Video demo
Last edited by stu on Sat Jan 16, 2016 21:42, edited 1 time in total.

User avatar
mahmutelmas06
Member
Posts: 367
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by mahmutelmas06 » Post

When you release a mod, you do the best so i expect much from future :)

Thanks
My Mods:

Beverage

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by twoelk » Post

/me bookmarks thread

I do hope that someday we have some sort of railcarts api that easily allows to add custom engines, carriages/carts and rails. (hint,hint,hope,hope)

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

Thank you both for your comments, I have noticed that it seems to work much better in singleplayer than it does in (local) multiplayer. I am not sure if this is down to excessive meta reads or just latency screwing up my timings. I could easily get over the meta reads by using a file based or external data storage. The timing issue cries out for client side modding

I recently pushed some changes that should make the mod actually work. Some last minute additions had rendered the tracks un-placeable. I have removed the rail placement privilege until a better solution can be found.

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by benrob0329 » Post

I'll have to test this out!

Any chance of getting some boost_carts features?

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

benrob0329 wrote:I'll have to test this out!

Any chance of getting some boost_carts features?
That's great, I would encourage anyone to try this, I can guarantee some fun for the dedicated. I would suggest you create a new world to do so, please let me know how you find it and what particular features you think are missing.
Also, keep an eye on the repo, I am pushing bug-fixes and improvements as I find them but will not always necessarily bump this post.

User avatar
Hybrid Dog
Member
Posts: 2836
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by Hybrid Dog » Post

Is the modpack compatible with the carts mod?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

Hybrid Dog wrote:Is the modpack compatible with the carts mod?
No, this modpack is not compatible with any other cart mod currently and could overwrite important metadata if you try to mix them. It is intended as a replacement for those mods and should by now have all the features of the original carts mod plus a great deal more ;-)

If you think it is missing anything other than what I have on my todo list then please let me know.

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by everamzah » Post

Is it intentional that digging a cart eliminates any inventory inside?

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

everamzah wrote:Is it intentional that digging a cart eliminates any inventory inside?
Err, no, that would be a bug, I will post a fix asap. Thanks for reporting that, it's the simple things you miss when testing in creative mode by yourself.

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by benrob0329 » Post

I have some suggestions:

Being able to punch the cart while in the cart (boost_carts)

Carts can fall of the end of the track and have gravity (monorail)

Powered rails are break rails when not powered (monorail)

Powered rails are conductive (only one needs to be powered, monorail)


Overall great mod!

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

benrob0329 wrote:I have some suggestions:

Being able to punch the cart while in the cart (boost_carts)
+1 I will add this feature
benrob0329 wrote:Carts can fall of the end of the track and have gravity (monorail)
-1 Not a particularly helpful feature imo
benrob0329 wrote:Powered rails are break rails when not powered (monorail)
Neutral, could be easily done though
benrob0329 wrote:Powered rails are conductive (only one needs to be powered, monorail)
They are sort-of like that already, 'sections' only need to be powered at a single point, however, 'junctions' do need to be powered individually for now, I will work on this.
benrob0329 wrote:Overall great mod!
Thank you :-)

Dragonop
Member
Posts: 1233
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop
Location: Argentina

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by Dragonop » Post

stu wrote:
everamzah wrote:Is it intentional that digging a cart eliminates any inventory inside?
Err, no, that would be a bug, I will post a fix asap. Thanks for reporting that, it's the simple things you miss when testing in creative mode by yourself.
**cough**cough**I posted an issue in your repo about that some days ago**cough**cough**

Cool mod btw, is there any way to use the switching station without mesecons?

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

Dragonop wrote:
stu wrote:
everamzah wrote:Is it intentional that digging a cart eliminates any inventory inside?
Err, no, that would be a bug, I will post a fix asap. Thanks for reporting that, it's the simple things you miss when testing in creative mode by yourself.
**cough**cough**I posted an issue in your repo about that some days ago**cough**cough**

Cool mod btw, is there any way to use the switching station without mesecons?
I am very sorry, I totally missed that one. This issue is now hopefully resolved, you are no longer able to pick them up if they contain items, this is consistent with the default chest.

Re. switching, I did at one time think about giving them a formspec for that. I will add that to my todo list ;-)

btw, I just added a simple 'boost' feature, may not be quite what you're used to but it's a start. Note that you can also punch the floor to stop yourself.

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by everamzah » Post

Punching from inside will make starting the cart on a 45 degree downward slope much easier. I haven't tested the newest version, but from what I could tell you had to punch the side of it. Punching from above wouldn't start it going.

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by benrob0329 » Post

@Stu very nice! I like the directional punching!

Gravity carts would be used for an automatic cart dispenser:
Image

Is there be a way to load and unload items in carts automatically?
Attachments
carts.png
carts.png (7.36 KiB) Viewed 1571 times

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by everamzah » Post

Even without the "carts" priv, it seems any player is able to pick up the cart. Placing of the cart is restricted, however.

The "rails" priv seems to have no effect.

Dragonop
Member
Posts: 1233
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop
Location: Argentina

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by Dragonop » Post


User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

benrob0329 wrote:Gravity carts would be used for an automatic cart dispenser
Unfortunately, gravity is not so easy to apply as the carts have their physical property set false, meaning that they pass straight though 'solid' nodes. I do, however, plan to add a lot more mesecon related stuff including things like pistons, so what you describe may be possible in some other way.
benrob0329 wrote:Is there be a way to load and unload items in carts automatically?
I am hoping to make this work with the hoppers mod but if I can't then I will add a similar system of my own.
everamzah wrote:Even without the "carts" priv, it seems any player is able to pick up the cart. Placing of the cart is restricted, however.

The "rails" priv seems to have no effect.
Yes, that had to be disabled because the code did not work as I expected. It was a last minute addition and I hadn't fully tested it. I may even remove that entirely if I can improve efficiency, otherwise I will re-add the feature when I get it working satisfactorily.
Thanks ;-)

User avatar
kidmondo
Member
Posts: 130
Joined: Sun May 11, 2014 07:56
IRC: kidmondo
In-game: kidmondo
Location: New Zealand

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by kidmondo » Post

This looks good!

Emon
Member
Posts: 48
Joined: Tue Apr 26, 2016 09:35

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by Emon » Post

Italian version available here.

User avatar
Hybrid Dog
Member
Posts: 2836
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by Hybrid Dog » Post

Emon, you could use the intllib mod

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Emon
Member
Posts: 48
Joined: Tue Apr 26, 2016 09:35

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by Emon » Post

Hybrid Dog wrote:Emon, you could use the intllib mod
Thanks for the suggestion, I'm checking it :)

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by BirgitLachner » Post

What's about a good sound? I tested some mods and all of them had no sound while carts are rolling. That's a bit strange. Do you know Opensound.org, where you can get recordings for free?
I searched a bit and found for example these, that can be used to prepare a sound file.
- https://www.freesound.org/people/Tomlija/sounds/198015/
- https://www.freesound.org/people/Edo333/sounds/258182/
- https://www.freesound.org/people/klankb ... ds/174218/
- https://www.freesound.org/people/mshahen/sounds/267544/

Birgit

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

Re: [Modpack] Railnet [minetest-railnet] [WIP]

by stu » Post

Emon wrote:Italian version available here.
That's great, however, I do plan to add intllib support to all of my current mods as time permits.
BirgitLachner wrote:What's about a good sound? I tested some mods and all of them had no sound while carts are rolling. That's a bit strange. Do you know Opensound.org, where you can get recordings for free?
I searched a bit and found for example these, that can be used to prepare a sound file.
- https://www.freesound.org/people/Tomlija/sounds/198015/
- https://www.freesound.org/people/Edo333/sounds/258182/
- https://www.freesound.org/people/klankb ... ds/174218/
- https://www.freesound.org/people/mshahen/sounds/267544/

Birgit
Thanks, I do plan to add sound effects at some stage, I will certainly keep these in mind.

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests