[0.4.8] Resizable node definition vector

Locked
kahrl
Member
Posts: 236
Joined: Fri Sep 02, 2011 07:51
Location: Rös̓̇chenhof

[0.4.8] Resizable node definition vector

by kahrl » Post

Hi all!

Up until now, node definitions were stored in an array of size 4096 that could not be resized. Since this system caused problems, we changed it to a resizable vector today.


How does this affect me?

Unless you want to play on VanessaE's server, probably not at all. Maps are not affected. In most cases, you can connect with new clients to old servers, old clients to new servers, and of course new clients to new servers.


What's the deal with VanessaE's server? Are other servers affected?

If you want to play on VanessaE's server, you need a new version (git, for now) of minetest to connect. Any server that runs a huge number of mods can be affected as well. In technical terms, a server is affected if
  • nearly 4096 nodes are defined by mods and
  • the map contains nodes that belong to deleted mods (and are not aliased).
Both the server and the client must be upgraded in this case.


Can I register more than 4096 nodes now?

No. The limit for lua mods is still 4096, until there is consensus between the devs that this limit should be raised. However, dummy nodes (caused by unknown nodes in the map) are no longer affected by this limit.

If you are a server admin who absolutely needs more than 4096 nodes, modify mapnode.h, increase

Code: Select all

#define MAX_REGISTERED_CONTENT 0xfffU
and recompile. Your clients do not need to make this change, but they need to use a new version of minetest to be able to connect.

Jordach
Member
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach
Location: Blender Scene

by Jordach » Post

Ugh, I had to see this for myself; it is horrific without this.

Vanessa's server crashes and dies everytime it runs with over 4096 definitions.

Which is a shame really, as her server is the best for finding builder's inspirations.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server

User avatar
VanessaE
Moderator
Posts: 4517
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

Thanks to kahrl's commit, one need only grab a git build that's up-to-date and all should be in order. I'm testing my server with a limit of 0x7fff now (though the actual number of defined nodes is far less).
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

kahrl
Member
Posts: 236
Joined: Fri Sep 02, 2011 07:51
Location: Rös̓̇chenhof

by kahrl » Post

Forgot to mention this when writing the original post. Thanks to sokomine for bringing it up.

When you connect to an old server with a new client, whatever node gets assigned the ID 125 will show up as an unknown node on the client and act weird. (In one case, this happened to be cyan wool.)

This is just a client-side issue and doesn't cause data loss on the server. I recommend using an older client to connect to such servers to avoid the problem.

User avatar
jeni_galilea
New member
Posts: 1
Joined: Mon Jul 22, 2013 18:29

by jeni_galilea » Post

kahrl wrote:Hi all!

Up until now, node definitions were stored in an array of size 4096 that could not be resized. Since this system caused problems, we changed it to a resizable vector today.


How does this affect me?

Unless you want to play on VanessaE's server, probably not at all. Maps are not affected. In most cases, you can connect with new clients to old servers, old clients to new servers, and of course new clients to new servers.


What's the deal with VanessaE's server? Are other servers affected?

If you want to play on VanessaE's server, you need a new version (git, for now) of minetest to connect. Any server that runs a huge number of mods can be affected as well. In technical terms, a server is affected if
  • nearly 4096 nodes are defined by mods and
  • the map contains nodes that belong to deleted mods (and are not aliased).
Both the server and the client must be upgraded in this case.


Can I register more than 4096 nodes now?

No. The limit for lua mods is still 4096, until there is consensus between the devs that this limit should be raised. However, dummy nodes (caused by unknown nodes in the map) are no longer affected by this limit.

If you are a server admin who absolutely needs more than 4096 nodes, modify mapnode.h, increase

Code: Select all

#define MAX_REGISTERED_CONTENT 0xfffU
and recompile. Your clients do not need to make this change, but they need to use a new version of minetest to be able to connect.

User avatar
GUSATVO.TOCZEK
New member
Posts: 1
Joined: Fri Jul 26, 2013 22:33

by GUSATVO.TOCZEK » Post

oi sou novo seila como meche nesse jogo

User avatar
hoodedice
Member
Posts: 1372
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

GUSATVO.TOCZEK wrote:oi sou novo seila como meche nesse jogo
Portugese. 'Hi, I'm new to this game *untranslated*'

Even if you are new, this is not the place to discuss stuff. If you want to continue discussion in Portuguese, please go to the 'Other Languages' sub-forum.

Mesmo se você é novo, este não é o lugar para discutir coisas. Se você quiser continuar a discussão em Português, por favor, vá ao sub-fórum de Outras Línguas ". OTHER LANGUAGES
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

Locked

Who is online

Users browsing this forum: No registered users and 1 guest