Creative gamemode improving kay's attempt of properly replicating mc #1995

Open
opened 2022-02-14 18:39:18 +01:00 by TanyaEleventhGoddess · 9 comments

I've seen the pr of @kay27 (#1946) and had some ideas about properly implementing this kind of behaviour into mineclone
Let's take a look at what's required and/or convenient

  1. For properly integrating minetest behaviour, mc creative simulation should be dependent on at least fly and fast. Two alternative methods could be implemented

    • creative would require fly and fast privileges to be assigned beforehand
    • creative would set automatically fly and fast privileges, previous states for users would be stored beforehand, upon disabling it would restore their previous state

Second solution is my favourite, personally

  1. Integration with minetest own's creative behaviour
    Possible choices:

    • Considering minetest creative mode as DEFAULT creative behaviour, adding a privilege assigning it and consider a mode called mcl_creative which tries to implement creative as we know it from mc
    • Ignoring minetest creative mode altogether and just consider it as a nucleus around these modifications
  2. Inventory management

As you know, mc just wants one block for you to place blocks indefinitely and yadda yadda yadda
Kay's creative mode doesn't work like this, once you place that block, doesn't matter which mode are you in, it's lost, full stop.
I thought about a solution for solving it, the server could just reply "nay you didn't place that block you fool" while actually considering it as placed
But, this means that upon lag client behaviour would stop you from setting blocks, which would be fairly annoying from my point of view. So I thought about this a bit crappy solution

  • A normal click from the inventory of our creative mode would get x10 of the specified material, a shift+click a full stack (64)
  • Normally the server would just fool your client into believing he never placed that block
  • Upon lag, your x10 stack would decrease, on reconnection you'd get the blocks again
  • When throwing a x10 stack from creative, server would count it as one, and a player picking it would receive just one block
  • When obtaining a single block, in creative the server would count it as receiving x10, other blocks of the same kind obtained will be ignored

Alternatively, please suggest a way of integrating the pros of minetest creative mode

I've seen the pr of @kay27 (#1946) and had some ideas about properly implementing this kind of behaviour into mineclone Let's take a look at what's required and/or convenient 1. For properly integrating minetest behaviour, mc creative simulation should be dependent on at least fly and fast. Two alternative methods could be implemented * creative would require fly and fast privileges to be assigned beforehand * creative would set automatically fly and fast privileges, previous states for users would be stored beforehand, upon disabling it would restore their previous state Second solution is my favourite, personally 2. Integration with minetest own's creative behaviour Possible choices: * Considering minetest creative mode as DEFAULT creative behaviour, adding a privilege assigning it and consider a mode called mcl_creative which tries to implement creative as we know it from mc * Ignoring minetest creative mode altogether and just consider it as a nucleus around these modifications 3. Inventory management As you know, mc just wants one block for you to place blocks indefinitely and yadda yadda yadda Kay's creative mode doesn't work like this, once you place that block, doesn't matter which mode are you in, it's lost, full stop. I thought about a solution for solving it, the server could just reply "nay you didn't place that block you fool" while actually considering it as placed But, this means that upon lag client behaviour would stop you from setting blocks, which would be fairly annoying from my point of view. So I thought about this a bit crappy solution * A normal click from the inventory of our creative mode would get x10 of the specified material, a shift+click a full stack (64) * Normally the server would just fool your client into believing he never placed that block * Upon lag, your x10 stack would decrease, on reconnection you'd get the blocks again * When throwing a x10 stack from creative, server would count it as one, and a player picking it would receive just one block * When obtaining a single block, in creative the server would count it as receiving x10, other blocks of the same kind obtained will be ignored Alternatively, please suggest a way of integrating the pros of minetest creative mode

Seems noone is willing to brainstorm a bit on this

Seems noone is willing to brainstorm a bit on this
Contributor

Sorry i suppose people are busy with other things right now. I don't think we should do this before release in any case.

But yeah this has been planned for a long time: MineClone2/MineClone2#132

Sorry i suppose people are busy with other things right now. I don't think we should do this before release in any case. But yeah this has been planned for a long time: https://git.minetest.land/MineClone2/MineClone2/issues/132
Contributor

I don't think the "loosing" of the blocks is an acutaly problem though.

consider this simple mod:

minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
	return true
end)

this would result in no blocks ever being removed from players inventories upon placing. You'd have to check for privileges of course instead of unconditionally returning true. I do not think this has a lot to do with lag. The client prediction might run out of blocks but as soon as it gets an inventory update from the server they would be restored.

I don't think the "loosing" of the blocks is an acutaly problem though. consider this simple mod: ``` minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing) return true end) ``` this would result in no blocks ever being removed from players inventories upon placing. You'd have to check for privileges of course instead of unconditionally returning true. I do not think this has a lot to do with lag. The client prediction *might* run out of blocks but as soon as it gets an inventory update from the server they would be restored.

I don't think the "loosing" of the blocks is an acutaly problem though.

consider this simple mod:

minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing)
	return true
end)

this would result in no blocks ever being removed from players inventories upon placing. You'd have to check for privileges of course instead of unconditionally returning true. I do not think this has a lot to do with lag. The client prediction might run out of blocks but as soon as it gets an inventory update from the server they would be restored.

Cora I need you in private

> I don't think the "loosing" of the blocks is an acutaly problem though. > > consider this simple mod: > > ``` > minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing) > return true > end) > ``` > > this would result in no blocks ever being removed from players inventories upon placing. You'd have to check for privileges of course instead of unconditionally returning true. I do not think this has a lot to do with lag. The client prediction *might* run out of blocks but as soon as it gets an inventory update from the server they would be restored. Cora I need you in private
Contributor

yes, goddess

i am still at work though. 2-3 hours i guess

yes, goddess i am still at work though. 2-3 hours i guess
Member

The client prediction might run out of blocks but as soon as it gets an inventory update from the server they would be restored.

If you are on a survival server and then disconnect your wifi/ethernet cable, you can place as many blocks as you want until your client timeout or you reconnect. 🤔

> The client prediction *might* run out of blocks but as soon as it gets an inventory update from the server they would be restored. If you are on a survival server and then disconnect your wifi/ethernet cable, you can place as many blocks as you want until your client timeout or you reconnect. :thinking:
AFCMS added the
gameplay
#P3: elevated
needs discussion
labels 2022-02-17 10:14:49 +01:00
Contributor

yes but your inv will be restored upon reconnection

yes but your inv will be restored upon reconnection
Contributor

@kay27 do you by any chance have a few simple commits in mcl5 that would get it to current mcl5-state (it's not perfect but you can live-switch to creative which would be a huge + i suppose).

I've made a branch from kays old PR just removed the unrelated mcl_anticheat from it. It works (just needs restart).

https://git.minetest.land/MineClone2/MineClone2/src/branch/creative_gamemode

@kay27 do you by any chance have a few simple commits in mcl5 that would get it to current mcl5-state (it's not perfect but you can live-switch to creative which would be a huge + i suppose). I've made a branch from kays old PR just removed the unrelated mcl_anticheat from it. It works (just needs restart). https://git.minetest.land/MineClone2/MineClone2/src/branch/creative_gamemode
Contributor

Yes, please check two first from 3 resulted:

  • 7c5554a0f6 (crash fixed here)
  • ae63e32048 (here is also a chunksize change, it's better not to do it for mcl2 right now, i suppose)

By the way, I think, fast priv is currently very bad for servers. Map generates slowly. Several players with fast priv cause significant freezes. I think we should better ban everybody who attempts to use fast if they aren't a developer doing it for a reason

Also, noclip probably should be used for spectator game mode, right?

Yes, please check two first from [3 resulted](https://git.minetest.land/MineClone5/MineClone5/commits/branch/testing/search?q=gamemode): * https://git.minetest.land/MineClone5/MineClone5/commit/7c5554a0f6c998aeeb0ddfe0d5f060354a24c69d (crash fixed here) * https://git.minetest.land/MineClone5/MineClone5/commit/ae63e32048170e949c960d6e77c6fbcb2bfc3de9 (here is also a chunksize change, it's better not to do it for mcl2 right now, i suppose) By the way, I think, `fast` priv is currently very bad for servers. Map generates slowly. Several players with fast priv cause significant freezes. I think we should better ban everybody who attempts to use `fast` if they aren't a developer doing it for a reason Also, `noclip` probably should be used for spectator game mode, right?
ancientmarinerdev added the
creative mode
label 2023-02-04 03:26:29 +01:00
ancientmarinerdev removed the
#P3: elevated
label 2023-02-04 03:27:36 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#1995
No description provided.