Better way to do cobwebs

Post Reply
User avatar
Wuzzy
Member
Posts: 4786
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Better way to do cobwebs

by Wuzzy » Post

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.

rob123
Member
Posts: 105
Joined: Wed Mar 03, 2021 07:15
GitHub: qwerty123a2
In-game: joe and joergeg

Re: Better way to do cobwebs

by rob123 » Post

when was that introduced
If my post says something, it is a opinion and not fact unless i say so

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Better way to do cobwebs

by TenPlus1 » Post

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.

User avatar
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

by Wuzzy » Post

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.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Better way to do cobwebs

by TenPlus1 » Post

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.

User avatar
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

by Blockhead » Post

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 ✝️♂

User avatar
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

by Wuzzy » Post

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.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Better way to do cobwebs

by TenPlus1 » Post

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
Last edited by TenPlus1 on Thu Dec 08, 2022 11:11, edited 1 time in total.

User avatar
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

by rudzik8 » Post

TenPlus1 wrote:
Wed Dec 07, 2022 18:09
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
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)
  1. 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.
  2. 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))
MineClone2 dev and modder and the creator of Voxelgarden (revived) || Codeberg

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Better way to do cobwebs

by TenPlus1 » Post

@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

User avatar
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

by rudzik8 » Post

TenPlus1 wrote:
Thu Dec 08, 2022 11:11
@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
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.
MineClone2 dev and modder and the creator of Voxelgarden (revived) || Codeberg

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Better way to do cobwebs

by TenPlus1 » Post

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/

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests