Simple Elevators [televator]
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
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
[Mod] Simple, Lag-free Elevators [televator]
- octacian
- Member
- Posts: 597
- Joined: Mon Dec 21, 2015 22:18
- GitHub: octacian
- IRC: octacian
- In-game: octacian
- Location: Canada
[Mod] Simple, Lag-free Elevators [televator]
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
- Desour
- Member
- Posts: 1469
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Simple, Lag-free Elevators [televator]
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.
The indents should be made with tabs, not spaces.
Spoiler
Save on_place the position of the elevator in a table and save this table in the world folder. On load time load this table. Instead of checking for nodes beyond player you can now just check if there's an elevator on the pos.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- octacian
- Member
- Posts: 597
- Joined: Mon Dec 21, 2015 22:18
- GitHub: octacian
- IRC: octacian
- In-game: octacian
- Location: Canada
Re: [Mod] Simple, Lag-free Elevators [televator]
Looks like I messed up my Atom configuration. Whoops! Fixed in latest commit.DS-minetest wrote:The indents should be made with tabs, not spaces.
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.DS-minetest wrote:Spoiler
Save on_place the position of the elevator in a table and save this table in the world folder. On load time load this table. Instead of checking for nodes beyond player you can now just check if there's an elevator on the pos.
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)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [Mod] Simple, Lag-free Elevators [televator]
good! but is it really needed?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- mnh48
- Member
- Posts: 310
- Joined: Wed Nov 16, 2016 22:55
- GitHub: mnh48
- IRC: MNH48
- In-game: mnh48
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: [Mod] Simple, Lag-free Elevators [televator]
There will always be mods which will be needed by others even when you think it's not needed. :)azekill_DIABLO wrote:good! but is it really needed?
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [Mod] Simple, Lag-free Elevators [televator]
you're true. sorry.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- doyousketch2
- Member
- Posts: 115
- Joined: Tue Feb 05, 2013 16:06
- GitHub: doyousketch2
- In-game: Sketch2
- Location: Ohio
- Contact:
Re: [Mod] Simple, Lag-free Elevators [televator]
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?
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?
- octacian
- Member
- Posts: 597
- Joined: Mon Dec 21, 2015 22:18
- GitHub: octacian
- IRC: octacian
- In-game: octacian
- Location: Canada
Re: [Mod] Simple, Lag-free Elevators [televator]
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.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?
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)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
I'm currently inactive in the Minetest community! So if I don't respond, that's why.
Who is online
Users browsing this forum: Google [Bot] and 16 guests