erlehmann's wishlist & todos

For people working on the C++ code.
User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: erlehmann's wishlist & todos

by MisterE » Post

v-rob wrote:
Tue Feb 15, 2022 20:46
Linuxdirk wrote:
Tue Feb 15, 2022 18:58
Everyone always speaks about entity movement prediction and better physics when it comes to SSCSM but neither should be SSCSM but a built-in part of the client.
I'm not arguing, but more genuinely curious: how could one implement special player physics like wall climbing with only general engine APIs and no client side scripting?
you could have a wide range of player and entity movement capabilities implemented in the engine, and then allow the server to set a table of properties that pick a specific combo of physics properties. Basically, you could expand the existing api (significantly). then it is server sent properties tables instead of server sent mods. All you have to do is anticipate a much wider range of player physics possibilities.

specifically for wall climbing, implement it as I assume the slippery group is implemented. if the player is agaist a node that there is some way to know is climbable, allow them to climb it following a set of server-sent parameters.

I would love to see a gravity-direction parameter, a separate player-vertical axis parameter, and various physics modifiers that allow you to separately control friction, the effect of control input, setting velocity instantaneously, etc. all that could be implemented if the usecases were pre-anticipated. a good way to anticipate is to examine several genres of 2d platformer and 3d games, and anticipate that someone will try to implement smth similar in minetest

wsor4035
Member
Posts: 182
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: erlehmann's wishlist & todos

by wsor4035 » Post

could we please not add more hardcoded nightmares in the engine?
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: erlehmann's wishlist & todos

by MisterE » Post

he asked how it could be done without sscsm. sorry but that means a certian amount of hardcoding. Don't you realize that this would mean less hardcoding than is currently done? But it seems that that was a snide response :|
I struggle not to read that as a strawman argument or something.

I don't care how better physics control is implemented, but it does need to be implemented, with a simple and functional system, and it needs to start somewhere. if we are going to solve the sscsm problem, great! if we are going to indefinately postpone it because noone can think of a secure way to do it, then lets implement better physics control with a system that we can be sure is secure

if you hardcode some basic physics modifiers that allow you to combine them to meet most usecases imaginable, is that actually hardcoding, or is it providing a secure and simple programming language?

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: erlehmann's wishlist & todos

by Linuxdirk » Post

v-rob wrote:
Tue Feb 15, 2022 20:46
how could one implement special player physics like wall climbing with only general engine APIs and no client side scripting?
By extending the API to allow such movement and having the client perform the action and send it to the server. The server then validates and either confirms or rejects the movement action.

User avatar
sorcerykid
Member
Posts: 1847
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: erlehmann's wishlist & todos

by sorcerykid » Post

v-rob wrote:
Tue Feb 15, 2022 17:35
However, SSCSM would still be the superior solution for interactive entity stuff (say, a mobs mod where monsters do more than just run at you randomly, but showing some "intelligence" and making interactive movements on the spot
I agree somewhat on the first part but not the second. Since all clients can interact directly with mobs (and witness the effects of those interactions), it makes more sense that the AI for mobs is entirely server side such that the server acts as centralized authority to mediate those interactions. Otherwise, every client would have to report the status of its "decisions" to the server, and if there were conflicts between other clients, then the server would somehow have to resolve those conflicts, which essentially doubles the stream of logic processing. Not particularly efficient, moreless advantageous.

About the only exception to this would be raw sensory data, such as a mob "hearing" the footsteps of a player. That obviously could be handled mor effectively by the client, since that is where the footstep sounds originate. But then again, this still wouldn't require client-side modding, only extending the network protocol to transmit such data back to the server for the actual sensory processing.

erlehmann
Member
Posts: 62
Joined: Mon Jan 31, 2022 00:41
GitHub: erlehmann
IRC: erlehmann

Re: erlehmann's wishlist & todos

by erlehmann » Post

v-rob wrote:
Tue Feb 15, 2022 17:35
erlehmann wrote:
Mon Feb 14, 2022 17:47
I do *not* want an autoforward that avoids danger. This removes the player from the decision loop.

And it could be quite easy to avoid though! You could make a variable or scope acquire a “taint” flag when it gets information from the game world and disable any movement for as long as that information is in used or in scope.
Oh, I misunderstood then. Although, the more CSM APIs we'd add, the more of these edge cases and "taint" flags would start popping up and making things a complicated mess.
You only need one flag per function, i.e. “Was information read from the world relevant to this?”

Autoforward? CSM could not make the player move once it knows where obstacles are.
But “adjust the direction towards my waypoint and then go that way” would still be possible.

Autokill? CSM could not make the player punch something once it knows all the entities.
But “continue punching if i click once, stop if i click a second time” would still be possible.

Autominers? CSM could not make the player dig a node once it knows one is there.
But “mine a straight shaft 2 nodes high and 60 nodes deep” would still be possible.
cdb_b9da8bbc6338

User avatar
v-rob
Developer
Posts: 971
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: erlehmann's wishlist & todos

by v-rob » Post

erlehmann wrote:
Thu Feb 17, 2022 19:21
You only need one flag per function, i.e. “Was information read from the world relevant to this?”
Another problem: suppose CSM A reads blocks in the world, and CSM B is an autodig. Do we allow CSM B to dig then? We'd need a "taint" flag per-CSM. Oops, but CSM A and CSM B are actually working together, and CSM A makes a file while CSM B reads it, allowing it to see nodes in the world. Do we need to "taint" flag files too? Maybe CSM A puts that information somewhere else than just files. It gets too complicated.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

erlehmann
Member
Posts: 62
Joined: Mon Jan 31, 2022 00:41
GitHub: erlehmann
IRC: erlehmann

Re: erlehmann's wishlist & todos

by erlehmann » Post

v-rob wrote:
Thu Feb 17, 2022 21:26
erlehmann wrote:
Thu Feb 17, 2022 19:21
You only need one flag per function, i.e. “Was information read from the world relevant to this?”
Another problem: suppose CSM A reads blocks in the world, and CSM B is an autodig. Do we allow CSM B to dig then? We'd need a "taint" flag per-CSM. Oops, but CSM A and CSM B are actually working together, and CSM A makes a file while CSM B reads it, allowing it to see nodes in the world. Do we need to "taint" flag files too? Maybe CSM A puts that information somewhere else than just files. It gets too complicated.
No file writing while information that is tainted is in scope.

I would start with exactly one taint flag that tells if information of the game world has been read;
as long as that information is in scope, a bunch of CSM stuff would just not be permitted at all.
cdb_b9da8bbc6338

User avatar
v-rob
Developer
Posts: 971
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: erlehmann's wishlist & todos

by v-rob » Post

erlehmann wrote:
Thu Feb 17, 2022 22:01
No file writing while information that is tainted is in scope.

I would start with exactly one taint flag that tells if information of the game world has been read;
as long as that information is in scope, a bunch of CSM stuff would just not be permitted at all.
How long is "in scope"? As long as the player is nearby? While the variable is literally in scope in Lua? Both seem like bad solutions.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

erlehmann
Member
Posts: 62
Joined: Mon Jan 31, 2022 00:41
GitHub: erlehmann
IRC: erlehmann

Re: erlehmann's wishlist & todos

by erlehmann » Post

v-rob wrote:
Thu Feb 17, 2022 22:32
erlehmann wrote:
Thu Feb 17, 2022 22:01
No file writing while information that is tainted is in scope.

I would start with exactly one taint flag that tells if information of the game world has been read;
as long as that information is in scope, a bunch of CSM stuff would just not be permitted at all.
How long is "in scope"? As long as the player is nearby? While the variable is literally in scope in Lua? Both seem like bad solutions.
As long as there is any way to compute things based on the information.

How WoW did Lua taint: https://www.lua.org/wshop08/lua-whitehead.pdf
cdb_b9da8bbc6338

User avatar
Desour
Member
Posts: 1473
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: erlehmann's wishlist & todos

by Desour » Post

erlehmann wrote:
Tue Mar 01, 2022 22:52
How WoW did Lua taint: https://www.lua.org/wshop08/lua-whitehead.pdf
It sounds like they use a modified version of Lua.
Implementing such a thing just for CPCSMs, that aren't very popular anyways, would probably require too much work to be justified, especially as such things can easily be removed by changing a few lines and recompiling.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

x2048
Developer
Posts: 68
Joined: Mon Feb 15, 2021 22:41
GitHub: x2048

Re: erlehmann's wishlist & todos

by x2048 » Post

v-rob wrote:
Tue Feb 15, 2022 20:46
I'm not arguing, but more genuinely curious: how could one implement special player physics like wall climbing with only general engine APIs and no client side scripting?
Can this be a possible way?

The basic physics rule is already present in the engine: there are ladder and vine nodes that allow climbing.

The visual effect could be coded in the engine and declared via API in two steps:
1. On the player model define key frames for states and transition animations between states (e.g. standing, lying, sitting, flying, swimming, climbing etc.)
2. For each node define state of the model and parameters (for example, facing towards the wall while climbing).

When player moves between nodes, the engine tracks state change and animates accordingly, client-side.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests