Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digtron client/server discrepancies #688

Open
Klaranth opened this issue Jul 3, 2021 · 4 comments
Open

Digtron client/server discrepancies #688

Klaranth opened this issue Jul 3, 2021 · 4 comments
Labels
bug 🐛 Something isn't working

Comments

@Klaranth
Copy link

Klaranth commented Jul 3, 2021

Vamp
I've been advised to report here a bug about digtrons, it stopped in mid air, put some cobblestone to place the crate to pack it and it disappeared some angel came to the rescue and told me to put another cobblestone right next to the one i had placed the crate on, and it reappeared

Apparently there may be problems if you aren't close to the digtron. Also, the bigger the more problematic?
It happened in a moment where it got stuck on mid air, i placed cobblestone blocks to place the crate to pack the digtron, and after packing it just vanished and wasnt in my inventory.

ThinkSome
Though I did experience false crate persistance: hold rmb to place crates and you can place same crate in 2 nodes and the second crate doesen't disappear as is usual for client side prediction with insuficient items

SX
problem with digtron seems to be that you wont always get proper data for mapblock and that's why you wont see crate until mapblock changes and forces update
that's also why another player entering area will see crate even while you wont
and also why it reappears after placing some other node nearby.

Vamp
I realized placing a cobblestone block maybe wasnt necessary afterwards

SX
Not actually required but still that's simplest method to get crate back immediately

My theory is that it causes multiple updates and engine gets confused (basically bug in minetest engine). It is also possible that received mapblock data comes in wrong order but I think protocol check that.. not sure however as I've not actually played that much with minetest network stuff.

SX
Problem has been around for long time, I remember reporting that exact same problem when I first joined pandorabox years ago. Server was probably either 5.0 or 5.1 back then.

Actual problem is not in mod, problem is in engine. however it probably can be fixed in mod at least if what I think is actually what happens.

However even if it is no exactly multiple updates it is still problem in engine or network protocol because it seems it can be reproduced with stable network connection.

Basically problem is that different players can see different world at exact same location.

Digtron mod could most probably "fix" this issue by simply changing way how packing digtron into crate works under the hood (probably by swap node + set meta instead of remove node + add node + set meta).

pandorabox-io/in-game#90 + pandorabox-io/in-game#121 are also regarding Digtron upgrades.

@OgelGames OgelGames changed the title Digtron upgrade on client/server discrepancies Digtron client/server discrepancies Jul 3, 2021
@OgelGames
Copy link
Contributor

Maybe digtrons could call player:send_mapblock() when packing/unpacking? That's what jumpdrives use: https://github.com/mt-mods/jumpdrive/blob/master/move/move_players.lua#L37

send_mapblock(blockpos):
* Sends a server-side loaded mapblock to the player.
* Returns false if failed.
* Resource intensive - use sparsely
* To get blockpos, integer divide pos by 16

https://github.com/minetest/minetest/blob/062fd2190e0ac617499b19c51db609d3a923347e/doc/lua_api.txt#L6729-L6733

@OgelGames OgelGames transferred this issue from pandorabox-io/in-game Sep 15, 2021
@OgelGames OgelGames added the bug 🐛 Something isn't working label Sep 15, 2021
@BuckarooBanzay
Copy link
Contributor

Maybe digtrons could call player:send_mapblock() when packing/unpacking? That's what jumpdrives use: https://github.com/mt-mods/jumpdrive/blob/master/move/move_players.lua#L37

That could work, yes, but this is still an engine issue i think.
Maybe this will be fixed in the next version, there is already at least one bugfix in that direction merged (minetest/minetest#11597)

This might be the right time to discuss forking the digtron mod...
I don't have a lot of time to dedicate to this but i think a fork could be slowly improved and extended in the long run.

@OgelGames
Copy link
Contributor

This might be the right time to discuss forking the digtron mod...
I don't have a lot of time to dedicate to this but i think a fork could be slowly improved and extended in the long run.

Agreed, would definitely be beneficial 👍 And it's not like much is happening there, even the digtron 2.0 branch hasn't had any commits for over a year...

Would also make implementing some of the ideas easier too:
pandorabox-io/in-game#90
pandorabox-io/in-game#121
pandorabox-io/in-game#159

@S-S-X
Copy link
Member

S-S-X commented Dec 20, 2021

Also pandorabox-io/in-game#232 (suggested fork that would need updates from upstream anyway to not crash server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants