Page 1 of 1

Menus and the inventory

PostPosted: Sun Oct 26, 2014 17:42
by bru
This is one of the main things that makes inventory management a huge pain and generally results in me having lazily organized chests.

When I move an item from my inventory to a chest, there's a delay. Same goes with crafting, furnaces, etc. Why aren't the menus handled client side?

https://github.com/minetest/minetest/issues/1374

Re: Menus and the inventory

PostPosted: Sun Oct 26, 2014 17:57
by Krock
bru wrote:Why aren't the menus handled client side?

To prevent from cheating.

Re: Menus and the inventory

PostPosted: Tue Oct 28, 2014 10:07
by thetoon
bru wrote:Why aren't the menus handled client side?


Because virtually nothing is handled client-side. Well, that's a bit of an over-statement, but it reflects the general direction.

Note that, given a considerable coding effort, it could be theoretically possible to move some things to client-side. Though, as said before, it would probably require those things to be done twice, once on each end of the connection, to prevent cheating.

Re: Menus and the inventory

PostPosted: Tue Oct 28, 2014 15:17
by GauVeldt
my only question is why these very things lag on an eight-core recent computer with the client and server on same machine (ie: singleplayer)?

there could be a lot of inventories kicking around, especially when mods must use hidden player inventories to keep any persistent player attributes.

maybe the player stuff should use sqlite like the maps, perhaps speeding things up versus filesystem access (the sqlite library is highly optimized, transactional (thread-safe), resistant to power-loss conditions, etc.)

I've been considering such a change in my local build of minetest.

EDIT: emphasis

Re: Menus and the inventory

PostPosted: Tue Oct 28, 2014 18:22
by Evergreen
GauVeldt wrote:my only question is why these very things lag on an eight-core recent computer with the client and server on same machine?

there could be a lot of inventories kicking around, especially when mods must use hidden player inventories to keep any persistent player attributes.

maybe the player stuff should use sqlite like the maps, perhaps speeding things up versus filesystem access (the sqlite library is highly optimized, transactional (thread-safe), resistant to power-loss conditions, etc.)

I've been considering such a change in my local build of minetest.

The speed of your computer has nothing to do with lag.

Re: Menus and the inventory

PostPosted: Tue Oct 28, 2014 18:33
by twoelk
Evergreen wrote:...
The speed of your computer has nothing to do with lag.


I'm not really sure about that as I do some times have the feeling that a client on a slow computer could possibly cause lag on a remote server and even influence the other connected clients. Maybe the rule of the convoy applies that states "the complete convoy moves as fast as the slowest member".

Re: Menus and the inventory

PostPosted: Tue Oct 28, 2014 18:55
by rubenwardy
On singleplayer it does.

Re: Menus and the inventory

PostPosted: Tue Oct 28, 2014 19:01
by Evergreen
rubenwardy wrote:On singleplayer it does.

Sorry about that, ignore me. :P

Re: Menus and the inventory

PostPosted: Tue Oct 28, 2014 19:51
by GauVeldt
Evergreen wrote:
GauVeldt wrote:my only question is why these very things lag on an eight-core recent computer with the client and server on same machine?

there could be a lot of inventories kicking around, especially when mods must use hidden player inventories to keep any persistent player attributes.

maybe the player stuff should use sqlite like the maps, perhaps speeding things up versus filesystem access (the sqlite library is highly optimized, transactional (thread-safe), resistant to power-loss conditions, etc.)

I've been considering such a change in my local build of minetest.

The speed of your computer has nothing to do with lag.


I'm sure it would when client are server are on same machine as is the case in singleplayer. I failed to mention singleplayer specifically in my last post but I should have implied it when I said "on same machine".

Re: Menus and the inventory

PostPosted: Thu Oct 30, 2014 23:34
by bru
Krock wrote:
bru wrote:Why aren't the menus handled client side?

To prevent from cheating.


I worded that poorly. I don't mean the actual items in the inventory.

Why is so much of the game server-side, though? I would love to make some client-side mods. Things like custom HUDs, things similar to the immersive sounds, etc. Why does that all have to be handled by the server?

Re: Menus and the inventory

PostPosted: Sun Nov 02, 2014 16:39
by greydmiyu
Krock wrote:
bru wrote:Why aren't the menus handled client side?

To prevent from cheating.


This isn't a decent enough explanation. Many server/client games (think MMOs) need to handle inventory in a similar fashion and do not have the same lag.

Re: Menus and the inventory

PostPosted: Sun Nov 02, 2014 20:16
by rubenwardy
Not because of cheating. Mods are server, the easiest way to do menus is server side. It's about extendability. Of course client side prediction with inventories would be good for all of them, including chests.

AFAIK