Why the 32768 node limit?

Post Reply
User avatar
cheapie
Member
Posts: 316
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Why the 32768 node limit?

by cheapie » Post

First of all: Yes, I understand why 32766/32768 is a "special" or "round" number. I also understand why it's not 65536 (unknown nodes).

Now, as far as my question... I'm currently working with some people on a mod that has a bunch of nodes. Several of the nodes it adds can also have markings placed on top which become part of the node. All of those, including ones with markings, can be cut with the moreblocks circular saw, which offers 45 shapes per node. This currently adds up to 20836 nodes in total, not leaving much for other mods.

So...
  • How much of a pain in the a** would it be to increase the limit?
  • If it's not so bad, are there plans to possibly do so?
  • If it would be a pain to do, why?

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

Re: Why the 32768 node limit?

by azekill_DIABLO » Post

cheapie wrote:How much of a pain in the a** would it be to increase the limit?
1:Ahem!Even if you are angry to tell things like that, childs are watching :\
2:32768 that already great!Ya don't think?
3:it might be planned but for now try to have less nodes... You've got a lot of them!
[around 730 nodes that can be cut!]
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: Why the 32768 node limit?

by paramat » Post

As far as i can remember it used to be lower, that number was chosen as being 'more than enough' even for VanessaE's mods and subgames. I think it's enough and already overkill, see it as a friendly suggestion you're overdoing things.

User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

Re: Why the 32768 node limit?

by webdesigner97 » Post

IMO this excessive amount of nodes wouldn't be required if there was a possibility to swap node textures. Many mods have to register new nodes because of 3 differently colored pixels in a texture...

User avatar
cheapie
Member
Posts: 316
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Why the 32768 node limit?

by cheapie » Post

webdesigner97 wrote:IMO this excessive amount of nodes wouldn't be required if there was a possibility to swap node textures. Many mods have to register new nodes because of 3 differently colored pixels in a texture...
I've tried suggesting this to the engine devs before, but even though this would make this only need ~90 nodes for the mentioned part instead of ~20000, nobody seems interested.

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

Re: Why the 32768 node limit?

by TenPlus1 » Post

Wow, any server that registers so many nodes is gonna use a LOT of memory...

asanetargoss
Member
Posts: 42
Joined: Sun Apr 26, 2015 03:10

Re: Why the 32768 node limit?

by asanetargoss » Post

In a perfect world, there would be a way to dynamically render nodes, Registering entities may help you cut down on the number of nodes. 20000 nodes purely for decoration purposes is way too many.

This signs mod uses entities to display text:
https://github.com/PilzAdam/signs

Perhaps a similar technique could be used for the sawed blocks, with appropriate changes to the moreblocks code. I'm not sure what sort of limit Minetest imposes on the number of registered entities.

User avatar
yyt16384
Member
Posts: 46
Joined: Mon Nov 03, 2014 12:16
GitHub: yyt16384
IRC: yyt16384
In-game: yyt16384
Location: China

Re: Why the 32768 node limit?

by yyt16384 » Post

I just checked my world with dreambuilder and some other mods, and it has 17544 nodes. Most of it comes from stairsplus.

User avatar
Ferk
Member
Posts: 337
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: Why the 32768 node limit?

by Ferk » Post

Using entities to simulate nodes would probably be too much... not to mention that they may disappear / pop-up spontaneously, since entities are only loaded when really needed.

Maybe a new param2type could be added to store the index of the mesh/texture to use from an array in the nodedef. That way a node can provide a list of mesh/texture combinations it can have as part of the same node and the client will know which one to use based on param2.

The problem with this is that it wouldn't allow the use of param2 as facedir or wallmounted at the same time, and you still have a limit in how big that array can be.

But with that many nodes for a single mod, you might have to see if you are doing things wrong... are you properly taking advantage of facedir? maybe some of your nodes are symmetrical. What about the new connected-nodebox api? maybe you can take advantage of it too.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }

LNJ
Member
Posts: 252
Joined: Tue Sep 23, 2014 16:02
GitHub: lnjX
IRC: LNJ
In-game: LNJ
Location: Europe/Berlin

Re: Why the 32768 node limit?

by LNJ » Post

Ferk wrote:Using entities to simulate nodes would probably be too much... not to mention that they may disappear / pop-up spontaneously, since entities are only loaded when really needed.

Maybe a new param2type could be added to store the index of the mesh/texture to use from an array in the nodedef. That way a node can provide a list of mesh/texture combinations it can have as part of the same node and the client will know which one to use based on param2.

The problem with this is that it wouldn't allow the use of param2 as facedir or wallmounted at the same time, and you still have a limit in how big that array can be.

But with that many nodes for a single mod, you might have to see if you are doing things wrong... are you properly taking advantage of facedir? maybe some of your nodes are symmetrical. What about the new connected-nodebox api? maybe you can take advantage of it too.
I am not so familiar with the engine, but maybe it would be possible to add a param3 (also for random textures)?
Storage Drawers - The simplest item storage in Minetest

TG-MyinaWD
Member
Posts: 356
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .
Location: Far Eden

Re: Why the 32768 node limit?

by TG-MyinaWD » Post

I think it should be really ∞.
But I up vote it be higher. Through RAM might be higher and, GPU for processing all them nodes.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: Why the 32768 node limit?

by Gael de Sailly » Post

Changing this value would be difficult and could cause compatibility problems. In the map.sqlite, data are written node per node. Every node is encoded by 32 bits : 8 for param1 (light), 8 for param2, 15 for node ID, and I suppose the latest is used for something else (could someone confirm this?). But changing this structure would be complicated and would increase the size of the file.

Registering entities to display nodes is extremely hacky. I'm strongly against using entities for anything that could be done another way (this makes me think that I would love to see the texts on signs managed by the core instead of using entities…)

What we need is a way to store additional data in nodes, for example unused bits of param2 could be used to select the texture inside a list.
Just realize how bored we would be if the world was perfect.

asanetargoss
Member
Posts: 42
Joined: Sun Apr 26, 2015 03:10

Re: Why the 32768 node limit?

by asanetargoss » Post

What we need is a way to store additional data in nodes, for example unused bits of param2 could be used to select the texture inside a list.
While selectable textures at runtime is a great idea, I was thinking more on the lines of a mod using the already-existing node metadata to store information about the node, have Minetest provide a Lua functions for rendering textures and polygons, and then have Minetest cache the resulting rendered thing until a render update is requested.

Ideally a task like this ought to be done client-side, but that's not trivial.

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: Why the 32768 node limit?

by Gael de Sailly » Post

I'm sorry but I've not completely understood. Do you mean storing the nodebox data in a special field in node metadata? I've already proposed it some months ago, it seems that this topic has been forgotten.
Just realize how bored we would be if the world was perfect.

asanetargoss
Member
Posts: 42
Joined: Sun Apr 26, 2015 03:10

Re: Why the 32768 node limit?

by asanetargoss » Post

Gael de Sailly wrote:I'm sorry but I've not completely understood. Do you mean storing the nodebox data in a special field in node metadata? I've already proposed it some months ago, it seems that this topic has been forgotten.
I'm talking about this metadata:
http://dev.minetest.net/NodeMetaRef

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests