Menus and the inventory

Post Reply
bru
Member
Posts: 11
Joined: Thu Oct 02, 2014 22:14

Menus and the inventory

by bru » Post

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

User avatar
Krock
Developer
Posts: 4597
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Menus and the inventory

by Krock » Post

bru wrote:Why aren't the menus handled client side?
To prevent from cheating.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
thetoon
Member
Posts: 106
Joined: Tue Dec 11, 2012 12:55

Re: Menus and the inventory

by thetoon » Post

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.

GauVeldt
Member
Posts: 40
Joined: Sun Oct 26, 2014 03:08
GitHub: gau-veldt

Re: Menus and the inventory

by GauVeldt » Post

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
Last edited by GauVeldt on Tue Oct 28, 2014 19:53, edited 1 time in total.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

Re: Menus and the inventory

by Evergreen » Post

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.
Back from the dead!

User avatar
twoelk
Member
Posts: 1425
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: Menus and the inventory

by twoelk » Post

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".

User avatar
rubenwardy
Moderator
Posts: 6451
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Menus and the inventory

by rubenwardy » Post

On singleplayer it does.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

Re: Menus and the inventory

by Evergreen » Post

rubenwardy wrote:On singleplayer it does.
Sorry about that, ignore me. :P
Back from the dead!

GauVeldt
Member
Posts: 40
Joined: Sun Oct 26, 2014 03:08
GitHub: gau-veldt

Re: Menus and the inventory

by GauVeldt » Post

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".

bru
Member
Posts: 11
Joined: Thu Oct 02, 2014 22:14

Re: Menus and the inventory

by bru » Post

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?

greydmiyu
Member
Posts: 27
Joined: Thu Sep 18, 2014 12:00

Re: Menus and the inventory

by greydmiyu » Post

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.

User avatar
rubenwardy
Moderator
Posts: 6451
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Menus and the inventory

by rubenwardy » Post

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

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests