[Mod] Simple, Lag-free Elevators [televator]

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

[Mod] Simple, Lag-free Elevators [televator]

by octacian » Tue May 16, 2017 02:26

Simple Elevators [televator]
Image
GitHub: octacian/televator
Download: Master (latest, stable)
License: MIT (see below for media license)

Televator allows you to create simple elevators in your worlds that work incredibly fast amidst lag and are relatively inexpensive to make. All you need to get started, is to craft an elevator (televator:elevator).

Elevator nodes can be placed a maximum of 16 nodes apart. If anything obstructs the space between or there is not 2 blocks of space for the player above the next elevator node, the elevator will not work.

Once standing on an elevator that has other elevators placed with no obstructions above or below it, you can press jump to go up to the next elevator, and sneak to go down the the previous. There are sound effects too! While standing on an elevator you cannot jump normally so as to maintain a consistent feel when ascending and descending.

Televator does not use any entities, but rather teleports the player from elevator to elevator making it suitable for servers that prefer to use only the most efficient mods. This also helps increase general performance for users with less powerful computers or mobile devices, and provides a smooth and consistent feel.

Recipe
Image

Televator currently only supports Minetest Game items for its recipe, however, I will gladly add support for other subgames on request. If you are unable to see the picture, please try a different browser such a Chrome/Chromium.

Media License

Everything not listed here:
octacian <theoctacian@gmail.com> (CC BY-SA 3.0)

televator_whoosh.ogg (CC BY-SA 3.0):
https://opengameart.org/content/whoosh-1
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

User avatar
DS-minetest
Member
 
Posts: 1026
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Simple, Lag-free Elevators [televator]

by DS-minetest » Tue May 16, 2017 13:00

Actually I don't think, it's really lag-free. It uses a globalstep that checks for each player the node below.
The indents should be made with tabs, not spaces.
+ I've got a suggestion to improve performance.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod] Simple, Lag-free Elevators [televator]

by octacian » Tue May 16, 2017 23:27

DS-minetest wrote:The indents should be made with tabs, not spaces.


Looks like I messed up my Atom configuration. Whoops! Fixed in latest commit.

DS-minetest wrote:
+ I've got a suggestion to improve performance.


Is minetest.get_node(pos).name really that much slower? And unless the player presses sneak or jump with a minimum delay of 0.5 seconds in between, I only check the node directly underneath the player. The 16 nodes above/below are only checked if the node directly underneath is an elevator, the delay requirements are met, and the player is pressing the correct control. I can see that it could still be more efficient seeing as I wouldn't need to loop through the 16 nodes above/below until another elevator was found at all, I could just compare the x and z coordinates followed by checking the distance to make sure it was less than 16 nodes.

Overall though, I'm not really trying to make entirely lag-free elevators, that's impossible ATM. I'm just trying to make something that in comparison to entities, could be considered "lag-free." On the other hand, maybe I'd best just state "Minimal-lag," as "Lag-free" will unlikely ever be entirely true. A basic globalstep is still way faster than an entity though.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
muhdnurhidayat
Member
 
Posts: 292
Joined: Wed Nov 16, 2016 22:55
Location: Shah Alam, Selangor, Malaysia
GitHub: MuhdNurHidayat
IRC: muhdnurhidayat
In-game: muhdnurhidayat

Re: [Mod] Simple, Lag-free Elevators [televator]

by muhdnurhidayat » Sat May 20, 2017 19:23

azekill_DIABLO wrote:good! but is it really needed?

There will always be mods which will be needed by others even when you think it's not needed. :)
[ Full signature ] - UTC+8 here, contributing to Minetest Wiki. I'm muhdnurhidayat in IFS (mod), HOMETOWN & others. / Twitter / MT Offtopic ✂️- - - - - -

You just read my profile, right?
Because these few texts of signature only appear on profile page as the texts are cut in signature. xD
 

User avatar
azekill_DIABLO
Member
 
Posts: 7461
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
doyousketch2
Member
 
Posts: 102
Joined: Tue Feb 05, 2013 16:06
Location: Ohio
GitHub: doyousketch2
In-game: Sketch2

Re: [Mod] Simple, Lag-free Elevators [televator]

by doyousketch2 » Tue Feb 13, 2018 05:16

Why does distance have a 16 node limit?

If I change it to 32, Minetest is perfectly fine with it, as far as I can tell.
Is it just to keep the search loop low for speed?
 

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod] Simple, Lag-free Elevators [televator]

by octacian » Tue Oct 09, 2018 20:14

doyousketch2 wrote:Why does distance have a 16 node limit?

If I change it to 32, Minetest is perfectly fine with it, as far as I can tell.
Is it just to keep the search loop low for speed?


Sorry for having not responded, but the reason why the distance limit is 16 is to increase the value of the elevators and to prevent them from becoming too overpowered.

Now that I think about this though, it would be neat to make it possible to upgrade elevators to cover a larger distance, with a configurable base value (and the value used for calculating upgraded distances). IMO this would best be implemented either via tier-based crafting and/or by increasing the elevator range on right-click with some upgrade material.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 5 guests