Menus and the inventory

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

Menus and the inventory

by bru » Sun Oct 26, 2014 17:42

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
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Menus and the inventory

by Krock » Sun Oct 26, 2014 17:57

bru wrote:Why aren't the menus handled client side?

To prevent from cheating.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

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

Re: Menus and the inventory

by thetoon » Tue Oct 28, 2014 10:07

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 » Tue Oct 28, 2014 15:17

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: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Menus and the inventory

by Evergreen » Tue Oct 28, 2014 18:22

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.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Menus and the inventory

by twoelk » Tue Oct 28, 2014 18:33

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Menus and the inventory

by rubenwardy » Tue Oct 28, 2014 18:55

On singleplayer it does.
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: Menus and the inventory

by Evergreen » Tue Oct 28, 2014 19:01

rubenwardy wrote:On singleplayer it does.

Sorry about that, ignore me. :P
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

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

Re: Menus and the inventory

by GauVeldt » Tue Oct 28, 2014 19:51

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 » Thu Oct 30, 2014 23:34

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 » Sun Nov 02, 2014 16:39

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Menus and the inventory

by rubenwardy » Sun Nov 02, 2014 20:16

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
 


Return to Minetest Features

Who is online

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

cron