v-rob wrote: ↑Thu Feb 10, 2022 21:49
Autoforward/fly essentially recommends an API of programmatic access to player controls. This doesn't sound too bad in and of itself, but consider: programmatic access to the keyboard would also allow auto-digging, auto-building, and the like, which could be cheating depending on the game.
I wish for programmatic access to player controls so I can test my mod code better.
So I think this should be a feature that should exist for local debug builds at least.
It would only be cheating if it is indeed possible to remove the player from a decision loop.
Parkour can definitely not be cheated if you can only ever do “autoforward in this direction”.
Cora has a mod that uses the node in hand and places it on all similar nodes in reach.
This is very useful for building castles or towers – you still need to have the materials.
v-rob wrote: ↑Thu Feb 10, 2022 21:49
Additionally, an autoforward that avoids ravines, lava, and whatever, requires knowledge of the nodes in the world. This is problematic because people could use that API to find all the good ores in the world and dig them up, perhaps automatically, which is cheating without a doubt.
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.
v-rob wrote: ↑Thu Feb 10, 2022 21:49
So, you see the difficulty: we have these legitimate use-cases for CSM, but the problem is that the same APIs that can be used for cheating. I find it difficult to come up with APIs that are both useful but can't be used for cheating. Like I said, "colored chat and whatnot" are some of the only things that CSM can support without also supporting cheating.
Automated playtesting is one thing. If you only allow these things for local play in debug builds, there is little danger.
v-rob wrote: ↑Thu Feb 10, 2022 21:49
As for increasing brightness/contrast, that's a prime feature for a setting. It would actually be
easier to program a setting for it without exposing it to CSM than to make a CSM API for it, and a setting would also be
easier for the average user to use.
I must admit I just redefined the default light level for nodes to 1, so I could see them.
v-rob wrote: ↑Thu Feb 10, 2022 21:49
As for CSMs talking to other programs: I think CSMs don't allow
os.execute or
io.popen for security reasons, and hence CSM APIs to talk to external programs would also fall under that umbrella. Not entirely sure about that, however.
Well right now the CSM needs to write to debug log and then another program reads that log.
v-rob wrote: ↑Thu Feb 10, 2022 21:49
erlehmann wrote: ↑Thu Feb 10, 2022 08:22
my big hope for SSCSM is physics. I really want to be able to change the player physics, and have the client able to predict the physics. That *could* be implemented as an engine feature, however, though it would be best as a CSM.
People keep bringing that up – but I have never seen any examples. Do you have an implementation or proposal?
I don't know if an API proposal has ever been made, but the need is certainly easy to see. Try using Advtrains without increasing your server step from the default: the trains are really jerky and move about oddly. Increasing the server step increases network traffic, however, bogging the server down and making it unplayable for people with bad internet connections. A SSCSM API, even if it was exactly the same as the API for SSM entities, would allow people to control physics client-side, so in Advtrain's case, there would be no jerkiness, but very smooth. I, for one, would love smooth trains.
Advtrains is only one example. There's lots of mods that suffer from slow entity handling. It's even worse if you want to do anything with player physics.
For movement prediction, I would take an inspiration from the SVG path syntax:
Basically, you need to specify a (possibly interrupted) movement in 3D space.
What if an entity at 0,0,0 had an attribute movement_path with the following value?
Code: Select all
0.5 M 3,0,0 ; 1 L 0,0,0 ; 5 C 0,0,1 0,0,-1 0,0,2
Where each letter is a duration for a movement followed by a movement type and absolute coordinates.
“M” is move to (instant teleportation).
“L” is move along a line.
“C” is a cubic bezier function.
(Like SVG, small letters would indicate relative coordinates.)
This could cause a prediction on the client like the following:
1. The object goes instantly to 3,0,0 after 0.5 seconds.
2. The object moves to 0,0,0 and that takes 1 seconds.
3. The object moves to 0,0,2 and that takes 5 seconds. It moves along a cubic bezier function with control points 0,0,1 and 0,0,-1.
Surely hashing out a really useful path syntax with object rotation and proper timing would be a bit more work, but it seems like actually allowing the engine to predict this based upon an object property would not be that difficult.
Just having the line syntax would probably help to make a lot of stuff less jerky.
I am erle. I am non-binary. Please address me in gender-neutral terms.
cdb_b9da8bbc6338