[0.4.8] Resizable node definition vector

kahrl
Member
 
Posts: 236
Joined: Fri Sep 02, 2011 07:51

[0.4.8] Resizable node definition vector

by kahrl » Sun Jul 14, 2013 22:04

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
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Jul 15, 2013 19:42

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.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Jul 15, 2013 23:10

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 (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

kahrl
Member
 
Posts: 236
Joined: Fri Sep 02, 2011 07:51

by kahrl » Wed Jul 17, 2013 03:13

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.
 

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

by jeni_galilea » Mon Jul 22, 2013 18:30

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
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.
 

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

by GUSATVO.TOCZEK » Fri Jul 26, 2013 22:49

oi sou novo seila como meche nesse jogo
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Sat Jul 27, 2013 01:42

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
 


Return to Minetest News

Who is online

Users browsing this forum: No registered users and 5 guests

cron