Entity manipulation in clientside modding.

Post Reply
JTE
Member
Posts: 12
Joined: Sun Sep 07, 2014 14:59

Entity manipulation in clientside modding.

by JTE » Post

I'm proposing an argument for the addition of entity manipulation to clientside modding. If there was any discussion on this subject internally or previously, I have not seen any part of it, so forgive me having to make the assumption that this is not already in development and isn't planned to be, for reasons I can only guess blindly. (If this feature would already be welcome and no one has simply gotten around to tackling it yet with all the other work being done, please forgive me -- I thought it prudent to discuss first.)

To begin with, I see no other way that server mods for player-controlled vehicles like boats, which take direct user input and translate them into a completely different physics set, will ever be plausible to run clientside prediction otherwise, and alleviate the tremendous and tangible control lag felt by piloting them. (I am aware that the current workaround is to turn the player into the vehicle in question by altering their model and physics, but this comes with its own set of problems and challenges I've yet to see overcome. Can you make the player automatically float on water like a boat just by manipulating the clientside physics, without affecting the world or other players? Tank controls to drive with, not instant mouse turning?)

In Minetest 0.5, there's a system in place which allows mods on the server and client to communicate directly. Kill all humans! This could easily be used to collaborate with the client to explicitly tell the server where it saw itself when the player began to maneuver, so that the server can work backwards and try to update the boat's position more correctly.

Additionally, while particle effects are already available to clientside mods, being able to spawn entirely non-interactive "ghost" entities clientside for visualization purposes would help in some ways immensely -- for example, protection mods like areas and landrush already use visualization entities server-side, which all players would be able to see and be bothered by. (Have you ever seen someone walk by spamming /showarea in every world block they pass through?) With a clientside mod doing the showing, the visualization doesn't need to get networked to anyone else, and can be persistent for as long as it's relevant to the user without fear of being bothersome.

I understand that it would be difficult to separate entity solidity and interactivity (which should usually be determined by the server) from where the client "views" said entity, so you obviously wouldn't want to allow clientmods that do things like push solid entities out of the doorway so you can run right through them without issue, right? So here is a compromise.

Moving server-side entities is generally only useful in the case of player-owned and controlled objects to begin with, regardless of whether it's a boat or a fishing bobber. Therefore, why not have some kind of a proper "ownership" flag on the entities which explicitly dictates to the server (and any relevant client(s)) who should be allowed to manipulate it currently? This would point to the boat's rider, the bobber's owner, or the big crane rig's remote control operator, and allow that player specifically to manipulate it on their end and also provide something to check against when they send back the results. (Ah, but this wouldn't help in the rare case where a player is granted an explicit ability to charge forward shoving things out of their way or similar... This may need more thought!)

Beyond that, you have the usual anti-ore-radar-cheats problems to worry about, but you're already working on that anyway and I'm certain a better visualization for such a use case is already available as the particle effects system. ;P

Personally, I am all for an entirely tailored experience where every client can see a very different set of entities from eachother, eg. each player can only see their own fishing bobber but no one else's, or client-specific story progression in NPCs that actually move to different locations over time as you complete their objectives -- but that is another issue entirely, and not necessarily a feature that clientside modding itself would be required in order to provide.

Input lag compensation certainly is, because only a game script can tell the engine what another script should be thinking.

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

Re: Entity manipulation in clientside modding.

by rubenwardy » Post

This is planned, and is one of the main reasons client-side scripting was added
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

JTE
Member
Posts: 12
Joined: Sun Sep 07, 2014 14:59

Re: Entity manipulation in clientside modding.

by JTE » Post

Absolutely wonderful, sorry for my wall of text then. ^^;

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Entity manipulation in clientside modding.

by sofar » Post

Head movement. Anything else I don't care about.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests