Better way to do cobwebs
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Better way to do cobwebs
Since the liquid decoupling in the Minetest code, it is now possible to implement cobwebs in a more reasonable way.
Previously, cobwebs are implemented as "fake liquids", i.e. they have liquid fields in the node definition so the player will move in them like a liquid. This slows you down, but you can also move up (which you might not want). This hack is no longer neccessary.
A better method to do this now is via "move_resistance" in the node definition. This works without being affected by liquid physics at all. You will also only sink, you can no longer rise with the Jump key.
So this makes cobwebs closer to MC as well.
Previously, cobwebs are implemented as "fake liquids", i.e. they have liquid fields in the node definition so the player will move in them like a liquid. This slows you down, but you can also move up (which you might not want). This hack is no longer neccessary.
A better method to do this now is via "move_resistance" in the node definition. This works without being affected by liquid physics at all. You will also only sink, you can no longer rise with the Jump key.
So this makes cobwebs closer to MC as well.
-
- Member
- Posts: 105
- Joined: Wed Mar 03, 2021 07:15
- GitHub: qwerty123a2
- In-game: joe and joergeg
Re: Better way to do cobwebs
when was that introduced
If my post says something, it is a opinion and not fact unless i say so
Re: Better way to do cobwebs
This will be good for newer versions of the minetest client, but to be compatible with previous 5.x one's I'd probably stick to the water node method and add {disable_jump=1} to the groups to stop players floating upwards.
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: Better way to do cobwebs
It was introduced in version 5.5.0. So yes, you need 5.5.0 or later. So yeah, it's useess if you want to stay compatible with 5.0.0 for all eternity, but then you're already missing out on a couple of other goodies as well.
Re: Better way to do cobwebs
Lol Wuzzy, I'm stll supporting 0.4.x clients in some of my mods because we cant get server owners to upgrade to 5.x ... if only it were that easy.
- 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: Better way to do cobwebs
Hmm I was going to suggest something like minetest.features, but that doesn't have flags for things like node properties (except extensions/redefinitions like node_box_as_selectionbox and use_texture_alpha_string_modes. Is there any way to query the engine as to whether it supports the newfangled liquid properties and move resistance?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: Better way to do cobwebs
Oh no, we forgot to update minetest.features. :-(
I guess that needs to be integrated into the PR acceptance rules, because minetest.features is like Swiss cheese: Full of holes!
I'm afraid there is no way to detect whether move_resistance is supported right now. The only thing you can do is to declare your game is compatible with MT 5.5.0 or later. Not a real problem for me, as I keep supporting the current Minetest version.
However, there is a fallback behavior in place for old clients.
But to be honest, at some point we just have to move forward, it annoys me that some people are stuck at ancient versions like 0.4 even after so many years. But yeah, if you stick to 0.4 I guess you can't really complain you are missing out on new features.
Anyway, if you want to stay compatible with ancient versions, just stick to the fake liquid thing, it's really not that big of a deal. I just wanted to give a small hint to a feature that was probably overlooked.
I guess that needs to be integrated into the PR acceptance rules, because minetest.features is like Swiss cheese: Full of holes!
I'm afraid there is no way to detect whether move_resistance is supported right now. The only thing you can do is to declare your game is compatible with MT 5.5.0 or later. Not a real problem for me, as I keep supporting the current Minetest version.
However, there is a fallback behavior in place for old clients.
But to be honest, at some point we just have to move forward, it annoys me that some people are stuck at ancient versions like 0.4 even after so many years. But yeah, if you stick to 0.4 I guess you can't really complain you are missing out on new features.
Anyway, if you want to stay compatible with ancient versions, just stick to the fake liquid thing, it's really not that big of a deal. I just wanted to give a small hint to a feature that was probably overlooked.
Re: Better way to do cobwebs
Thanks for the info Wuzzy, it's always good to hear about new features.
The only real way to push everyone to update to the latest would be to release it on all platforms (linux, windows, android, ios) and lock server list to only those using it :P /s
The only real way to push everyone to update to the latest would be to release it on all platforms (linux, windows, android, ios) and lock server list to only those using it :P /s
Last edited by TenPlus1 on Thu Dec 08, 2022 11:11, edited 1 time in total.
- rudzik8
- Member
- Posts: 192
- Joined: Wed Jun 02, 2021 04:13
- GitHub: rudzik8
- In-game: db75c and rudzik8
- Location: Siberia
Re: Better way to do cobwebs
I know that this part of TenPlus1's message was off-topic, but I'll reply anyway (if it continues we can always move to another topic)
- There's no such thing as providing support for all platforms. Linux, Windows, Android and iOS are a huge part of the OS market but they aren't all of it. Haiku? Kolibri OS? Others?
Minetest can be (and already is) cross-platform, but it can't be all-platform. Sadly. - Well, server list already kinda locks but only when the server's protocol is incompatible with the client's one. So, yeah, clients on 5.x can't connect to servers on .4.x and vice-versa. It forced many admins already to move from .4.x to 5.x or even MultiCraft 2.x (maybe you meant this one? Asking because there's actually really small percent of alive truly .4.x servers and most of them are actually MultiCraft 2.x (so they support both 5.x and .4.x protocols))
Re: Better way to do cobwebs
@rudzik8 - Sorry dude, that part of my post was meant as sarchasm, I know supporting all platforms would be a difficult task and locking the server list never a good thing :P
- rudzik8
- Member
- Posts: 192
- Joined: Wed Jun 02, 2021 04:13
- GitHub: rudzik8
- In-game: db75c and rudzik8
- Location: Siberia
Re: Better way to do cobwebs
Aah, okay. I'm still bad at understanding English sarcasm sometimes. But there's one question I want you to ask from my previous message: did you mean that these server owners use actual .4.x, or some fork like MultiCraft? Because I see really small amount of truly .4.x servers online, most of them are actually supporting both 5.x and .4.x.
Re: Better way to do cobwebs
My last check on minetest server list showed that 27 servers are still using 0.4.x which is good, the number is getting lower over time and soon I can remove support for older clients in my mods :)
https://www.minetest.net/servers/
https://www.minetest.net/servers/
Who is online
Users browsing this forum: No registered users and 7 guests