Prediction for changes in meta inventories

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Prediction for changes in meta inventories

by MirceaKitsune » Sat Jun 14, 2014 21:07

Thread for issue #1374:

This is a well known problem, but since it's still one of the most problematic issues in Minetest IMO, I decided to report it again in hopes something can be done about it.

When moving items inside your own inventory, the changes are always applied immediately. But when moving stuff in node inventories, there is a lot of lag. Even in a single player world, it takes about a second after you drag an item to a slot for that item to actually go there.

This causes confusion and also feels horrible... especially when moving multiple items of one type or splitting / combining stacks. With workbenches it's a nightmare, and it's also problematic when sorting your things inside chests.

Please add local prediction of inventory changes to meta inventories. So when you move an item in a chest for example, the visual change is instantly applied locally rather than waiting for the server to notify it. The list shall of course still be updated when the server sends changes (current behavior), but also predicted locally before that. This would completely eliminate perceived lag... except for cases where a change in the formspec depends on server actions, but this is understandable and a way smaller problem.

As I already discussed with sapier on IRC, a small obstacle are areas that the player is not allowed to place things in... such as the craft result / furnace product slot. I assume the best solution is having the client know in which inventory lists the player is allowed to drop items, which is part of the formspec definition so it shouldn't be an issue.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Prediction for changes in meta inventories

by Sokomine » Sun Jun 15, 2014 00:55

MirceaKitsune wrote:As I already discussed with sapier on IRC, a small obstacle are areas that the player is not allowed to place things in... such as the craft result / furnace product slot. I assume the best solution is having the client know in which inventory lists the player is allowed to drop items, which is part of the formspec definition so it shouldn't be an issue.

Currently, Minetest does not respect slots which do not accept input. If the player takes something out of an output-only slot (a slot which clearly states that it does not accept input by returning always 0 on allow_metadata_inventory_move/put) and clicks with that on a slot in his inventory that contains something, that previous content is moved into the output-only slot. See issue #944.

Apart from that, I can't stand the version of the locked chests that hides its input from other people than their owners. The ownerwhip check happens on the server and causes so much lag that I use other types of chests who do not have this defiency whenever possible. This is a huge annoyance for no benefit at all. It's not the same as the point you stated here, but it's similar. It's even worse because it multiplies the effect.

For reasons unknown, chat sometimes seems to be much faster than replies from the server regarding movement of items.
A list of my mods can be found here.
 

User avatar
MirceaKitsune
Member
 
Posts: 809
Joined: Sat May 21, 2011 22:31
GitHub: MirceaKitsune
IRC: Taoki
In-game: MirceaKitsune

Re: Prediction for changes in meta inventories

by MirceaKitsune » Sun Jun 15, 2014 01:23

Considering that in single player it takes about a second to see item updates in chests, it seems like item movement is indeed slower than chat. IMO it's a huge issue, and I didn't notice it entirely until experimenting with the workbench got me looking at it. I hope any fix at all can be found... this alone could be one of those things that can frustrate a new player to the point of leaving and not looking back I'd say.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: Prediction for changes in meta inventories

by Sokomine » Sun Jun 15, 2014 01:44

It's not very obvious if you're looking at normal (not locked) chests alone. The problem really only shows up once the server actually has to do anything and has to respond. It'd be great if that problem could get fixed.
A list of my mods can be found here.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 7 guests