[Mod] Monorail [0.1.2] [monorail]

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

[Mod] Monorail [0.1.2] [monorail]

by sapier » Thu Jan 05, 2012 14:38

I've updated pushable block now finaly supporting full featured monorails.

License: WTFPL
Dependencies: default

Image
Image
Image

Craft recipe's:
Image

Actions
Punch (transport)cart (standing next to it) --> accelerate cart
Punch cart from distance --> enter cart
Rightclick cart --> take cart
Rightclick transport cart --> open rightclick menu
*take -->take cart
*content --> show content inventory

Settings:
monorail_carts_mimicry=false (If you're addicted to carts mod set to yes)

Changes:
0.1.2
-fixed crash on using mesecons (thanks polletfa)

0.1.1
-fix bug all transport carts having same inventory
-disallow taking transport cart while inventory not empty

0.1.0
-internal rename to monorail
-fix bug carts not moving correct on some situation where a curve was right after up

0.0.18
-add carts mimicry mode

0.0.17
-fixup for 0.0.16

0.0.16:
-broken

0.0.15:
-add workaround for carts stopping randomly on slow servers

0.0.14:
-fix crash on riding cart
-fix cart orientation problems (up/down/direction)
-fix carts loosing track on load/unload of cart object

0.0.13:
-improve graphics
-add rightclick menu
-reduce reciep prices

0.0.12:
-add workaround for mesecon support

0.0.11:
-added smooth entity riding support
-added transport cart for item movement

0.0.10:
-added mese puncher
-added mese cart detector
-fixed bug if switches were on higher level but attached rails on lower
-fixed bug curve going to lower level
-fixed craft recieps

0.0.9:
-added mese switches
-added mese accelerators/breaks

Version 0.0.1 (block only)
Version 0.0.2 (sliders and boosters too)
Version 0.0.3 (rideable moveblocks)
Version 0.0.4 this version doesn't work with master
Version 0.0.6 this version doesn't work with master
Version 0.0.7 (monorails)
Version 0.0.8 (switches)
Version 0.0.9 (mesecon)
Version 0.0.10
Version 0.0.11
Version 0.0.12
Version 0.0.13
Version 0.0.14
Version 0.0.15
Version 0.0.18
Version 0.1.0
Version 0.1.1
Version 0.1.2
Last edited by sapier on Sun Aug 24, 2014 00:13, edited 5 times in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Thu Jan 05, 2012 15:10

+3 thats cool!
If you can think it, you can make it.
 

User avatar
sycam
Member
 
Posts: 24
Joined: Thu Jan 05, 2012 10:57

by sycam » Tue Jan 10, 2012 11:42

it doesn't seem to work the debug said

ebug streams initialized, disable_stderr=1
20:06:21: ACTION[main]: minetest with SER_FMT_VER_HIGHEST=21, VER=0.4.dev-20111209-1 RUN_IN_PLACE=1 USE_GETTEXT=0 INSTALL_PREFIX=//Vboxsvr/home-celeron55/minetest_install_win32 BUILD_TYPE=Release
20:06:21: INFO[main]: Parsing configuration file: "C:\Users\sean\Documents\minetest-0.4.dev-20111209-1-win32\bin\..\minetest.conf"
20:06:21: INFO[main]: Settings: Setting not found: "enable-unittests"
20:06:21: INFO[main]: Settings: Setting not found: "server"
20:06:21: INFO[main]: Settings: Setting not found: "speedtests"
20:06:21: INFO[main]: Settings: Setting not found: "random-input"
20:06:21: INFO[main]: text_height=18
20:06:21: INFO[main]: Created main menu
20:06:36: INFO[main]: Dropping main menu
sycam industry's yesterdays technology today
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Tue Jan 10, 2012 13:00

you need to get the latest official build 9th december is quite old
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Tue Jan 10, 2012 14:31

glitch..if block is punched multiple times it will actually take flight and crash the game..it is quite hilarious but it is a bug...im on windows right now btw
If you can think it, you can make it.
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Tue Jan 10, 2012 19:10

punching it multiple times (left mouse button) does work for me but still could be a race condition in your case can you provide the crash log?

I'll try to fix it but honestly this mod really needs some minetest addons I've just finished as early implementation but don't seem to be accepted by celeron (at least not the way I wrote it). Probably I can fix it so that he's happy with it but I cant promise.

Have a look at this video to see what it looks like Video

But there's still major problems NOT fixable:

1) mb staying on track can't be ensured
2) mb sometimes crashes surface before lifted up on upwards sliders (same reason as 1)
3) mb stops in case of corner with directly attached block in original movement direction same reason as 1)
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Tue Jan 10, 2012 22:08

WAIT A SECOND...that track..YOU JUST MADE MINECARTS!
If you can think it, you can make it.
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Tue Jan 10, 2012 22:21

They won't stay on track if accelerated too much so it isn't really a working implementation.
And they won't relyable go up either.
Last edited by sapier on Tue Jan 10, 2012 22:21, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
sycam
Member
 
Posts: 24
Joined: Thu Jan 05, 2012 10:57

by sycam » Thu Jan 12, 2012 00:30

when i place move blocks minetest stops working
sycam industry's yesterdays technology today
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Thu Jan 12, 2012 06:00

Are you using the latest version of Minetest? The latest 0.4 dev version is 20120106-1.
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Thu Jan 12, 2012 17:16

version 0.0.3 does NOT support everything shown in the video the patches needed to achiev this aren't in master.

but 0.0.3 shouldn't stop minetest so please supply additional error information.
DON'T mention coding style!
(c) sapier all rights reserved
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sun Jan 15, 2012 22:15

Added github link to fork supporting all the nice features in video
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Tue Jan 31, 2012 18:33

So what's the progress on this? Curious.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Tue Jan 31, 2012 19:00

Well I just tried the fork with latest rideable blocks mod. Can't seem to actually ride the blocks or keep the block on the track lol.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Tue Jan 31, 2012 19:37

You need to use the git tree I added it isn't updated to latest minetest. I'll do another try to get those changes into master as soon as sound changes are in ... probably combined with mob removal patches.

Progress is that it was working ... at least kind of. Riding was implemented as linking different CAO/SAO together making movement of one override/disable movement handling of the linked child. This is a change in sao and cao handling but there have been other changes recently in those too. So these patches need to be rebased.

The last open issue was handling movement in lua isn't possible for "high" speeds as there isnt guaranteed that the on_step handler gets called within time to change directions. For example if your track goes right but when the onstep handler gets called next time you already moved 2 blocks forward you won't be able to decide which track to take. Thats the reason why this mod is experimental as I don't see an easy solution to this issue.
Last edited by sapier on Tue Jan 31, 2012 19:37, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Fri Feb 03, 2012 19:28

I've just updated my branch with current master changes.
DON'T mention coding style!
(c) sapier all rights reserved
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Fri Feb 03, 2012 19:56

sapier wrote:The last open issue was handling movement in lua isn't possible for "high" speeds as there isnt guaranteed that the on_step handler gets called within time to change directions. For example if your track goes right but when the onstep handler gets called next time you already moved 2 blocks forward you won't be able to decide which track to take. Thats the reason why this mod is experimental as I don't see an easy solution to this issue.


Maybe the speed could be limited to about 1.999999 blocks per step, so this issue doesn't show up? I think that's plenty fast enough for things like minecarts and similar.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Sat Feb 04, 2012 12:31

reccomendations remove sliders add rails instead then change the booster to look like real tracks!
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
function is_slider(name)

    if     name == "default:rail" or
        name == "pushable_block:booster" then
        return true
    end

    return false
end
[h]Zen S.D.[/h] The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Feb 04, 2012 16:07

@Temperest limiting speed would reduce chance the problem would happen but it wouldn't fix it ... btw speed is already kind of limited by physics as air resistance as well as friction are handled like in real world. But back to why it wouldn't fix the problem. Movement depends on on_step handler as soon as you've got enough load at the server it may be delayed beyond any limit you've arbitrary set.

And I've forgotten another open issue too running up sometimes stops as collision with the block is detected before on_step handler has increased y position enough for it to pass.

@sdzen I've already had a discussen because I've implemented a mod that someone else thought was to close to his mod and don't want another one. Especialy not for a mod that doesn't work as expected. And of course it isn't even operational with master minetest version too.
DON'T mention coding style!
(c) sapier all rights reserved
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Feb 04, 2012 17:21

sapier wrote:@Temperest limiting speed would reduce chance the problem would happen but it wouldn't fix it ... btw speed is already kind of limited by physics as air resistance as well as friction are handled like in real world. But back to why it wouldn't fix the problem. Movement depends on on_step handler as soon as you've got enough load at the server it may be delayed beyond any limit you've arbitrary set.

And I've forgotten another open issue too running up sometimes stops as collision with the block is detected before on_step handler has increased y position enough for it to pass.


How about this:

For each call of the handler:

  1. Add the current delta to the accumulated delta, which is initialized to 0.
  2. If the accumulated delta is not too small, move to the stored block position if it is present in the metadata and set the accumulated delta to 0, otherwise don't move at all.
  3. Current velocity is used to find the next node the movable block is to go to, and it is clamped such that the speed does not exceed 1.999999 blocks.
  4. The block location is stored in the movable block's metadata.

Would this work? If I thought it through correctly, this would merely slow down and lag when the server is under heavy load, instead of continuing to move.

I would love to see minecart-like means of transportation in MineTest.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Sat Feb 04, 2012 17:36

Your suggestion is exactly how the minecart mod is doing movement. Having the effect that movement looks a little bit "choppy". This is the due to on_step handlers aren't called fast enough to create a smooth movement from lua.

Pushable blocks just uses acceleration and speed and "movement" itself is done by client/server which is much more efficient and smooth. But causes the other problems to happen.

So either way it's not better than minecart mod.

The other feature "riding blocks" isn't exactly related to this mod, if the patches are aplied to minetest adding it to minecart mod wouldn't be much work at all.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Arwym
Member
 
Posts: 31
Joined: Sat Mar 10, 2012 15:17

by Arwym » Tue Mar 13, 2012 17:53

Is this mod stable enough to use in a production server? I am so looking forward to it!
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Tue Mar 13, 2012 18:28

this mod is only working on my branch of minetest, so you most likely won't want to run it on a production server
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
IPushButton2653
Member
 
Posts: 666
Joined: Wed Nov 16, 2011 22:47

by IPushButton2653 » Tue Mar 13, 2012 19:31

Made a few new textures for it with the LOZ textures. It looks epic. Will be testing soon!
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Mar 19, 2012 18:13

I wonder if this code can be used under the new release..I might get the carts working.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Mon Mar 19, 2012 18:27

I'm going to try it but as far as I know the entity linking wasn't added to core.

EDIT1:
no the link/unlink feature didn't make it to core. As there are lots of changes for this release I can't provide a date when those changes will be merged to my branch atm either.
Last edited by sapier on Mon Mar 19, 2012 18:34, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Mar 19, 2012 19:07

Hmm, I will try be hand and see what comes of this experiment.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
InfinityProject
Member
 
Posts: 1009
Joined: Sat Mar 17, 2012 00:52

by InfinityProject » Fri Apr 13, 2012 16:25

How to ride it?
 

User avatar
SegFault22
Member
 
Posts: 870
Joined: Mon May 21, 2012 03:17

by SegFault22 » Fri Jun 22, 2012 01:52

They won't stay on track if accelerated too much so it isn't really a working implementation.

So...What happens if you take a minecart, bolt a jet-propulsion engine to it and aim it at a 90* turn in the tracks? It runs off the tracks >:D Even on some straight-sections in the track, if moving too fast, any minecart will begin to ''gain lift'' and destabilize off-track.
Now, all you have to do is come up with a way to animate the crash-scene...lol
Resources are abundant; only money is scarce. People should not have to work hard and remain poor just to pay for the needs of survival.
Society can thrive without money - but only if productive members of society are rewarded for being productive.
 

sapier
Member
 
Posts: 763
Joined: Tue Aug 16, 2011 18:17

by sapier » Mon Sep 10, 2012 20:35

As there ain't a cart mod supporting up and down movement (at least none I know) I've had a look at my old sliders mod. And guess what? I've managed to fixed the bug's beeing the reason to discontinue development.

1) up/down movement often threw cart out of track
2) cart stopped in corners if wall was directly ahead in movement direction

EDIT1:
link unlink feature, making movement smooth, still haven't found it's way to core movement is still choppy
Last edited by sapier on Mon Sep 10, 2012 20:36, edited 1 time in total.
DON'T mention coding style!
(c) sapier all rights reserved
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 6 guests

cron